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 (@jayjiang/open-cc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Open CC
An AI coding assistant CLI tool for the terminal, with multi-provider LLM support (50+ providers including Anthropic, OpenAI, GitHub Copilot, Google Vertex AI, DeepSeek, and more).
Install
npm install -g @jayjiang/open-ccOr with Bun:
bun install -g @jayjiang/open-ccSetup
Option 1: Interactive /connect (Recommended)
Launch Open CC and use the /connect command to pick a provider and authenticate:
opencc
# Then type: /connectSupports 50+ providers dynamically loaded from models.dev, including:
Popular: Anthropic, GitHub Copilot, OpenAI, Google, OpenRouter, Kimi, Zhipu AI, MiniMax
International: Mistral, Groq, xAI, Cohere, Perplexity, Together AI, Fireworks, DeepInfra, Cerebras
China: DeepSeek, Qwen, Moonshot, Doubao, Baichuan, Hunyuan, ERNIE, SenseTime, and more
Google Vertex AI
Vertex AI uses Google Cloud Application Default Credentials (ADC). The /connect flow guides you through:
- Checks that
gcloudCLI is installed - Prompts for GCP project ID and region
- Verifies ADC credentials (runs
gcloud auth application-default loginif needed) - Available models: Gemini 3.1 Pro, 3.1 Flash Lite, 3 Flash, 2.5 Flash, 2.5 Pro
# Pre-requisite: install gcloud CLI and authenticate
gcloud auth application-default login
# Then in Open CC:
/connect # Select "Google Vertex AI"Option 2: Environment Variable
Set your API key for any provider:
# Anthropic (default)
export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI
export OPENAI_API_KEY="sk-..."
# DeepSeek
export DEEPSEEK_API_KEY="sk-..."
# GitHub Copilot (use gh CLI token)
# Authenticate via /connect in the app
# See presets.ts for all supported env var namesOption 3: Settings File
Edit ~/.open-cc/settings.json:
{
"connectedProvider": "openai",
"model": "gpt-4o",
"providers": {
"openai": {
"auth": { "type": "api-key", "key": "sk-..." }
}
}
}Usage
# Interactive REPL
opencc
# Pipe mode (non-interactive)
echo "explain this error" | opencc -p
# Resume last session
opencc --resumeProvider Commands
# Inside the REPL:
/connect # Switch provider (search, Popular/Other groups)
/model # Switch model for current providerFeatures
- Interactive REPL terminal UI (React + Ink)
- 50+ LLM providers via OpenAI-compatible adapter + models.dev catalog
/connectcommand with search, Popular/Other grouping, OAuth support- GitHub Copilot OAuth device code flow
- Google Vertex AI with Application Default Credentials (ADC)
- Streaming conversations with tool calls
- File read, write, edit, and search tools
- Shell command execution with sandbox support
- Sub-agent dispatching
- MCP Server integration
- Session resume and compaction
- Permission management system
- Hook system for automation
- Skills / slash commands
Configuration
Global config lives at ~/.open-cc/:
| Path | Purpose |
|---|---|
settings.json |
Global settings (provider, model, auth, etc.) |
sessions/ |
Session history |
memory/ |
Persistent memory files |
cache/models.json |
Cached models.dev provider catalog |
Project-level config: place a CLAUDE.md in your project root.
Development
Prerequisites
- Bun >= 1.2.0
Commands
bun install # Install dependencies
bun run dev # Dev mode (direct execution)
bun run build # Build to dist/
bun run lint # Lint (Biome)
bun run lint:fix # Auto-fix lint issues
bun run format # Format source
bun test # Run tests
bun run health # Health check (lint + tests + build)Adding a New Provider
See the integration guides for pitfalls and checklists:
- Multi-Provider Integration Guide (GitHub Copilot)
- Vertex AI Integration Guide (Google Cloud ADC)
Tech Stack
- Runtime: Bun
- UI: React + Ink (terminal rendering)
- CLI: Commander.js
- API: Multi-provider (Anthropic SDK + OpenAI-compatible adapter)
- Provider Catalog: models.dev (50+ providers, auto-refreshed)
- Build: Bun.build() with code splitting
License
Proprietary - See LICENSE