Open source
How to write a good README for your open-source project
The README is the front door of your project. Learn which sections it needs, how to write install and usage steps people can follow, and the mistakes that drive visitors away.

A good README tells a visitor, within a minute, what your project does, why they might want it, and how to get it running. For open-source projects it is usually the first and sometimes the only page people read before deciding whether to use or contribute to your code.
This guide covers the sections a strong README needs, how to write installation and usage instructions that actually work, the extras that help contributors, and the most common mistakes.
What is a README for?
A README is a text file, usually README.md written in Markdown, in the root folder of a project. Code hosting platforms display it on the project's main page, so it acts as a landing page, a quick-start guide and a signpost to deeper documentation all at once.
Different visitors want different things. A potential user wants to know if it solves their problem. A new user wants to install it and see it work. A contributor wants to know how to set up a development environment and where to start. A good README serves all three, in that order, without becoming a manual.
Which sections should a README include?
There is no single required format, but most good READMEs share a similar structure. Put the most important information near the top, because many readers will not scroll far.
Use Markdown headings for each section so readers can scan the page and platforms can generate a table of contents. For a long README, add a short list of links to the sections near the top. Keep paragraphs short and put commands, file names and code in code formatting, so they stand out and can be copied exactly.
- Project name and a one- or two-sentence description of what it does and for whom.
- A screenshot, short demo or example output, if the project has anything visual.
- Installation: requirements and exact steps.
- Usage: the smallest working example, then common tasks.
- Configuration: options and environment variables, or a link to them.
- Contributing: how to help, or a link to CONTRIBUTING.
- Licence: the licence name and a link to the LICENSE file.
- Support and contact: where to ask questions or report bugs.
People trust a README that tells them when not to use the project.
How do you write a description that hooks people?
Lead with the problem the project solves, in plain words. 'A command-line tool that resizes and compresses images for the web in one step' is far more useful than 'A modern, blazing-fast image pipeline framework'. Avoid jargon and hype; say what it does and who it is for.
If it helps, add a short 'why' paragraph explaining how the project differs from the obvious alternatives, without naming or criticising them. Mention important limits honestly, such as supported platforms or the project's maturity. People trust a README that tells them when not to use the project.
How do you write installation steps that work?
Installation is where most READMEs fail. The author has done it once, long ago, on a machine that already had everything installed, and forgot half the steps. The fix is to test your instructions on a clean machine, a fresh virtual machine or a container, exactly as written.
Good installation sections share a few habits:
- List prerequisites with minimum versions, such as the language runtime or database.
- Give commands in code blocks that can be copied and pasted.
- Show one command per step, in order.
- Note differences between operating systems where they exist.
- Explain how to check the installation worked, such as a version command.
- Link to troubleshooting for common errors.
How should you show usage?
Start with the smallest example that does something useful, so a reader can copy it and see a result within minutes. Show both the command or code and the output they should expect. Then add a few examples for the most common real-world tasks.
Keep examples realistic and complete: include imports, required options and sample input. Resist the urge to document every option in the README. Once you have covered the basics, link to fuller documentation elsewhere, such as a docs folder or a documentation site.
If your project has a command-line interface, show the output of its help command or a short table of the most-used options. For a library, show the main function or class with a realistic call. Readers decide very quickly whether a project fits their need, and a concrete example answers that faster than any description.
What helps contributors?
If you want contributions, make the path obvious. A short Contributing section in the README should explain how to set up a development environment, run the tests and submit changes, or link to a CONTRIBUTING file with the details.
Labelling some issues as suitable for newcomers, adding a code of conduct and explaining how decisions are made all signal that newcomers are welcome. Status badges for build results, test coverage or the latest version can help, but use a few meaningful ones rather than a wall of them.
What are the most common README mistakes?
Most README problems come from writing for yourself instead of a newcomer. Watch for these:
A simple way to catch most of them is to ask someone who has never seen the project to follow the README while you watch, without helping. Every place they hesitate, guess or ask a question is a gap to fix. It takes half an hour and is the most effective documentation test there is.
- No description, or one full of buzzwords.
- Installation steps that skip prerequisites or were never tested.
- Examples that no longer work with the current version.
- No licence, which means others legally cannot reuse the code.
- A huge README that tries to be the full manual.
- Outdated screenshots and broken links.
Frequently asked questions
What format should a README be in?
+
Markdown (README.md) is the most common because code hosting platforms render it with headings, links and code blocks. Plain text and reStructuredText are also used, especially in some language communities.
How long should a README be?
+
Long enough to explain what the project does, install it and run a first example. For larger projects, keep the README short and link to full documentation.
Should I put a licence in the README?
+
Mention the licence name and link to it, but keep the full licence text in a separate LICENSE file in the root of the repository.
Do private or personal projects need a README?
+
Yes. Even a short README with what it does and how to run it helps your future self and anyone you share the project with.
What is the difference between a README and documentation?
+
The README is the entry point: a summary, quick start and signposts. Documentation covers everything in depth, such as full configuration, guides and reference material.
How do I keep a README up to date?
+
Update it in the same change that alters installation or usage, and include README checks in code review. Some projects test the code examples in their documentation automatically.
Read your README as if you had never seen the project. If you could not install it and run an example from that page alone, fix the gaps; that is the most valuable documentation work you can do.
How we research: Guides are written from established sources and checked for accuracy. They are general information, not professional advice.
Written by
Cursorlane Editorial Team
Software & tools
Our writers are developers and heavy software users who test what they write about and update guides when the tools change.


