npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

codebase-doc

v1.0.1

Published

AI-powered codebase documentation generator. Analyzes your code and generates beautiful, comprehensive documentation.

Readme

CodebaseDoc 📚

AI-Powered Codebase Documentation Generator Automatically analyze your codebase and generate beautiful, comprehensive documentation.

npm version License Node

✨ Features

  • 🔍 Auto-scan - Recursively scan your codebase and extract all modules, functions, classes, and exports
  • 📝 JSDoc Support - Parse JSDoc comments and generate rich documentation
  • 📊 Code Analysis - Get complexity metrics, file statistics, and dependency overview
  • 🌐 HTML Output - Generate beautiful, responsive HTML documentation with sidebar navigation
  • 📄 Markdown Output - Generate Markdown docs compatible with GitBook, Docusaurus, etc.
  • 🖥️ Built-in Server - Start a local documentation server with one command
  • ⚡ Lightweight - No database, no external services, works entirely offline

🚀 Quick Start

# Install globally
npm install -g codebase-doc

# Initialize config in your project
codebase-doc init

# Generate documentation
codebase-doc scan

# Start documentation server
codebase-doc serve --port 3000

📖 Usage

codebase-doc init

Initialize a configuration file in your project directory:

codebase-doc init
codebase-doc init ./my-project

This creates a codebase-doc.config.json file with customizable scan settings.

codebase-doc scan

Scan your codebase and generate documentation:

# Generate Markdown docs (default)
codebase-doc scan

# Generate HTML docs
codebase-doc scan --format html

# Custom output directory
codebase-doc scan --output ./docs --format html

# Use custom config
codebase-doc scan --config ./my-config.json

codebase-doc serve

Start a local documentation server:

# Default port 3000
codebase-doc serve

# Custom port
codebase-doc serve --port 8080

# Custom docs directory
codebase-doc serve --docs-dir ./my-docs

codebase-doc analyze

Quick codebase analysis without generating docs:

codebase-doc analyze

⚙️ Configuration

Edit codebase-doc.config.json to customize:

{
  "name": "my-project",
  "version": "1.0.0",
  "scan": {
    "include": ["src/**/*.js", "src/**/*.ts"],
    "exclude": ["node_modules/**", "dist/**", "test/**"]
  },
  "output": {
    "directory": "./docs",
    "format": "markdown",
    "theme": "default"
  }
}

📦 Output

HTML Documentation

  • Responsive design with sidebar navigation
  • Dark code blocks with syntax highlighting
  • Module index with statistics
  • Individual module pages with full details

Markdown Documentation

  • index.md - Project overview with statistics
  • modules/ - Individual module documentation
  • SUMMARY.md - GitBook-compatible table of contents

🏗️ Architecture

codebase-doc/
├── bin/
│   └── codebase-doc.js    # CLI entry point
├── src/
│   └── index.js           # Core logic
├── templates/             # Output templates
├── test/                  # Test suite
└── docs/                  # Generated documentation

📊 Example Output

When run on a typical Node.js project, CodebaseDoc generates:

docs/
├── index.html             # Project overview with stats
├── index.js.html          # Module documentation
├── app.js.html            # Module documentation
└── ...                    # One page per module

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License - see LICENSE for details.

💖 Support

If you find CodebaseDoc useful, consider supporting development:

| Method | Address | |--------|---------| | 🌐 GitHub Sponsors | Sponsor on GitHub | | ₿ Bitcoin | 0xeE5c0Ff16704Ce7bD8e06F4823D0EbbC2b8ecadA | | 💎 Ethereum | 0xeE5c0Ff16704Ce7bD8e06F4823D0EbbC2b8ecadA |

Your support helps maintain and improve this project!

🙏 Acknowledgments