| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
中文文档 | 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.
Use # Your documentation request to generate and maintain your AGENTS.md file automatically, while preserving compatibility with existing .claude workflows.
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-permissions flag), 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 using kode --safe to 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.
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.
npm 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-platform optionalDependencies (@shareai-lab/kode-ripgrep-<platform>-<arch>). If you install with --no-optional, install system rg or set KODE_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@devAfter installation, you can use any of these commands:
For 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).
Start an interactive session:
kode
# or
kwa
# or
kdGet a quick response:
kode -p "explain this function" path/to/file.js
# or
kwa -p "explain this function" path/to/file.jsRun Kode as an ACP agent server (stdio JSON-RPC), for clients like Toad/Zed:
kode-acp
# or
kode --acpToad 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.exampleThe @ 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.
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" }
}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 requirementsThis 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 \
kodeThe Docker setup includes:
Volume Mounts:
Working 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.
Kode supports subagents (agent templates) for delegation and task orchestration.
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:
Validate agent templates:
kode agents validateSee docs/agents-system.md.
Kode supports:
# 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 userInteractive equivalents:
/plugin marketplace add owner/repo
/plugin install document-skills@anthropic-agent-skills --scope user
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 instructionsNaming rules:
Compatibility:
See docs/skills.md for a compact reference and examples.
Use output styles to switch system-prompt behavior.
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:
You 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 listExample 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-4oOur specially designed TaskTool (Architect tool) implements:
We specially designed the AskExpertModel tool:
Architecture 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
}
}| 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 devbun run build# Run tests
bun test
# Test the CLI
./cli.js --helpWe welcome contributions! Please see our Contributing Guide for details.
Apache 2.0 License - see LICENSE for details.
| Back | FazBrowse Home | New Git URL |