Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vdntio/clai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
clAI
⚠️ Alpha Release: This is an early alpha version. Expect bugs and breaking changes.
AI-powered CLI that converts natural language instructions into executable shell commands using OpenRouter.
Example
clai "find all TypeScript files modified in the last 7 days"
# Outputs: find . -name "*.ts" -mtime -7
clai "list top 10 largest files in current directory"
# Outputs: du -h * | sort -rh | head -10Features
- 🤖 Natural language to shell commands using AI
- 🎨 Beautiful terminal UI with Ink
- 🔒 Safety checks for dangerous commands (rm -rf, etc.)
- 📝 Context-aware (current directory, shell type, git status)
- ⚡ Fast startup with Bun runtime
- 🌍 Cross-platform (Linux, macOS, Windows)
Installation
npm (Recommended)
npm install -g clai@alphaStandalone Binary
Download from Releases
See Installation Guide for detailed instructions.
Quick Start
Get an OpenRouter API key from openrouter.ai
Set your API key:
export OPENROUTER_API_KEY="your-key-here"
Run a command:
clai "your natural language instruction"
Configuration
clAI uses TOML config files. Priority order:
./.clai.toml(project-level)~/.config/clai/config.toml(user-level)/etc/clai/config.toml(system-level)
Example config:
openrouter_api_key = "sk-..."
[providers.openrouter]
model = "qwen/qwen3-coder" # Default model (can override with anthropic/claude-3.5-sonnet, etc.)
[safety]
confirm_dangerous = trueDevelopment
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run tests
bun test
# Build
bun run buildOpenRouter Costs
clAI uses OpenRouter's API which charges per token. Default model is qwen/qwen3-coder (free tier available). You can override to use other models like anthropic/claude-3.5-sonnet (~$3 per million input tokens). Get credits at openrouter.ai.
License
MIT - See LICENSE for details.
Issues & Feedback
Report bugs or request features at GitHub Issues.