NPM Package README Generator — Install, Usage, API Docs
7 templates · Live preview · Badge builder · Tech stack · GitHub stats · Export .md
Generate a complete README for your npm package or open-source JavaScript/TypeScript library. The NPM Library template includes all essential sections — installation command, usage examples with code blocks, full API reference table, shields.io badges (version, build, coverage, license), contributing guide, and license section. Live preview shows exactly how it renders on GitHub and npmjs.com.
my-awesome-project
A short description of your project.
📋 Table of Contents
📖 About
A short description of your project.
✨ Features
⚙️ Installation
npm install my-awesome-project
🚀 Usage
import { myFunc } from 'my-awesome-project';const result = myFunc({ option: 'value' });
console.log(result);
🤝 Contributing
Contributions are always welcome!
See CONTRIBUTING.md for ways to get started.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)⚖️ License
Distributed under the MIT License. See LICENSE for more information.
Frequently Asked Questions
What badges should an npm package README have?
Standard npm package badges include: npm version (shows latest published version), build status (GitHub Actions passing/failing), code coverage percentage (Codecov), license type, and npm weekly downloads. Add these from the Badges tab using presets. Shields.io generates these dynamically from npm/GitHub/Codecov APIs.
How to write a good API reference in README?
A good API reference includes: function/method name, parameters with types and descriptions in a Markdown table, return type and value, and a brief code example. The API template in CalcNation's README generator pre-fills the correct Markdown table format. Fill in your actual function names, parameters, and return values.
Should I include TypeScript types in README examples?
Yes — for TypeScript packages, show typed code examples. Use ```typescript fenced code blocks in the Usage and API Reference sections. Include the import statement, type annotations, and show both common and edge-case usage. TypeScript users expect to see type information to understand how to integrate the package.
What license should I choose for an open-source npm package?
MIT is the most permissive and popular license for npm packages — it allows anyone to use, modify, and distribute your code with minimal restrictions. Apache-2.0 adds patent protection, suitable for larger projects. GPL-3.0 requires derivative works to be open-source (copyleft). For most utility libraries, MIT is the recommended choice.
Does npmjs.com render README Markdown?
Yes — npmjs.com renders your README.md on your package page using GitHub-Flavored Markdown (GFM). The README from your repository root is automatically used. Badges, code blocks, tables, and images all render correctly. However, HTML comments and some advanced GFM features may not render on npm — test your README on both GitHub and npm after publishing.
How to add a contributing guide to my npm package?
Enable the "Contributing" section in the Sections tab — it auto-generates the standard fork → branch → commit → PR contributing workflow. For a more detailed CONTRIBUTING.md file, click "Quick Add → Contributing Guide" to enable the section. Reference it from your README as [Contributing Guide](CONTRIBUTING.md). Also consider adding a CODE_OF_CONDUCT.md using the "Code of Conduct" quick-add button.