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

gendocs-ai

v1.0.4

Published

AI-powered code documentation generator supporting Gemini, ChatGPT, and Claude

Readme

GenDocs AI

AI-powered documentation generator that automatically creates comprehensive documentation for your codebase using Google Gemini, OpenAI (ChatGPT), or Anthropic (Claude).

Features

  • Multiple AI Providers: Support for Google Gemini, OpenAI, and Claude
  • Automatic README Generation: Create professional README.md files
  • API Documentation: Generate detailed API documentation from your code
  • JSDoc Comments: Automatically add JSDoc comments to functions
  • Code Analysis: Parse and analyze JavaScript/TypeScript codebases
  • Fast & Easy: Simple CLI interface with interactive setup
  • Beautiful Output: Color-coded terminal output with progress indicators

Installation

Global Installation

npm install -g gendocs-ai

Use with npx (No Installation Required)

npx gendocs-ai init

Local Installation

npm install gendocs-ai --save-dev

Quick Start

  1. Initialize Configuration
gendocs-ai init

This will prompt you to:

  • Select your AI provider (Gemini, OpenAI, or Claude)
  • Enter your API key
  • Optionally specify a model
  1. Generate Documentation
# Generate full documentation
gendocs-ai generate

# Generate only README
gendocs-ai readme

# Add JSDoc comments
gendocs-ai jsdoc

API Keys

You'll need an API key from one of these providers:

Usage

Commands

init

Initialize configuration with interactive prompts:

gendocs-ai init

generate

Generate comprehensive documentation (README + API docs):

gendocs-ai generate [options]

Options:
  -d, --dir <directory>     Target directory to scan (default: ".")
  -o, --output <directory>  Output directory for docs (default: "./docs")

Example:

gendocs-ai generate --dir ./src --output ./documentation

readme

Generate only README.md:

gendocs-ai readme [options]

Options:
  -d, --dir <directory>  Target directory to scan (default: ".")

jsdoc

Add JSDoc comments to your code:

gendocs-ai jsdoc [options]

Options:
  -d, --dir <directory>  Target directory to scan (default: ".")
  -f, --file <file>      Specific file to process

Example:

# Process all files in src/
gendocs-ai jsdoc --dir ./src

# Process a specific file
gendocs-ai jsdoc --file ./src/utils/helper.js

config

Show current configuration:

gendocs-ai config

Configuration

Configuration is stored in .gendocs-ai.json in your project root:

{
  "provider": "gemini",
  "apiKey": "your-api-key",
  "model": "gemini-pro"
}

Default Models

  • Gemini: gemini-2.5-flash
  • OpenAI: gpt-4o
  • Claude: claude-3-sonnet

Supported File Types

  • .js - JavaScript
  • .ts - TypeScript
  • .jsx - React JSX
  • .tsx - TypeScript JSX
  • .mjs - ES Modules
  • .cjs - CommonJS

Ignored Directories

The following directories are automatically ignored:

  • node_modules
  • dist
  • build
  • .git
  • coverage
  • .next
  • out

Examples

Generate Documentation for a React Project

# Navigate to your project
cd my-react-app

# Initialize
gendocs-ai init

# Generate all documentation
gendocs-ai generate --dir ./src --output ./docs

Add JSDoc to a Node.js Project

# Add JSDoc comments to all files
gendocs-ai jsdoc --dir ./lib

# Add JSDoc to a specific file
gendocs-ai jsdoc --file ./lib/database.js

Generate README for an Express API

gendocs-ai readme --dir ./routes

Output Examples

README.md

Generated with project overview, features, installation instructions, usage examples, and API documentation.

API.md

Comprehensive API documentation including:

  • Function signatures
  • Parameters and return types
  • Class methods and properties
  • Import/export information

api.json

Machine-readable JSON export of your entire codebase structure.

License

MIT © Pratham Darji

Acknowledgments

  • Built with Commander.js for CLI
  • Powered by Babel for code parsing
  • AI providers: Google Gemini, OpenAI, Anthropic Claude

Support


Made with ❤️ by Pratham Darji