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

nspecgen

v1.1.0

Published

A Node.js + TypeScript CLI tool for generating project specifications using AI

Readme

nspecgen

A Node.js + TypeScript CLI tool for generating comprehensive project specifications using AI. Creates structured markdown documentation for architecture, UI/UX, API, deployment, roadmap, and actionable task lists.

✨ Features

  • 🤖 AI-Powered Generation - Uses OpenAI GPT-4 (with support for other providers)
  • 📋 Comprehensive Specs - Architecture, UI/UX, API, Deployment, and Roadmap documentation
  • ⚡ Two Modes - Quick (minimal questions) or Detailed (comprehensive questionnaire)
  • 📝 Structured Output - Clean markdown with Summary, Main Content, and Assumptions sections
  • ✅ Task Generation - Automatic task list creation with actionable checkboxes
  • 🔧 Configurable - Support for multiple AI providers and custom settings
  • 🛡️ Safe Operations - Smart file handling with overwrite protection

🚀 Installation

Global Installation (Recommended)

npm install -g nspecgen

Local Development Installation

git clone https://github.com/nuvo-code/nspecgen.git
cd nspecgen
npm install
npm run build
npm link

Verify Installation

nspecgen --version

📖 Quick Start

  1. Initialize configuration:

    nspecgen init
  2. Generate specifications:

    nspecgen run --mode quick
  3. View generated files:

    ls specs/
    # architecture.md  ui-ux.md  api.md  deployment.md  roadmap.md  tasks.md

🎯 Usage

Commands

# Initialize configuration
nspecgen init [--force]

# Generate all specifications
nspecgen run [options]

# Add specific specification
nspecgen add <step> [options]

# Update existing specifications
nspecgen update [step] [options]

Options

  • --mode <mode> - Generation mode: quick or detailed (default: quick)
  • --steps <steps> - Comma-separated list of steps: architecture,ui,api,deployment,roadmap
  • --output <dir> - Output directory (default: ./specs)
  • --force - Overwrite existing files without prompting
  • --provider <provider> - AI provider: openai, anthropic, gemini, local
  • --model <model> - AI model to use

Examples

# Quick generation with minimal questions
nspecgen run --mode quick

# Detailed generation with comprehensive questionnaire
nspecgen run --mode detailed --output ./documentation

# Generate only architecture and API specs
nspecgen run --steps architecture,api

# Update all existing specifications
nspecgen update --all

# Use specific AI provider and model
nspecgen run --provider openai --model gpt-4-turbo

⚙️ Configuration

Run nspecgen init to create a specgen.config.json file in your project root:

{
  "provider": "openai",
  "model": "gpt-4",
  "outputDir": "./specs",
  "defaultMode": "quick",
  "steps": {
    "architecture": true,
    "ui": true,
    "api": true,
    "deployment": true,
    "roadmap": true
  }
}

Environment Variables

Set your API key using environment variables:

# OpenAI
export OPENAI_API_KEY="your-api-key"

# Anthropic
export ANTHROPIC_API_KEY="your-api-key"

# Google Gemini
export GEMINI_API_KEY="your-api-key"

# Or set in config
export NSPECGEN_API_KEY="your-api-key"
export NSPECGEN_PROVIDER="openai"
export NSPECGEN_MODEL="gpt-4"

📁 Generated Output

After running nspecgen run, you'll find structured documentation:

specs/
├── architecture.md    # System architecture and technology stack
├── ui-ux.md          # User interface and experience design
├── api.md            # API specification and endpoints
├── deployment.md     # Infrastructure and deployment strategy
├── roadmap.md        # Project timeline and milestones
└── tasks.md          # Actionable task checklist

Each file follows a consistent structure:

  • Summary - Key points and decisions (5-7 bullets)
  • Main Content - Detailed specifications and guidelines
  • Assumptions & Open Questions - Areas needing clarification

🔧 Development

Building from Source

git clone https://github.com/nuvo-code/nspecgen.git
cd nspecgen
npm install
npm run build

Running Tests

npm test
npm run test:watch

Local Development

npm run dev        # Watch mode compilation
npm run link       # Link for global usage
npm run unlink     # Remove global link

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

📋 Roadmap

  • [x] Additional AI provider implementations (Local)
  • [ ] CI/CD integration for automatic spec updates
  • [ ] Plugin system for custom specification steps
  • [ ] Web UI interface
  • [ ] Template system for different project types
  • [ ] Export to different formats (PDF, Word, etc.)

📄 License

MIT License - see LICENSE file for details.

🆘 Support