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

codeplot

v3.1.0

Published

Interactive CLI tool for feature planning and ADR generation using Gemini 2.5 Pro

Readme

Codeplot

npm version CI/CD Pipeline License: MIT semantic-release

🧠 Plot your features with AI-powered planning and architecture decisions

An interactive CLI tool that uses Google Gemini AI to help you plan features and generate Architecture Decision Records (ADRs) for your projects. Get AI-powered technical guidance, implementation plans, and properly structured ADRs without leaving your terminal.

Features

  • 📦 Repository Analysis: Uses repomix to pack your codebase for AI analysis
  • 🤖 Interactive Planning: AI-driven conversation to gather feature requirements
  • 📝 ADR Generation: Automatically creates Architecture Decision Records
  • 🎯 One Question at a Time: Focused, clarifying questions with options and recommendations
  • 🏗️ Implementation Plans: Step-by-step technical implementation guidance
  • 💾 Session Management: Save, resume, and modify planning sessions with persistent state
  • Real-time Streaming: Watch AI responses appear in real-time with configurable typing speeds
  • 🎨 Enhanced UX: Beautiful visual indicators and smooth typing animations

Prerequisites

  1. Node.js (>=20.0.0) - This project uses Volta for Node.js version management
  2. Gemini API Key - Get one from Google AI Studio
  3. repomix (optional - will be installed automatically if missing)
  4. adr-tools (optional - for proper ADR management)
  5. Volta (recommended) - For automatic Node.js version management

Installation

Global Installation (Recommended)

Install Codeplot globally using npm:

npm install -g codeplot

Using npx (No Installation Required)

Run Codeplot without installing:

npx codeplot init
npx codeplot plan --project-path /path/to/your/project

API Key Setup

Set your Gemini API key as an environment variable:

export GEMINI_API_KEY="your_api_key_here"

# Or add to your shell profile for persistence
echo 'export GEMINI_API_KEY="your_api_key_here"' >> ~/.bashrc
# or ~/.zshrc for zsh users

Dependencies

Codeplot will automatically install missing dependencies:

  • repomix: For repository analysis (installed automatically if missing)
  • adr-tools: For proper ADR management (optional, see installation guide)
# Optional: Install adr-tools for enhanced ADR management
npm install -g adr-tools
# or on macOS with Homebrew
brew install adr-tools

Usage

Initialize the CLI

codeplot init

Plan a Feature

# Default with streaming enabled (uses gemini-2.5-pro)
codeplot plan --project-path /path/to/your/project

# Use a different model
codeplot plan --model gemini-2.0-flash-exp

# Fast typing speed
codeplot plan --typing-speed fast

# Disable streaming (instant responses)
codeplot plan --no-streaming

# Slow typing speed for presentation mode
codeplot plan --typing-speed slow

Session Management

Codeplot automatically saves your planning sessions and allows you to resume or modify them:

# Sessions are automatically saved during planning
codeplot plan

# When you have completed sessions, you'll be prompted with options:
# 1. Start a new planning session
# 2. Review current ADR
# 3. Modify/refine current ADR
# 4. Exit

Session Features:

  • Auto-save: Every interaction is automatically saved
  • Resume: Continue where you left off if interrupted
  • Modify: Refine existing ADRs through additional conversations
  • Review: Read completed ADRs before making changes
  • Interactive Loop: Seamlessly transition between reviewing and modifying

Options

  • -p, --project-path <path>: Path to your project repository (default: current directory)
  • -k, --api-key <key>: Gemini API key (or set GEMINI_API_KEY env var)
  • -m, --model <model>: Gemini model to use (default: gemini-2.5-pro, or set GEMINI_MODEL env var)
  • -o, --output-dir <dir>: Output directory for ADRs (default: ./doc/adr)
  • --no-streaming: Disable streaming responses (show all at once)
  • --typing-speed <speed>: Typing speed for streaming: fast, normal, slow (default: normal)

Available Models

You can specify different Gemini models based on your needs:

  • gemini-2.5-pro (default) - Latest and most capable model, best for complex planning
  • gemini-2.0-flash-exp - Faster experimental model, good for quick interactions
  • gemini-1.5-pro - Previous generation, reliable and well-tested
  • gemini-1.5-flash - Optimized for speed and efficiency
# Use via CLI flag
codeplot plan --model gemini-2.0-flash-exp

# Or set environment variable
export GEMINI_MODEL="gemini-2.0-flash-exp"
codeplot plan

How It Works

  1. Repository Packing: The tool uses repomix to create a comprehensive view of your codebase
  2. AI Analysis: Gemini 2.5 Pro analyzes your codebase structure and technologies
  3. Interactive Planning: The AI asks focused questions to understand your feature requirements
  4. ADR Generation: Creates a structured Architecture Decision Record with implementation plan

Example Session

$ codeplot plan

📊  Codeplot
AI-powered feature planning and architecture decisions

📦 Step 1: Packing repository with repomix...
✅ Repository packed successfully

🤖 Step 2: Initializing AI with codebase analysis...
✅ AI initialized and ready

🤖 AI Analysis:
I can see this is a Node.js project using Express.js with a typical MVC structure...

💬 Step 3: Interactive feature planning session
? What feature would you like to build? User authentication system

🤖 AI:
I understand you want to build a user authentication system. Let me ask some clarifying questions:

What type of authentication would you prefer?
1. JWT-based authentication (recommended for APIs)
2. Session-based authentication (traditional web apps)
3. OAuth integration (Google, GitHub, etc.)

My recommendation: JWT-based authentication as it fits well with your existing API structure.

? Your response: JWT-based authentication

🤖 AI:
Great choice! Now, what user information do you need to store?
1. Basic (email, password)
2. Profile data (name, avatar, preferences)
3. Role-based access control

? Your response: Basic email and password with role-based access

...

📝 Step 4: Generating Architecture Decision Record...
✅ ADR generated successfully

🎉 Feature planning completed!
ADR saved to: ./docs/adrs/2025-06-27-user-authentication-system.md

System Prompt

The AI uses a carefully crafted system prompt that focuses on:

  • Software architecture and technical implementation
  • One clarifying question at a time
  • Providing options with recommendations
  • Generating comprehensive ADRs with implementation plans
  • Identifying trade-offs in implementation choices

Output Structure

Generated ADRs follow this structure:

  • Status: Proposed/Accepted/Rejected
  • Context: Background and motivation
  • Decision: The architectural choice made
  • Consequences: Trade-offs and implications
  • Implementation Plan: Step-by-step technical plan
  • Alternatives Considered: Other options and why they were rejected

Development

With Volta (Recommended)

This project uses Volta to pin Node.js and npm versions. When you enter the project directory, Volta will automatically switch to the correct versions (Node.js 22.17.0 LTS, npm 10.9.2).

Running in Development Mode

npm run dev

Available Scripts

  • npm run dev - Run with file watching
  • npm run test - Run tests
  • npm run test:watch - Run tests in watch mode
  • npm run test:coverage - Run tests with coverage
  • npm run lint - Run ESLint
  • npm run lint:fix - Fix ESLint issues
  • npm run format - Format code with Prettier
  • npm run format:check - Check code formatting
  • npm run validate - Run all checks (lint, format, test)

Troubleshooting

repomix not found

The tool will automatically install repomix if it's missing. If you encounter issues:

npm install -g repomix

adr-tools not found

ADRs will still be generated without adr-tools, but for proper ADR management:

# npm
npm install -g adr-tools

# or macOS with Homebrew
brew install adr-tools

API Rate Limits

If you hit Gemini API rate limits, the tool will show appropriate error messages. Consider:

  • Using shorter sessions
  • Spreading usage over time
  • Checking your API quota

License

MIT