README Template
A README is the front page of a code repository: it says what the project does, how to get it running, how to configure and use it, and who to ask when it breaks. A good one gets a new developer from git clone to a working copy without asking anyone. The template below covers those sections in the order readers need them.
README.md (copy into your repo)
# [Project name]
[One sentence: what this does and who it is for. Example: "Syncs paid
Shopify orders to the warehouse API every five minutes."]
[Optional: one screenshot, diagram or short terminal recording.]
## Quick start
[The shortest path from clone to something working. Copy-paste commands only.]
```bash
git clone [repo URL]
cd [project]
[install command]
[run command]
```
You should see: [what success looks like — a URL, a log line, a result].
## Requirements
- [Runtime and version, e.g. Node 20+ / Python 3.12]
- [Services it needs: database, API keys, queues]
- [OS or hardware constraints, if any]
## Configuration
| Variable | Required | Default | What it does |
|---|---|---|---|
| `[NAME]` | yes | — | [Description] |
| `[NAME]` | no | `[value]` | [Description] |
[Where configuration lives (.env, config file) and how to get secrets.]
## Usage
[The two or three things people actually do with it, each with a real
command or code sample and its output.]
## How it works
[A short paragraph, or a diagram: the main components and how data moves
between them. Link to deeper docs instead of repeating them here.]
## Deployment
[Where it runs, how to deploy, and how to roll back.]
## Troubleshooting
- **[Symptom or error message]** — [cause and fix]
- **[Symptom or error message]** — [cause and fix]
## Contributing
[How to run tests, the branch and review process, code style. Or a link
to CONTRIBUTING.md.]
## Maintainers and support
[Who owns it, where to ask questions, how to report bugs.]
## License
[License name] — see [LICENSE](LICENSE). Filling in a README that people can actually follow
- 1
Write the one-sentence description first
Say what the project does and for whom, in terms a newcomer understands. If you can't, the project's purpose isn't settled yet.
- 2
Test the quick start on a clean machine
Clone into a fresh directory or container and run the commands exactly as written. Fix the README, not your environment, when something fails.
- 3
List every configuration value
Grep the code for environment variables and config keys. Anything that stops it starting goes in the table, marked required.
- 4
Show real usage with real output
Two or three commands or code samples people actually run, with what they return. Skip features nobody uses yet.
- 5
Add troubleshooting from real failures
Each time someone asks you for help, add the error and the fix. This section grows into the most-read part of the file.
- 6
Delete what doesn't apply
An empty Roadmap or a Contributing section on a private client repo is noise. Remove sections rather than leaving placeholders.
Why the sections come in this order
A README has several audiences, and each one stops reading at a different point. Order the sections by how many readers need them.
- Description and quick start
- Everyone reads these. Someone evaluating the project needs the description; someone using it needs the quick start. Together they should fit on one screen.
- Requirements and configuration
- Read by anyone who gets past the quick start, usually because it failed. A configuration table with defaults answers most "it won't start" questions before they're asked.
- Usage and how it works
- For people who'll work with the code regularly. Keep "how it works" to the mental model, and link out to anything longer.
- Deployment, troubleshooting, contributing
- Reference sections, read when someone needs them. Their job is to be findable, so give them predictable headings.
Example: the top of a client-handover README
The first sections of a README for a small internal service a contractor built and is handing over. Names are illustrative.
# order-sync
Copies paid Shopify orders to the warehouse API every five minutes,
so the warehouse can pick and ship without manual export.
## Quick start
git clone git@github.com:acme/order-sync.git
cd order-sync
cp .env.example .env # fill in the three required values below
npm install
npm run sync -- --dry-run
You should see "Found N paid orders, 0 sent (dry run)".
## Configuration
| Variable | Required | Default | What it does |
|-------------------|----------|---------|------------------------------------|
| SHOPIFY_TOKEN | yes | — | Admin API token (read orders) |
| WAREHOUSE_API_KEY | yes | — | Key from the warehouse portal |
| WAREHOUSE_URL | yes | — | Base URL, no trailing slash |
| SYNC_INTERVAL_MIN | no | 5 | Minutes between runs | The description names the business outcome, not the technology. The quick start ends with a dry run and the exact line that proves it worked, so a new developer can check their setup without sending real orders anywhere.
READMEs that fail their readers
- The quick start only works on the author's laptop. It relies on a globally installed tool, a local database or an environment variable that was never written down. Testing it in a clean container is the only reliable check.
- It describes the project the author meant to build. Feature lists, roadmaps and architecture notes drift from the code. Usage examples that you run as part of your tests can't drift silently.
- The description is a list of technologies. "A React + Go + Postgres app" tells a reader how it's built, not what it does or whether they need it.
- Secrets are pasted in as examples. A real token in a README is a leaked token. Use obvious placeholders and an
.env.examplefile.
FAQ
- What is the most important part of a README?
- The first screen: one sentence on what the project does, then a quick start that works when copied. Most readers decide in those few lines whether to keep reading or give up.
- README.md or README.txt?
- README.md on any platform that renders Markdown (GitHub, GitLab, Bitbucket, most internal Git hosts), because headings, code blocks and tables make it far easier to scan. Plain text only makes sense where nothing renders Markdown.
- How long should a README be?
- Long enough to get someone from clone to working and to answer the questions they'll otherwise ask you. When a section grows past a screen or two (architecture, API reference, deployment runbooks), move it to a docs folder and link to it.
- Should a private or client project have a README?
- Yes, and it matters more there. On a client handover the README is how the next developer finds out how to run, configure and deploy what you built, usually after you've moved on.
- Do I need badges?
- Only ones that answer a question a reader has: build status, latest version, licence. Rows of badges for every tool in the stack push the description and quick start off the first screen.