README Generator · Tutorial

How to write a README for a GitHub project

8 min readbeginnerUpdated

Your project works, but its GitHub page is blank. You will write a README that tells visitors what it does, how to install it and how to use it, preview it, and publish it.

What you need

Steps

  1. Start from the example

    Press Load example to see a complete README for a small npm tool, then replace the details with your own.

  2. Write the summary first

    The one-line summary appears as a quote under the title. Describe the benefit, not the technology: “Run your project’s scripts from one small YAML file” beats “A Node.js YAML parser”.

  3. Give a runnable example

    In Usage example, put the shortest commands or code that do something useful. Set the code language so GitHub highlights it.

    npx tasker init
    npx tasker run build
  4. Choose sections

    Keep badges, features, installation, usage and licence. Tick Table of contents once the README grows beyond a screen. The preview updates as you go.

  5. Publish it

    Download README.md, put it in the root of the repository and push. GitHub shows it below the file list automatically.

Try it yourself

Opens the README Generator with this tutorial's sample loaded.

Try it now

Common mistakes

Writing only for yourself
Assume the reader has never heard of the project. Explain what problem it solves before how it works.
Letting the example go stale
When commands change, update the README in the same pull request, or new users hit errors on their first try.

Next steps

Go back to the README Generator, or keep going with one of these:

FAQ

Should the README be long?

Only as long as needed. Put detailed docs in a docs folder or a site and link to them.