How to Write a Great README for Your Public GitHub Project

Learn how to write a great README for your public GitHub project. This guide covers installation, usage, development setup, publishing, and contribution best practices.

A well-crafted README.md is the front door to your project, it tells the world what your code does, why it matters, and how to get started. Whether you're building a utility library, a CLI tool, or a full web app, a clear and complete README can turn casual visitors into contributors.

In this post, I'll break down what makes a good README using the env-secrets project as an example, and explain how you can structure your own for maximum clarity and usability.

Start with a Clear Project Description

Your README should begin with a concise explanation of the project's purpose and why someone might want to use it.

Example:

# env-secrets

A simple CLI to manage secrets in `.env` files and upload them to GitHub Actions secrets or AWS Parameter Store.

Make the first line count. Keep it short, but specific. Avoid buzzwords and focus on what the tool actually does.

Provide Quick Installation Instructions

Make it easy for people to get up and running. If your project is installable via a package manager (like npm, pip, or brew), include that right away.

Example:

npm install -g env-secrets

If installation requires cloning or building, provide the exact commands someone should run.

Show How to Use It Immediately

Nothing wins people over faster than being able to see something work.

Example:

env-secrets encrypt .env

Include real usage examples and explain what they do. Use code blocks to keep formatting clean and cover common use cases right up front.

Explain Local Development Setup

Let potential contributors know how to run the project locally. This is especially important if you're open to contributions.

Example:

git clone https://github.com/markcallen/env-secrets.git
cd env-secrets
npm install
npm run dev

Be explicit about environment variables, ports, and any prerequisites. If you use Docker, Node.js, or Python, say so and specify required versions.

Document the Publish/Deploy Process

If your project gets published (e.g. to npm or a Docker registry), include instructions for how you do it, or how maintainers can help.

Example:

npm version patch
npm publish

This section helps other team members (or future you) understand how to ship new releases with confidence.

Encourage Contributions

Open source is about community. Signal that you welcome contributions, and explain how to get started.

Example:

## Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.

Make sure to update tests as appropriate.

You can also link to a CONTRIBUTING.md or a CODE_OF_CONDUCT.md if you have one.

Use Markdown Well

Don't underestimate the power of clean formatting. Use:

  • Headings (##) to organize sections
  • Code blocks (triple backticks) for commands and config files
  • Lists for steps or requirements
  • Links for related tools or documentation

Consider adding badges (e.g. for GitHub Actions, npm, license) at the top for quick status info.

Optional but Helpful Extras

If your project is more complex, consider adding:

  • A Table of Contents
  • Screenshots or terminal output examples
  • Architecture diagrams
  • FAQ section
  • Troubleshooting tips

Final Thoughts

A good README is more than just documentation, it's a pitch, a tutorial, and an invitation. It should answer a new user's most immediate questions: What does this do? How do I use it? How can I help?

By following the structure of a clear, example-driven README like env-secrets, you give your project the best chance to grow, attract contributors, and actually get used.


Do you have a project you’re proud of? Go back to your README today and ask: Would I know what to do if I saw this for the first time?