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

scribbly

v2.1.1

Published

AI-powered auto-documentation CLI

Downloads

6

Readme

scribbly

AI-powered documentation generation CLI that automatically creates comprehensive docs, API references, and READMEs from your codebase using OpenAI.

Generate professional documentation in seconds. No manual writing required.

Features

  • 🤖 AI-Powered - Uses OpenAI to intelligently analyze and document your code
  • 📝 Multiple Output Formats - Generate READMEs, API docs, changelogs, and more
  • 🎨 Customizable Templates - Handlebars-based templates for full control
  • Watch Mode - Live documentation updates as you code
  • 🔧 TypeScript Support - First-class TypeScript support with full type inference
  • ⚙️ Easy Configuration - Simple config file to get started

Installation

Using Bun (Recommended)

bun install -g scribbly

Using npm

npm install -g scribbly

Quick Start

1. Initialize Configuration

scribbly init

This creates a .scribblyrc.json config file in your project.

2. Set Your OpenAI API Key

export OPENAI_API_KEY=sk_your_key_here

3. Generate Documentation

scribbly generate

Usage

Commands

scribbly generate

Generate all documentation based on your configuration.

scribbly generate

scribbly api

Generate API documentation from your codebase.

scribbly api --output docs/api.md

scribbly readme

Generate or update your project README.

scribbly readme --output README.md

scribbly watch

Watch for file changes and regenerate documentation in real-time.

scribbly watch

scribbly init

Initialize a new scribbly configuration file.

scribbly init

Configuration

Create a .scribblyrc.json file in your project root:

{
  "openai": {
    "apiKey": "${OPENAI_API_KEY}",
    "model": "gpt-4"
  },
  "input": {
    "include": ["src/**/*.ts", "src/**/*.tsx"],
    "exclude": ["**/*.test.ts", "**/*.spec.ts"]
  },
  "output": {
    "readme": "README.md",
    "api": "docs/api.md",
    "changelog": "CHANGELOG.md"
  },
  "templates": {
    "readme": "templates/readme.hbs",
    "api": "templates/api.hbs"
  }
}

Configuration Options

| Option | Type | Description | |--------|------|-------------| | openai.apiKey | string | Your OpenAI API key (use env var: ${OPENAI_API_KEY}) | | openai.model | string | OpenAI model to use (default: gpt-4) | | input.include | string[] | Glob patterns for files to document | | input.exclude | string[] | Glob patterns for files to ignore | | output.readme | string | Output path for README | | output.api | string | Output path for API documentation | | output.changelog | string | Output path for changelog | | templates.* | string | Custom Handlebars template paths |

Environment Variables

  • OPENAI_API_KEY (required) - Your OpenAI API key for documentation generation

Examples

Generate API Documentation Only

scribbly api --output docs/api.md --template templates/custom-api.hbs

Watch Mode with Custom Config

scribbly watch --config custom.scribblyrc.json

Generate README from Specific Files

scribbly readme --include "src/index.ts" --include "src/types.ts"

How It Works

  1. Scans your codebase based on include/exclude patterns
  2. Analyzes code structure, exports, and comments using OpenAI
  3. Generates documentation using Handlebars templates
  4. Outputs formatted markdown files to your specified locations

Templates

Scribbly uses Handlebars for templating. Create custom templates in your project:

# {{projectName}}

{{description}}

## Installation

```bash
npm install {{packageName}}

API

{{#each exports}}

{{this.name}}

{{this.description}}

{{/each}}


See `templates/` directory for built-in template examples.

## Troubleshooting

### "OPENAI_API_KEY not found"

Make sure your OpenAI API key is set:

```bash
export OPENAI_API_KEY=sk_your_key_here
scribbly generate

Documentation Not Updating

Check that your file patterns in .scribblyrc.json match your source files:

scribbly generate --verbose

Rate Limiting

If you hit OpenAI rate limits, scribbly will automatically retry with exponential backoff.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a 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 © 2026


Keywords