中文文档 | Contributing | Documentation
2025-12-22: npm + optionalDependencies distribution (all platforms). Kode prefers the per-platform native binary package (@shareai-lab/kode-bin-*) with Node.js as a fallback; standalone binaries are also published on GitHub Releases. See docs/binary-distribution.md.
Kode supports the AGENTS.md standard: a simple, open format for guiding coding agents, used by 60k+ open-source projects.
.claude compatibility - Reads .claude directories and CLAUDE.md when present (see docs/compatibility.md)Use # Your documentation request to generate and maintain your AGENTS.md file automatically, while preserving compatibility with existing .claude workflows.
AGENTS.override.md over AGENTS.md (at most one file per directory).KODE_PROJECT_DOC_MAX_BYTES).CLAUDE.md exists in the current directory, Kode also reads it as a legacy instruction file.Kode is a powerful AI assistant that lives in your terminal. It can understand your codebase, edit files, run commands, and handle entire workflows for you.
⚠️ Security Notice: Kode runs in YOLO mode by default (equivalent to the
--dangerously-skip-permissionsflag), bypassing all permission checks for maximum productivity. YOLO mode is recommended only for trusted, secure environments when working on non-critical projects. If you're working with important files or using models of questionable capability, we strongly recommend usingkode --safeto enable permission checks and manual approval for all operations.📊 Model Performance: For optimal performance, we recommend using newer, more capable models designed for autonomous task completion. Avoid older Q&A-focused models like GPT-4o or Gemini 2.5 Pro, which are optimized for answering questions rather than sustained independent task execution. Choose models specifically trained for agentic workflows and extended reasoning capabilities.
WebFetch, WebSearch)autoUpdaterStatus: enabled)@ask-model-name to consult specific AI models for specialized analysis@run-agent-name to delegate tasks to specialized subagentsOption+G (Alt+G) opens your message in your preferred editor (respects $EDITOR/$VISUAL; falls back to code/nano/vim/notepad) and returns the text to the prompt when you close it.Option+Enter inserts a newline inside the prompt without sending; plain Enter submits. Option+M cycles the active model.The prompt completes slash commands, file paths, agents, configured models, and
available shell commands. Fuzzy and abbreviation matching help surface relevant
entries without requiring an exact prefix; accepting an agent or model result
adds the required @ prefix.
AGENTS.md and compatible instruction files when presentnpm install -g @shareai-lab/kode
🇨🇳 For users in China: If you encounter network issues, use a mirror registry:
npm install -g @shareai-lab/kode --registry=https://registry.npmmirror.comKode uses ripgrep (
rg) for fast search. By default it is installed via per-platformoptionalDependencies(@shareai-lab/kode-ripgrep-<platform>-<arch>). If you install with--no-optional, install systemrgor setKODE_RIPGREP_PATH.Kode also ships an optional per-platform native CLI binary via
optionalDependencies(@shareai-lab/kode-bin-<platform>-<arch>). If you install with--no-optional/--omit=optional, it runs via the Node.js entry (dist/index.js).Kode does not download anything from GitHub during install. (The optional standalone binaries live on GitHub Releases, separate from npm.)
Dev channel (latest features):
npm install -g @shareai-lab/kode@dev
After installation, you can use any of these commands:
kode - Primary commandkwa - Kode With Agent (alternative)kd - Ultra-short aliasFor users who prefer a “portable” executable (no npm install), download the Bun-compiled asset from GitHub Releases:
See docs/binary-distribution.md for details (asset names, local build).
~/.kode.json (or <KODE_CONFIG_DIR>/config.json when KODE_CONFIG_DIR is set)../.kode/settings.json and ./.kode/settings.local.json (legacy .claude is supported for some features)./model (UI) or kode models import/export (YAML). Details: docs/develop/configuration.md.Start an interactive session:
kode
# or
kwa
# or
kd
Get a quick response:
kode -p "explain this function" path/to/file.js
# or
kwa -p "explain this function" path/to/file.js
Run Kode as an ACP agent server (stdio JSON-RPC), for clients like Toad/Zed:
kode-acp
# or
kode --acp
Toad example:
toad acp "kode-acp"
More: docs/acp.md.
Kode supports a powerful @ mention system for intelligent completions:
# Consult specific AI models for expert opinions
@ask-claude-sonnet-4 How should I optimize this React component for performance?
@ask-gpt-5 What are the security implications of this authentication method?
@ask-o1-preview Analyze the complexity of this algorithm
# Delegate tasks to specialized subagents
@run-agent-simplicity-auditor Review this code for over-engineering
@run-agent-architect Design a microservices architecture for this system
@run-agent-test-writer Create comprehensive tests for these modules
# Reference files and directories with auto-completion
@packages/core/src/query/index.ts
@docs/README.md
@.env.example
The @ mention system provides intelligent completions as you type, showing available models, agents, and files.
Kode can connect to MCP servers to extend tools and context.
.mcp.json (recommended) or .mcprc in your project root. See docs/mcp.md.kode mcp add
kode mcp list
kode mcp get <name>
kode mcp remove <name>
Example .mcprc:
{
"my-sse-server": { "type": "sse", "url": "http://127.0.0.1:3333/sse" }
}
kode --safe requires approval for Bash commands and file writes/edits.@path mentions automatically (quoted when needed).Ctrl+V to attach clipboard images; you can paste multiple images before sending.KODE_SYSTEM_SANDBOX=1), agent-triggered Bash tool calls try to run inside a bwrap sandbox when available.KODE_SYSTEM_SANDBOX_NETWORK=inherit to allow network.KODE_SYSTEM_SANDBOX=required to fail closed if sandbox cannot be started.docs/system-sandbox.md for details and platform notes./model, or kode models import kode-models.yaml, and ensure required API key env vars exist.kode mcp list to check server status; tune MCP_CONNECTION_TIMEOUT_MS, MCP_SERVER_CONNECTION_BATCH_SIZE, and MCP_TOOL_TIMEOUT if servers are slow.bwrap (bubblewrap) on Linux, or set KODE_SYSTEM_SANDBOX=0 to disable.Use the # prefix to generate and maintain your AGENTS.md documentation:
# Generate setup instructions
# How do I set up the development environment?
# Create testing documentation
# What are the testing procedures for this project?
# Document deployment process
# Explain the deployment pipeline and requirements
This mode automatically formats responses as structured documentation and appends them to your AGENTS.md file.
# Clone the repository
git clone https://github.com/shareAI-lab/Kode-CLI.git
cd Kode
# Build the image locally
docker build --no-cache -t kode .
# Run in your project directory
cd your-project
docker run -it --rm \
-v "$PWD:/workspace" \
-v "$HOME/.kode:/home/node/.kode" \
-v "$HOME/.kode.json:/home/node/.kode.json" \
-w /workspace \
kode
The Docker setup includes:
Volume Mounts:
$PWD:/workspace - Mounts your current project directory$HOME/.kode:/home/node/.kode - Preserves your Kode data between runs$HOME/.kode.json:/home/node/.kode.json - Preserves your global configurationWorking Directory: Set to /workspace inside the container
Interactive Mode: Uses -it flags for interactive terminal access
Cleanup: --rm flag removes the container after exit
Note: The image runs as the unprivileged node user. Create the two host
configuration paths before mounting them if they do not already exist.
The first time you run the Docker command, it will build the image. Subsequent runs will use the cached image for faster startup.
You can use the onboarding to set up the model, or /model.
If you don't see the models you want on the list, you can manually set them in /config
As long as you have an openai-like endpoint, it should work.
/help - Show available commands/model - Change AI model settings/config - Open configuration panel/agents - Manage subagents/output-style - Set the output style/statusline - Configure a custom status line command/cost - Show token usage and costs/clear - Clear conversation history/init - Initialize project context/plugin - Manage plugins/marketplaces (skills, commands)Kode supports subagents (agent templates) for delegation and task orchestration.
.kode/agents and .claude/agents (user + project), plus plugins/policy and --agents./agents (creates new agents under ./.kode/agents / ~/.kode/agents by default; legacy .claude/agents is read-compat).@run-agent-<agentType> ...Task(subagent_type: "<agentType>", ...)--agents <json> (inject agents for this run), --setting-sources user,project,local (control which sources are loaded)Minimal agent file example (./.kode/agents/reviewer.md):
---
name: reviewer
description: 'Review diffs for correctness, security, and simplicity'
tools: ['Read', 'Grep']
model: inherit
---
Be strict. Point out bugs and risky changes. Prefer small, targeted fixes.
Model field notes:
inherit, opus, sonnet, haiku (mapped to model pointers)/model): pointers (main|task|compact|quick), profile name, modelName, or provider:modelName (e.g. openai:o3)Validate agent templates:
kode agents validate
See docs/agents-system.md.
Kode supports:
SKILL.md) for reusable skill packs.kode-plugin/marketplace.json, legacy .claude-plugin/marketplace.json) for sharing/installing skill packs# Add a marketplace (local path, GitHub owner/repo, or URL)
kode plugin marketplace add ./path/to/marketplace-repo
kode plugin marketplace add owner/repo
kode plugin marketplace list
# Install a plugin pack (installs skills/commands)
kode plugin install document-skills@anthropic-agent-skills --scope user
# Project-scoped install (writes to ./.kode/...)
kode plugin install document-skills@anthropic-agent-skills --scope project
# Disable/enable an installed plugin
kode plugin disable document-skills@anthropic-agent-skills --scope user
kode plugin enable document-skills@anthropic-agent-skills --scope user
Interactive equivalents:
/plugin marketplace add owner/repo
/plugin install document-skills@anthropic-agent-skills --scope user
/pdf, /xlsx, etc.Skill tool when relevant.Create ./.kode/skills/<skill-name>/SKILL.md (project) or ~/.kode/skills/<skill-name>/SKILL.md (user):
---
name: my-skill
description: Describe what this skill does and when to use it.
allowed-tools: Read Bash(git:*) Bash(jq:*)
---
# Skill instructions
Naming rules:
name must match the folder nameCompatibility:
.claude/skills and .claude/commands for legacy compatibility..kode-plugin/marketplace.json listing plugin packs and their skills directories (legacy .claude-plugin/marketplace.json is also supported)..kode-plugin/plugin.json at the plugin root and keep all paths relative (./...).See docs/skills.md for a compact reference and examples.
Use output styles to switch system-prompt behavior.
/output-style (menu) or /output-style <style>default, Explanatory, Learning./.kode/settings.local.json as outputStyle (legacy .claude/settings.local.json is supported)output-styles/ in .claude/.kode user + project locationsoutput-styles/ (or manifest outputStyles); plugin styles are namespaced as <plugin>:<style>See docs/output-styles.md.
Unlike single-model CLIs, Kode implements true multi-model collaboration, allowing you to fully leverage the unique strengths of different AI models.
We designed a unified ModelManager system that supports:
/model command:
main: Default model for main Agenttask: Default model for SubAgentcompact: Model used for automatic context compression when nearing the context windowquick: Fast model for simple operations and utilitiesYou can export/import model profiles + pointers as a team-shareable YAML file. By default, exports do not include plaintext API keys (use env vars instead).
# Export to a file (or omit --output to print to stdout)
kode models export --output kode-models.yaml
# Import (merge by default)
kode models import kode-models.yaml
# Replace existing profiles instead of merging
kode models import --replace kode-models.yaml
# List configured profiles + pointers
kode models list
Example kode-models.yaml:
version: 1
profiles:
- name: OpenAI Main
provider: openai
modelName: gpt-4o
maxTokens: 8192
contextLength: 128000
apiKey:
fromEnv: OPENAI_API_KEY
pointers:
main: gpt-4o
task: gpt-4o
compact: gpt-4o
quick: gpt-4o
Our specially designed TaskTool (Architect tool) implements:
task pointer by defaultWe specially designed the AskExpertModel tool:
/model Command: Use /model command to configure and manage multiple model profiles, set default models for different purposesArchitecture Design Phase
Solution Refinement Phase
Code Implementation Phase
Problem Solving
# Example 1: Architecture Design
"Use o3 model to help me design a high-concurrency message queue system architecture"
# Example 2: Multi-Model Collaboration
"First use GPT-5 model to analyze the root cause of this performance issue, then use Claude Sonnet 4 model to write optimization code"
# Example 3: Parallel Task Processing
"Use Qwen Coder model as subagent to refactor these three modules simultaneously"
# Example 4: Expert Consultation
"This memory leak issue is tricky, ask Claude Opus 4.1 model separately for solutions"
# Example 5: Code Review
"Have Kimi k2 model review the code quality of this PR"
# Example 6: Complex Reasoning
"Use Grok 4 model to help me derive the time complexity of this algorithm"
# Example 7: Solution Design
"Have GLM-4.5 model design a microservice decomposition plan"
// Example of multi-model configuration support
{
"modelProfiles": [
{ "name": "o3", "provider": "openai", "modelName": "o3", "apiKey": "...", "maxTokens": 1024, "contextLength": 128000, "isActive": true, "createdAt": 1710000000000 },
{ "name": "qwen", "provider": "alibaba", "modelName": "qwen-coder", "apiKey": "...", "maxTokens": 1024, "contextLength": 128000, "isActive": true, "createdAt": 1710000000001 }
],
"modelPointers": {
"main": "o3", // Main conversation model
"task": "qwen-coder", // Sub-agent model
"compact": "o3", // Context compression model
"quick": "o3" // Quick operations model
}
}
/cost command to view token usage and costs for each model| Feature | Kode | Single-model CLI |
|---|---|---|
| Number of Supported Models | Unlimited, configurable for any model | Only supports one model |
| Model Switching | ✅ Option+M quick switch | ❌ Requires session restart |
| Parallel Processing | ✅ Multiple SubAgents work in parallel | ❌ Single-threaded processing |
| Cost Tracking | ✅ Separate statistics for multiple models | ❌ Single model cost |
| Task Model Configuration | ✅ Different default models for different purposes | ❌ Same model for all tasks |
| Expert Consultation | ✅ AskExpertModel tool | ❌ Not supported |
This multi-model collaboration capability makes Kode a true AI Development Workbench, not just a single AI assistant.
Kode is built with modern tools and requires Bun for development.
# macOS/Linux
curl -fsSL https://bun.sh/install | bash
# Windows
powershell -c "irm bun.sh/install.ps1 | iex"
# Clone the repository
git clone https://github.com/shareAI-lab/Kode-CLI.git
cd kode
# Install dependencies
bun install --frozen-lockfile
# Run in development mode
bun run dev
bun run build
# Run tests
bun test
# Test the CLI
./cli.js --help
We welcome contributions! Please see our Contributing Guide for details.
Apache 2.0 License - see LICENSE for details.
TypeScript
97.7%
JavaScript
1.6%
中文文档 | Contributing | Documentation
2025-12-22: npm + optionalDependencies distribution (all platforms). Kode prefers the per-platform native binary package (@shareai-lab/kode-bin-*) with Node.js as a fallback; standalone binaries are also published on GitHub Releases. See docs/binary-distribution.md.
Kode supports the AGENTS.md standard: a simple, open format for guiding coding agents, used by 60k+ open-source projects.
.claude compatibility - Reads .claude directories and CLAUDE.md when present (see docs/compatibility.md)Use # Your documentation request to generate and maintain your AGENTS.md file automatically, while preserving compatibility with existing .claude workflows.
AGENTS.override.md over AGENTS.md (at most one file per directory).KODE_PROJECT_DOC_MAX_BYTES).CLAUDE.md exists in the current directory, Kode also reads it as a legacy instruction file.Kode is a powerful AI assistant that lives in your terminal. It can understand your codebase, edit files, run commands, and handle entire workflows for you.
⚠️ Security Notice: Kode runs in YOLO mode by default (equivalent to the
--dangerously-skip-permissionsflag), bypassing all permission checks for maximum productivity. YOLO mode is recommended only for trusted, secure environments when working on non-critical projects. If you're working with important files or using models of questionable capability, we strongly recommend usingkode --safeto enable permission checks and manual approval for all operations.📊 Model Performance: For optimal performance, we recommend using newer, more capable models designed for autonomous task completion. Avoid older Q&A-focused models like GPT-4o or Gemini 2.5 Pro, which are optimized for answering questions rather than sustained independent task execution. Choose models specifically trained for agentic workflows and extended reasoning capabilities.
WebFetch, WebSearch)autoUpdaterStatus: enabled)@ask-model-name to consult specific AI models for specialized analysis@run-agent-name to delegate tasks to specialized subagentsOption+G (Alt+G) opens your message in your preferred editor (respects $EDITOR/$VISUAL; falls back to code/nano/vim/notepad) and returns the text to the prompt when you close it.Option+Enter inserts a newline inside the prompt without sending; plain Enter submits. Option+M cycles the active model.The prompt completes slash commands, file paths, agents, configured models, and
available shell commands. Fuzzy and abbreviation matching help surface relevant
entries without requiring an exact prefix; accepting an agent or model result
adds the required @ prefix.
AGENTS.md and compatible instruction files when presentnpm install -g @shareai-lab/kode
🇨🇳 For users in China: If you encounter network issues, use a mirror registry:
npm install -g @shareai-lab/kode --registry=https://registry.npmmirror.comKode uses ripgrep (
rg) for fast search. By default it is installed via per-platformoptionalDependencies(@shareai-lab/kode-ripgrep-<platform>-<arch>). If you install with--no-optional, install systemrgor setKODE_RIPGREP_PATH.Kode also ships an optional per-platform native CLI binary via
optionalDependencies(@shareai-lab/kode-bin-<platform>-<arch>). If you install with--no-optional/--omit=optional, it runs via the Node.js entry (dist/index.js).Kode does not download anything from GitHub during install. (The optional standalone binaries live on GitHub Releases, separate from npm.)
Dev channel (latest features):
npm install -g @shareai-lab/kode@dev
After installation, you can use any of these commands:
kode - Primary commandkwa - Kode With Agent (alternative)kd - Ultra-short aliasFor users who prefer a “portable” executable (no npm install), download the Bun-compiled asset from GitHub Releases:
See docs/binary-distribution.md for details (asset names, local build).
~/.kode.json (or <KODE_CONFIG_DIR>/config.json when KODE_CONFIG_DIR is set)../.kode/settings.json and ./.kode/settings.local.json (legacy .claude is supported for some features)./model (UI) or kode models import/export (YAML). Details: docs/develop/configuration.md.Start an interactive session:
kode
# or
kwa
# or
kd
Get a quick response:
kode -p "explain this function" path/to/file.js
# or
kwa -p "explain this function" path/to/file.js
Run Kode as an ACP agent server (stdio JSON-RPC), for clients like Toad/Zed:
kode-acp
# or
kode --acp
Toad example:
toad acp "kode-acp"
More: docs/acp.md.
Kode supports a powerful @ mention system for intelligent completions:
# Consult specific AI models for expert opinions
@ask-claude-sonnet-4 How should I optimize this React component for performance?
@ask-gpt-5 What are the security implications of this authentication method?
@ask-o1-preview Analyze the complexity of this algorithm
# Delegate tasks to specialized subagents
@run-agent-simplicity-auditor Review this code for over-engineering
@run-agent-architect Design a microservices architecture for this system
@run-agent-test-writer Create comprehensive tests for these modules
# Reference files and directories with auto-completion
@packages/core/src/query/index.ts
@docs/README.md
@.env.example
The @ mention system provides intelligent completions as you type, showing available models, agents, and files.
Kode can connect to MCP servers to extend tools and context.
.mcp.json (recommended) or .mcprc in your project root. See docs/mcp.md.kode mcp add
kode mcp list
kode mcp get <name>
kode mcp remove <name>
Example .mcprc:
{
"my-sse-server": { "type": "sse", "url": "http://127.0.0.1:3333/sse" }
}
kode --safe requires approval for Bash commands and file writes/edits.@path mentions automatically (quoted when needed).Ctrl+V to attach clipboard images; you can paste multiple images before sending.KODE_SYSTEM_SANDBOX=1), agent-triggered Bash tool calls try to run inside a bwrap sandbox when available.KODE_SYSTEM_SANDBOX_NETWORK=inherit to allow network.KODE_SYSTEM_SANDBOX=required to fail closed if sandbox cannot be started.docs/system-sandbox.md for details and platform notes./model, or kode models import kode-models.yaml, and ensure required API key env vars exist.kode mcp list to check server status; tune MCP_CONNECTION_TIMEOUT_MS, MCP_SERVER_CONNECTION_BATCH_SIZE, and MCP_TOOL_TIMEOUT if servers are slow.bwrap (bubblewrap) on Linux, or set KODE_SYSTEM_SANDBOX=0 to disable.Use the # prefix to generate and maintain your AGENTS.md documentation:
# Generate setup instructions
# How do I set up the development environment?
# Create testing documentation
# What are the testing procedures for this project?
# Document deployment process
# Explain the deployment pipeline and requirements
This mode automatically formats responses as structured documentation and appends them to your AGENTS.md file.
# Clone the repository
git clone https://github.com/shareAI-lab/Kode-CLI.git
cd Kode
# Build the image locally
docker build --no-cache -t kode .
# Run in your project directory
cd your-project
docker run -it --rm \
-v "$PWD:/workspace" \
-v "$HOME/.kode:/home/node/.kode" \
-v "$HOME/.kode.json:/home/node/.kode.json" \
-w /workspace \
kode
The Docker setup includes:
Volume Mounts:
$PWD:/workspace - Mounts your current project directory$HOME/.kode:/home/node/.kode - Preserves your Kode data between runs$HOME/.kode.json:/home/node/.kode.json - Preserves your global configurationWorking Directory: Set to /workspace inside the container
Interactive Mode: Uses -it flags for interactive terminal access
Cleanup: --rm flag removes the container after exit
Note: The image runs as the unprivileged node user. Create the two host
configuration paths before mounting them if they do not already exist.
The first time you run the Docker command, it will build the image. Subsequent runs will use the cached image for faster startup.
You can use the onboarding to set up the model, or /model.
If you don't see the models you want on the list, you can manually set them in /config
As long as you have an openai-like endpoint, it should work.
/help - Show available commands/model - Change AI model settings/config - Open configuration panel/agents - Manage subagents/output-style - Set the output style/statusline - Configure a custom status line command/cost - Show token usage and costs/clear - Clear conversation history/init - Initialize project context/plugin - Manage plugins/marketplaces (skills, commands)Kode supports subagents (agent templates) for delegation and task orchestration.
.kode/agents and .claude/agents (user + project), plus plugins/policy and --agents./agents (creates new agents under ./.kode/agents / ~/.kode/agents by default; legacy .claude/agents is read-compat).@run-agent-<agentType> ...Task(subagent_type: "<agentType>", ...)--agents <json> (inject agents for this run), --setting-sources user,project,local (control which sources are loaded)Minimal agent file example (./.kode/agents/reviewer.md):
---
name: reviewer
description: 'Review diffs for correctness, security, and simplicity'
tools: ['Read', 'Grep']
model: inherit
---
Be strict. Point out bugs and risky changes. Prefer small, targeted fixes.
Model field notes:
inherit, opus, sonnet, haiku (mapped to model pointers)/model): pointers (main|task|compact|quick), profile name, modelName, or provider:modelName (e.g. openai:o3)Validate agent templates:
kode agents validate
See docs/agents-system.md.
Kode supports:
SKILL.md) for reusable skill packs.kode-plugin/marketplace.json, legacy .claude-plugin/marketplace.json) for sharing/installing skill packs# Add a marketplace (local path, GitHub owner/repo, or URL)
kode plugin marketplace add ./path/to/marketplace-repo
kode plugin marketplace add owner/repo
kode plugin marketplace list
# Install a plugin pack (installs skills/commands)
kode plugin install document-skills@anthropic-agent-skills --scope user
# Project-scoped install (writes to ./.kode/...)
kode plugin install document-skills@anthropic-agent-skills --scope project
# Disable/enable an installed plugin
kode plugin disable document-skills@anthropic-agent-skills --scope user
kode plugin enable document-skills@anthropic-agent-skills --scope user
Interactive equivalents:
/plugin marketplace add owner/repo
/plugin install document-skills@anthropic-agent-skills --scope user
/pdf, /xlsx, etc.Skill tool when relevant.Create ./.kode/skills/<skill-name>/SKILL.md (project) or ~/.kode/skills/<skill-name>/SKILL.md (user):
---
name: my-skill
description: Describe what this skill does and when to use it.
allowed-tools: Read Bash(git:*) Bash(jq:*)
---
# Skill instructions
Naming rules:
name must match the folder nameCompatibility:
.claude/skills and .claude/commands for legacy compatibility..kode-plugin/marketplace.json listing plugin packs and their skills directories (legacy .claude-plugin/marketplace.json is also supported)..kode-plugin/plugin.json at the plugin root and keep all paths relative (./...).See docs/skills.md for a compact reference and examples.
Use output styles to switch system-prompt behavior.
/output-style (menu) or /output-style <style>default, Explanatory, Learning./.kode/settings.local.json as outputStyle (legacy .claude/settings.local.json is supported)output-styles/ in .claude/.kode user + project locationsoutput-styles/ (or manifest outputStyles); plugin styles are namespaced as <plugin>:<style>See docs/output-styles.md.
Unlike single-model CLIs, Kode implements true multi-model collaboration, allowing you to fully leverage the unique strengths of different AI models.
We designed a unified ModelManager system that supports:
/model command:
main: Default model for main Agenttask: Default model for SubAgentcompact: Model used for automatic context compression when nearing the context windowquick: Fast model for simple operations and utilitiesYou can export/import model profiles + pointers as a team-shareable YAML file. By default, exports do not include plaintext API keys (use env vars instead).
# Export to a file (or omit --output to print to stdout)
kode models export --output kode-models.yaml
# Import (merge by default)
kode models import kode-models.yaml
# Replace existing profiles instead of merging
kode models import --replace kode-models.yaml
# List configured profiles + pointers
kode models list
Example kode-models.yaml:
version: 1
profiles:
- name: OpenAI Main
provider: openai
modelName: gpt-4o
maxTokens: 8192
contextLength: 128000
apiKey:
fromEnv: OPENAI_API_KEY
pointers:
main: gpt-4o
task: gpt-4o
compact: gpt-4o
quick: gpt-4o
Our specially designed TaskTool (Architect tool) implements:
task pointer by defaultWe specially designed the AskExpertModel tool:
/model Command: Use /model command to configure and manage multiple model profiles, set default models for different purposesArchitecture Design Phase
Solution Refinement Phase
Code Implementation Phase
Problem Solving
# Example 1: Architecture Design
"Use o3 model to help me design a high-concurrency message queue system architecture"
# Example 2: Multi-Model Collaboration
"First use GPT-5 model to analyze the root cause of this performance issue, then use Claude Sonnet 4 model to write optimization code"
# Example 3: Parallel Task Processing
"Use Qwen Coder model as subagent to refactor these three modules simultaneously"
# Example 4: Expert Consultation
"This memory leak issue is tricky, ask Claude Opus 4.1 model separately for solutions"
# Example 5: Code Review
"Have Kimi k2 model review the code quality of this PR"
# Example 6: Complex Reasoning
"Use Grok 4 model to help me derive the time complexity of this algorithm"
# Example 7: Solution Design
"Have GLM-4.5 model design a microservice decomposition plan"
// Example of multi-model configuration support
{
"modelProfiles": [
{ "name": "o3", "provider": "openai", "modelName": "o3", "apiKey": "...", "maxTokens": 1024, "contextLength": 128000, "isActive": true, "createdAt": 1710000000000 },
{ "name": "qwen", "provider": "alibaba", "modelName": "qwen-coder", "apiKey": "...", "maxTokens": 1024, "contextLength": 128000, "isActive": true, "createdAt": 1710000000001 }
],
"modelPointers": {
"main": "o3", // Main conversation model
"task": "qwen-coder", // Sub-agent model
"compact": "o3", // Context compression model
"quick": "o3" // Quick operations model
}
}
/cost command to view token usage and costs for each model| Feature | Kode | Single-model CLI |
|---|---|---|
| Number of Supported Models | Unlimited, configurable for any model | Only supports one model |
| Model Switching | ✅ Option+M quick switch | ❌ Requires session restart |
| Parallel Processing | ✅ Multiple SubAgents work in parallel | ❌ Single-threaded processing |
| Cost Tracking | ✅ Separate statistics for multiple models | ❌ Single model cost |
| Task Model Configuration | ✅ Different default models for different purposes | ❌ Same model for all tasks |
| Expert Consultation | ✅ AskExpertModel tool | ❌ Not supported |
This multi-model collaboration capability makes Kode a true AI Development Workbench, not just a single AI assistant.
Kode is built with modern tools and requires Bun for development.
# macOS/Linux
curl -fsSL https://bun.sh/install | bash
# Windows
powershell -c "irm bun.sh/install.ps1 | iex"
# Clone the repository
git clone https://github.com/shareAI-lab/Kode-CLI.git
cd kode
# Install dependencies
bun install --frozen-lockfile
# Run in development mode
bun run dev
bun run build
# Run tests
bun test
# Test the CLI
./cli.js --help
We welcome contributions! Please see our Contributing Guide for details.
Apache 2.0 License - see LICENSE for details.
TypeScript
97.7%
JavaScript
1.6%