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

ai-code-assistant

v1.0.0

Published

AI coding assistant with configurable providers and project context

Readme

🤖 AI Coding Assistant

Never hit API rate limits again

Seamless AI coding with automatic failover across 15+ free AI providers.

npm version License: MIT PRs Welcome

A terminal-based AI coding assistant that automatically switches between multiple AI providers whenever one becomes unavailable or rate-limited.

Zero cost. Zero interruptions. Maximum productivity.


✨ Features

| Feature | Description | | ----------------------- | --------------------------------------------------------- | | 🔄 Auto Failover | Automatically switches providers when rate limits are hit | | 🧠 Persistent Context | Remembers conversations across sessions | | 📦 Large Prompt Support | Handles prompts with thousands of lines | | 🆓 Free to Use | Leverages free tiers from multiple providers | | 🚀 Unlimited Workflow | Continue working even when providers throttle requests | | 💬 Dual Mode | General Chat + Coding Assistant modes | | 🔧 Project Operations | Read files, analyze code, execute commands | | 📊 Smart Routing | Tracks provider health and prioritizes working services | | 🔒 Privacy First | Context stored locally in Markdown files |


🎯 Why This Exists

Most AI coding tools depend on a single provider.

When that provider:

  • Hits rate limits
  • Goes down
  • Becomes slow
  • Exceeds free quotas

your workflow stops.

AI Coding Assistant solves this problem by automatically rotating between multiple providers behind the scenes.

Example

User Request
      │
      ▼
Groq ❌ Rate Limited
      │
      ▼
Gemini ❌ Temporary Error
      │
      ▼
Cohere ✅ Success
      │
      ▼
Response Returned

You never see the failover process—it just works.


📦 Installation

Global Installation

npm install -g ai-code-assistant

Run Without Installing

npx ai-code-assistant

Install From Source

git clone https://github.com/PraveenMistry/ai-code-assistant.git

cd ai-code-assistant

npm install

npm link

🚀 Quick Start

1. Run Setup Wizard

ai-code --setup

2. Select Providers

Choose providers such as:

  • Groq
  • Gemini
  • Cohere
  • Hugging Face
  • OpenRouter

3. Enter API Keys

The wizard will guide you through configuration.

4. Start Coding

ai-code

💻 Usage

General Chat Mode (Default)

💻 > What is the capital of France?

💻 > Explain quantum computing in simple terms

💻 > Tell me a joke

💻 > How do I learn Python?

Coding Mode

Switch modes anytime:

💻 > mode

🎭 Mode switched to: CODING MODE

Examples:

💻 > create a React Button component

💻 > fix the bug in server.js

💻 > add error handling to the API

💻 > write unit tests for auth module

Working With Your Project

💻 > analyze

Analyze project structure and requirements.

💻 > list

List all project files.

💻 > read package.json

Read a specific file.

💻 > context

Show conversation history.


🧩 Commands

General Commands

| Command | Description | | ------- | ----------------------------------- | | help | Show help and examples | | mode | Switch between Chat and Coding mode | | context | View conversation history | | clear | Clear current session | | stats | Show provider performance | | exit | Save session and quit |


Coding Commands

| Command | Description | | ----------- | ------------------------- | | analyze | Analyze project structure | | list | List project files | | read | Read file contents |


🔑 Supported Providers

| # | Provider | Free Tier | Status | | - | ------------ | -------------------- | ------------- | | 1 | Groq | 10K tokens/min | ✅ Fastest | | 2 | Gemini | 60 requests/min | ✅ Recommended | | 3 | Cohere | 100K tokens/month | ✅ Stable | | 4 | Hugging Face | 30K tokens/day | ✅ Good | | 5 | OpenRouter | 20 req/min + credits | ⚠️ Limited | | 6 | Cerebras | Unlimited | ⚠️ API Issues | | 7 | Together AI | Free credits | ⚠️ Limited | | 8 | DeepInfra | 10K tokens/day | ⚠️ Limited | | 9 | Lepton AI | 100 req/day | ⚠️ Limited |

Recommended Setup

For best reliability:

1. Groq
2. Gemini
3. Cohere

⚙️ Configuration

Environment Variables (.env)

# Groq
GROQ_API_KEY=gsk_xxxxxxxxx
GROQ_MODEL=mixtral-8x7b-32768
GROQ_PRIORITY=1
GROQ_ENABLED=true

# Gemini
GEMINI_API_KEY=xxxxxxxxx
GEMINI_MODEL=gemini-1.5-flash
GEMINI_PRIORITY=2
GEMINI_ENABLED=true

# Cohere
COHERE_API_KEY=xxxxxxxxx
COHERE_MODEL=command
COHERE_PRIORITY=3
COHERE_ENABLED=true

# Project
PROJECT_PATH=/path/to/project
TRD_PATH=/path/to/requirements.md

# Context
MAX_RESPONSE_TOKENS=2048
MAX_CONTEXT_CHARS=6000
MAX_HISTORY_MESSAGES=10

Setup Wizard

Run:

ai-code --setup

The wizard will:

  • Detect existing configuration
  • Allow reset or reuse
  • Configure providers
  • Add API keys
  • Set project paths
  • Save preferences

📁 Project Structure

your-project/
│
├── .ai-context/
│   ├── session.md
│   ├── history/
│   └── prompts/
│
├── .env
│
└── source files...

💡 Tips

Get Free API Keys

| Provider | URL | Setup Time | | -------- | ------------------------------------- | ---------- | | Groq | https://console.groq.com/keys | ~1 min | | Gemini | https://aistudio.google.com/apikey | ~1 min | | Cohere | https://dashboard.cohere.com/api-keys | ~2 min |


Check Provider Health

💻 > stats

Clear Context

💻 > clear

🧹 Session cleared!

Useful when switching projects or topics.


🔧 Troubleshooting

No Valid Providers Configured

ai-code --setup

or

npm run setup

Provider Failed

Enable multiple providers:

GROQ_ENABLED=true
GEMINI_ENABLED=true

Keyboard Stops Responding

If a provider hangs:

Ctrl + C

Restart the application.


Disable Failing Provider

OPENROUTER_ENABLED=false

📊 Performance

| Provider | Avg Response Time | Success Rate | | -------- | ----------------- | ------------ | | Groq | ~500ms | 99% | | Gemini | ~1200ms | 98% | | Cohere | ~2000ms | 95% |


🛣️ Roadmap

Completed

  • ✅ Auto failover
  • ✅ Multi-provider support
  • ✅ Interactive CLI
  • ✅ Persistent context
  • ✅ Dual mode support

Coming Soon

  • 🔄 Ollama / Local Models
  • 🔌 VS Code Extension
  • 🌐 Web Dashboard
  • 🎙 Voice Commands
  • 📈 Advanced Analytics

🤝 Contributing

git clone https://github.com/PraveenMistry/ai-code-assistant.git

cd ai-code-assistant

npm install

npm run setup

npm start

Pull requests are welcome.


📄 License

MIT License

Feel free to use, modify, distribute, and contribute.


Built with ❤️ for developers who hate rate limits

⚡ Type mode to switch between Chat and Coding Mode ⚡