← Back to Developer Tools
📄

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.

⚡ Quick Template
👁️ Preview 58 lines · 152 words · 1114 chars
ℹ️ Replace "username" with your actual GitHub username

my-awesome-project

A short description of your project.

📋 Table of Contents

  • 📖 About / Overview
  • ✨ Features
  • ⚙️ Installation
  • 🚀 Usage
  • 📡 API Reference
  • 🤝 Contributing
  • ⚖️ License
  • 📖 About

    A short description of your project.

    ✨ Features

  • Feature 1
  • Feature 2
  • Feature 3
  • ⚙️ 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.

  • Fork the repository
  • Create your feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request
  • ⚖️ License

    Distributed under the MIT License. See LICENSE for more information.

    Ctrl+Enter RefreshCtrl+Shift+C CopyCtrl+S DownloadM Toggle view

    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.

    You might also like

    Related Tools