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

cli-copilot

v0.0.8

Published

AI-powered coding assistant for the terminal.

Downloads

18

Readme

CLI Copilot

CLI Copilot is an AI-powered command-line assistant designed to enhance your development workflow. It provides features like AI-powered chat, workspace insights, and file debugging directly from your terminal.

Prerequisites

Before using CLI Copilot, ensure that you have stored your OpenAI API key in a .env file with the following variable name:

OPENAI_API_KEY=your-api-key-here

Features

  • AI Chat: Engage in interactive AI-powered conversations.
  • Workspace Indexing: Index your project files for AI-powered insights.
  • Workspace Queries: Ask questions about your indexed workspace.
  • AI Debugging: Analyze and debug specific JavaScript files.

Installation

Install CLI Copilot globally via npm:

npm install -g cli-copilot

Usage

CLI Copilot provides various commands to assist developers. Below is the detailed documentation of each command.

1️⃣ Start AI Chat

Use this command to start an AI-powered coding chat in the terminal:

cli-copilot chat

💡 Example:

> cli-copilot chat
🔹 AI Chat Mode Activated. Type 'exit' to quit.
> How do I create an async function in JavaScript?
💡 AI Response:
┌───────────────────────────────────────────────────┐
│ You can create an async function using the `async`│
│ keyword before the function definition. Example:  │
│ async function fetchData() {                      │
│   const response = await fetch('https://api...');│
│   return await response.json();                  │
│ }                                                │
└───────────────────────────────────────────────────┘

2️⃣ Index Workspace

Index your entire project or a specific file for workspace-based AI queries.

Index the entire workspace

cli-copilot index

Index a specific file

cli-copilot index src/app.js

💡 Example Output:

📂 Indexing workspace...
✅ Workspace indexed successfully!

📌 Note: Indexing generates a .workspace_index.json file, used for workspace queries.

3️⃣ Query Workspace

Ask questions about your indexed workspace.

cli-copilot workspace "How does authentication work?"

💡 Example Output:

🔍 Fetching AI-powered insights from workspace...
💡 AI Response:
┌───────────────────────────────────────────────────┐
│ Your authentication system is implemented in     │
│ `auth.js`. It verifies JWT tokens and manages    │
│ user sessions using Express middleware.          │
└───────────────────────────────────────────────────┘

📌 Note: This command requires the workspace to be indexed first.

4️⃣ Debug a File

Debug a specific JavaScript file using AI analysis.

cli-copilot debug src/utils.js

💡 Example Output:

🐞 Debugging file: src/utils.js...
🤖 Analyzing file for potential issues...
💡 Debugging Report:
┌───────────────────────────────────────────────────┐
│ ❌ Error in line 23: `user` is undefined.        │
│ 🛠️ Fix: Ensure `user` is defined before accessing│
│ `user.name`. Consider adding a null check.       │
└───────────────────────────────────────────────────┘

📌 Note: Debugging does NOT require workspace indexing.

Summary of Commands

| Command | Description | |---------|-------------| | cli-copilot chat | Start an AI-powered coding chat. | | cli-copilot index | Index the entire workspace for AI analysis. | | cli-copilot index <filepath> | Index a specific file for AI analysis. | | cli-copilot workspace "<query>" | Query AI about the indexed workspace. | | cli-copilot debug <filepath> | Debug a specific file. |

Future Enhancements

  • ✅ AI-powered code refactoring suggestions.
  • ✅ Enhanced debugging with suggested fixes.

License

This project is licensed under the MIT License.


🚀 Start coding smarter with CLI Copilot!

Demo Video : https://youtu.be/MaYEdmUtNRU