README.md Template
Copy-paste templates for GitHub projects — library, CLI, app, and API
Every GitHub project needs a README.md — it's the first thing visitors see. A good README turns a repo from "random code" into something people actually want to use. Below are ready-to-use templates you can copy, paste into your project, and customize in under five minutes. Need a refresher on Markdown syntax? See our Markdown cheat sheet.
Minimal README Template
Works for any project. Start here if you're not sure which template to use.
# Project Name
One-line description of what this project does.
## Installation
```bash
npm install project-name
```
## Usage
```js
import { doThing } from 'project-name'
doThing('hello')
// => 'HELLO'
```
## License
MIT
Library / Package README
For npm packages, Python libraries, or any reusable code. Includes badges, API reference table, and contributing section.
# project-name
[](https://www.npmjs.com/package/project-name)
[](LICENSE)
One-line description. What problem does this solve?
## Features
- Feature one — brief explanation
- Feature two — brief explanation
- Feature three — brief explanation
## Installation
```bash
npm install project-name
```
## Quick Start
```js
import { createClient } from 'project-name'
const client = createClient({ apiKey: 'your-key' })
const result = await client.process('input')
console.log(result)
```
## API Reference
| Method | Description | Returns |
|--------|-------------|---------|
| `createClient(opts)` | Create a new client instance | `Client` |
| `client.process(input)` | Process input data | `Promise<Result>` |
| `client.batch(items)` | Process multiple items | `Promise<Result[]>` |
## Configuration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `apiKey` | `string` | — | Your API key (required) |
| `timeout` | `number` | `5000` | Request timeout in ms |
| `retries` | `number` | `3` | Number of retry attempts |
## Contributing
1. Fork the repo
2. Create a feature branch (`git checkout -b feature/amazing`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing`)
5. Open a Pull Request
## License
MIT — see [LICENSE](LICENSE) for details.
CLI Tool README
For command-line tools. Emphasizes installation, usage examples, and flags.
# tool-name
One-line description of what this CLI does.
## Install
```bash
# Homebrew (macOS)
brew install tool-name
# npm (cross-platform)
npm install -g tool-name
# From source
cargo install tool-name
```
## Usage
```bash
# Basic usage
tool-name input.txt
# With options
tool-name input.txt --format json --output result.json
# Pipe from stdin
cat data.csv | tool-name --format csv
```
## Options
| Flag | Short | Description | Default |
|------|-------|-------------|---------|
| `--format` | `-f` | Output format (json, csv, table) | `table` |
| `--output` | `-o` | Write to file instead of stdout | — |
| `--verbose` | `-v` | Show detailed progress | `false` |
| `--help` | `-h` | Show help | — |
## Examples
### Convert CSV to JSON
```bash
tool-name data.csv --format json
```
### Process multiple files
```bash
tool-name *.md --output results/
```
## License
MIT
App / Product README
For desktop apps, web apps, or SaaS products. Includes screenshots placeholder, download links, and system requirements.
# App Name
> One-line tagline that explains the value.

## Features
- **Feature one** — what it does and why it matters
- **Feature two** — what it does and why it matters
- **Feature three** — what it does and why it matters
## Download
| Platform | Link | Requirements |
|----------|------|--------------|
| macOS | [Download DMG](https://example.com/download) | macOS 13.0+ |
| Windows | [Download MSI](https://example.com/download) | Windows 10+ |
| Linux | [AppImage](https://example.com/download) | Ubuntu 20.04+ |
## Getting Started
1. Download and install the app
2. Open a file or drag it into the window
3. Start working
## Keyboard Shortcuts
| Action | Shortcut |
|--------|----------|
| Open file | `Cmd+O` |
| Save | `Cmd+S` |
| Find | `Cmd+F` |
| Toggle sidebar | `Cmd+B` |
## Feedback
Found a bug? [Open an issue](https://github.com/user/repo/issues).
Have a question? [Start a discussion](https://github.com/user/repo/discussions).
## License
MIT — see [LICENSE](LICENSE).
README Tables — Quick Reference
Tables are the most-searched part of README formatting. Here's the syntax at a glance — for the full guide with alignment, multi-line cells, and advanced tricks, see Markdown Tables Guide.
| Feature | Free | Pro |
|---------------|:----:|:----:|
| Basic editing | Yes | Yes |
| Cloud sync | No | Yes |
| Priority support | No | Yes |
Use :---: for center alignment, ---: for right alignment, and :--- (or just ---) for left.
Badges for Your README
Badges show project health at a glance. Add them right below your project title. The most useful ones:
<!-- npm package -->
[](https://www.npmjs.com/package/PACKAGE)
<!-- Build status (GitHub Actions) -->
[](https://github.com/USER/REPO/actions)
<!-- License -->
[](LICENSE)
<!-- Downloads -->
[](https://www.npmjs.com/package/PACKAGE)
Preview Your README Before Pushing
Don't push a broken README to GitHub. Preview it locally first:
- MDViewer — open README.md and see it rendered exactly like GitHub, with tables, code highlighting, and Mermaid diagrams. Set it as your default and double-click any .md file to preview
- Quick Look — select README.md in Finder and press Space for an instant rendered preview (with MDViewer's QuickLook extension installed)
- Online viewer — drag your README.md into the browser, no install needed. Works on any OS
For a full comparison of Mac preview options, see How to Open .md Files on Mac.
Requires macOS 13.0 or later. Intel and Apple Silicon.
Frequently Asked Questions
What should a good README.md include?
At minimum: a project title and one-line description, installation instructions, a quick-start usage example, and a license. For libraries, add an API reference table. For apps, add screenshots and system requirements. Badges and a contributing guide are nice-to-have.
What is the difference between README and README.md?
README is a plain text file. README.md uses Markdown formatting (.md extension), which GitHub, GitLab, and Bitbucket automatically render with headings, links, tables, and code blocks. README.md is the modern standard for open-source projects.
How do I preview a README.md before pushing to GitHub?
On Mac, use MDViewer — it renders GitHub Flavored Markdown with tables, code highlighting, and Mermaid diagrams. You can also press Space in Finder for a Quick Look preview, or drag the file into the free online viewer.
How do I add a table to a README.md?
Use pipes (|) and hyphens (-) to create columns and rows. Use colons for alignment: :--- left, :---: center, ---: right. See our Markdown Tables Guide for the full syntax and advanced examples.