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

@craftpipe/docgen-cli

v1.0.0

Published

<p align="center"> <img src=".github/assets/banner.svg" alt="docgen-cli" width="800" /> </p>

Readme

docgen-cli

Documentation generation CLI -- analyze, generate, and maintain docs for any JavaScript/TypeScript project.

Same analysis engine as DocForge MCP, now as a standalone CLI with commander.js.

Install

npm install -g docgen-cli

Architecture

graph TD
    CLI["docgen CLI"] --> Scanner["project-scanner"]
    CLI --> Routes["route-detector"]
    CLI --> Env["env-scanner"]
    CLI --> Types["type-extractor"]
    CLI --> Git["git-analyzer"]
    CLI --> JSDoc["jsdoc-parser"]
    CLI --> Fmt["formatters"]
    CLI --> Gate["premium/gate"]

    Scanner --> |"project metadata"| Scan["scan"]
    Scanner --> Readme["readme"]
    Routes --> API["api"]
    Routes --> OpenAPI["openapi (Pro)"]
    Git --> Changelog["changelog"]
    Git --> Migration["migration (Pro)"]
    Git --> Release["release-notes (Pro)"]
    Env --> EnvCmd["env"]
    Types --> TypesCmd["types"]
    JSDoc --> Coverage["coverage"]
    Scanner --> Sync["sync (Pro)"]
    Scanner --> Arch["architecture (Pro)"]
    Scanner --> Multi["multi-repo (Pro)"]

Commands

Free Commands

| Command | Description | |:--------|:------------| | docgen scan [path] | Documentation readiness score (0-100) | | docgen readme [path] | Generate README.md | | docgen api [path] | Extract API endpoints, generate docs | | docgen changelog [path] | CHANGELOG from git history | | docgen env [path] | Document environment variables | | docgen types [path] | Document TypeScript types/interfaces/Zod | | docgen coverage [path] | JSDoc/TSDoc coverage percentage |

Pro Commands

Requires PRO_LICENSE environment variable.

| Command | Description | |:--------|:------------| | docgen openapi [path] | OpenAPI 3.1 spec (--format yaml\|json) | | docgen sync [path] | Documentation drift detection | | docgen migration <from> <to> | Migration guide between git refs | | docgen architecture [path] | Architecture doc with Mermaid diagrams | | docgen multi-repo <repos...> | Unified docs across multiple repos | | docgen release-notes <from> <to> | Release notes between tags |

Usage

# Score your project's documentation readiness
docgen scan

# Generate a README
docgen readme > README.md

# Extract API endpoints
docgen api --json

# Generate changelog from git history
docgen changelog --format keepachangelog

# Document environment variables
docgen env

# Document TypeScript types
docgen types

# Check JSDoc coverage with threshold
docgen coverage --threshold 80

JSON Output

All commands support --json for machine-readable output:

docgen scan --json | jq '.score'
docgen api --json | jq '.endpoints'

Changelog Options

docgen changelog --from v1.0.0 --to v2.0.0 --format conventional
docgen changelog --format keepachangelog

Pro Commands

export PRO_LICENSE=your-license-key

# Generate OpenAPI spec
docgen openapi --format yaml > openapi.yaml

# Detect documentation drift
docgen sync

# Migration guide
docgen migration v1.0.0 v2.0.0

# Architecture documentation
docgen architecture

# Multi-repo documentation
docgen multi-repo ./frontend ./backend ./shared

# Release notes
docgen release-notes v1.0.0 v1.1.0

Framework Detection

docgen-cli automatically detects your project's framework:

  • Next.js -- App Router API routes (export function GET)
  • Express -- app.get(), router.post(), etc.
  • Fastify -- Fastify route handlers
  • Hono -- Hono route handlers
  • Generic -- Any JavaScript/TypeScript project

License

MIT