NanoFile

README generator

Answer six questions and take a README away. The sections are the ones readers look for and authors skip, and you can switch off any you do not want.

README.md
# Project name

One sentence that says what this does and who it is for.

[![Build](https://img.shields.io/badge/build-passing-brightgreen)](#)
[![Licence](https://img.shields.io/badge/licence-MIT-blue)](LICENSE)

## Install

```bash
npm install project-name
```

## Usage

```ts
import { thing } from "project-name";

thing({ loud: true });
```

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `loud` | boolean | `false` | Prints every step to stdout |
| `retries` | number | `3` | How often to try again before giving up |

## Contributing

Issues and pull requests are welcome. Run the tests before opening one.

## Licence

MIT. See [LICENSE](LICENSE).

How it works

  1. The name, description, install command and usage snippet become the top of the file, which is the part a visitor reads before deciding to keep going.
  2. Badges are shields.io URLs, generated from your project name so the package ones point somewhere real.
  3. Switch a section off and it is left out, without leaving a gap behind it.
  4. Take it away as a file, on the clipboard, or straight into the viewer to keep editing.

Questions

What makes a good README?

One line at the top saying what it is and who it is for, then how to install and run it. Everything else is optional. Most READMEs open with a logo and a table of contents and never answer the first question.

Do the badges work straight away?

The licence badge does. The build badge points at a placeholder until you aim it at your CI, and the package badges assume the project is published under a name derived from what you typed.

Is there a longer example?

Yes, a complete README with an options table and a comparison section is in the examples.

Related