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

forge-ai-pro

v1.0.8

Published

Production-grade AI CLI

Readme

ForgeAI ⚡

Production-grade AI CLI for developers powered by OpenRouter.

Node.js License CLI AI

ForgeAI is a terminal-based AI assistant that helps developers explain code, debug issues, summarize files, generate content, and chat with AI directly from the command line.

It is designed to be fast, minimal, and developer-friendly.


⚡ Quick Demo

# Explain a file directly from terminal
node bin/index.js explain src/index.js

# Debug an error from a file
node bin/index.js debug server.js

# Summarize a large documentation file
node bin/index.js summarize docs/readme.txt

# Analyze entire project architecture
node bin/index.js analyze ./my-project

# Start interactive AI chat
node bin/index.js chat

🐞 Debug Output Example

🤖 Forge AI:

● Bug Detected: Missing return statement in calculateTotal()
● Root Cause: Function computes value but never returns it — always resolves to undefined
● Fix Applied:

  function calculateTotal(price, tax) {
    return price + (price * tax);
  }

● Pattern: Pure function — deterministic, no side effects
● Tip: Always validate return paths in functions with conditional branches

🧠 Explain Output Example

🤖 Forge AI:

● Purpose: Implements JWT-based authentication middleware for Express.js
● Key Logic:
  1. Extracts Bearer token from Authorization header
  2. Verifies token signature using secret key
  3. Attaches decoded user payload to req.user
  4. Calls next() to pass control to the next middleware

● Pattern: Middleware chain — separation of concerns
● Real World Use: Protecting private API routes in production REST APIs

📁 Analyze Output Example

🤖 Forge AI:

● Project: E-Commerce REST API
● Architecture: MVC — Models, Controllers, Routes separated cleanly
● Main Components:
  1. server.js        → Entry point, Express setup, middleware registration
  2. routes/          → All API route definitions
  3. controllers/     → Business logic handlers
  4. models/          → Mongoose schema definitions
  5. middleware/       → Auth, error handling, request validation

● Tech Stack Detected: Node.js, Express, MongoDB, JWT
● Observations:
  - No centralized error handler found — recommend adding one
  - Config values hardcoded in files — recommend using dotenv

🚀 Features

⚡ Explain code instantly 🐞 Debug errors with AI assistance 🧠 Summarize large files or text 💬 Interactive AI chat 🧾 Generate technical content or code 📂 Analyze entire project folders 📝 Export AI conversation history 🎨 Beautiful CLI interface with colored output


🛠 Tech Stack

  • Node.js
  • OpenRouter API
  • Inquirer (CLI prompts)
  • Ora (loading spinners)
  • Chalk (terminal colors)
  • Boxen (styled terminal output)
  • CLI Highlight (code syntax highlighting)
  • Figlet (ASCII banners)

📦 Installation

Clone the repository:

git clone https://github.com/asyncAdarsh17/ForgeAI.git
cd ForgeAI

Install dependencies:

npm install

▶️ Run the CLI

node bin/index.js

On first run, Forge AI will automatically ask for your OpenRouter API key and save it. You only need to do this once.

Get your free API key from: https://openrouter.ai


⚡ Command Mode

ForgeAI supports direct commands for quick usage.

Explain a file:

node bin/index.js explain index.js

Debug a file:

node bin/index.js debug server.js

Summarize a file:

node bin/index.js summarize notes.txt

Analyze a project folder:

node bin/index.js analyze ./my-project

Start AI chat:

node bin/index.js chat

🧠 Interactive Mode

Run ForgeAI without arguments to open the interactive CLI menu:

node bin/index.js

You will see options like:

⚡ Explain Code (paste)
📂 Explain a File
⚡ Summarize Text (paste)
📂 Summarize a File
⚡ Debug Errors (paste)
📂 Debug a File
📁 Analyze Project Folder
⚡ Generate Content
⚡ Chat with AI
📥 Export Full History
❌ Exit

🔑 OpenRouter Setup

ForgeAI uses OpenRouter to access AI models.

On first run the CLI will automatically ask for your API key and save it.

You can get an API key from: https://openrouter.ai


📁 Project Structure

ForgeAI
│
├── bin
│   └── index.js
│
├── src
│   ├── core
│   │   └── openrouter.js
│   │
│   ├── features
│   │   ├── analyze.js
│   │   ├── chat.js
│   │   ├── debug.js
│   │   ├── explain.js
│   │   ├── generate.js
│   │   └── summarize.js
│   │
│   ├── setup
│   │   └── firstRun.js
│   │
│   ├── storage
│   │   ├── config.js
│   │   ├── exporter.js
│   │   ├── fileReader.js
│   │   ├── history.js
│   │   └── paths.js
│   │
│   └── ui
│       ├── banner.js
│       └── printer.js
│
├── package.json
├── package-lock.json
└── .gitignore

📤 Export History

ForgeAI stores interaction history so users can export AI responses.

You can export:

  • Last generated result
  • Full conversation history

This allows saving AI explanations, debugging output, or generated code.


👨‍💻 Author

Adarsh Landge

GitHub: https://github.com/asyncAdarsh17


📜 License

MIT License


⭐ If you like this project, consider starring the repository.