Skip to content

Repository files navigation

Kode

Your AI-Powered Terminal Coding Companion

Kode Banner

npm versionLicenseAGENTS.mdGitHub Stars

中文文档 · Contributing · Documentation · Releases


Understand your codebase · Edit files · Execute commands · Orchestrate workflows


Kode Demo

Table of Contents

Highlights

Intelligent Coding

  • Multi-Model Orchestration — Combine 20+ AI models, each excelling at different tasks
  • Expert Consultation@ask-model-name for specialized analysis
  • Agent Delegation@run-agent-name for task orchestration
  • Smart Completions — Fuzzy matching with 7+ algorithms

Developer Experience

  • Zero-Config Start — Works out of the box with any OpenAI-compatible endpoint
  • AGENTS.md Standard — Compatible with 60k+ open-source projects
  • Rich Terminal UI — Syntax highlighting, image support, inline editing
  • Extensible — Skills, plugins, MCP servers, custom agents

Note

Security: Kode runs in YOLO mode by default for maximum productivity. Use kode --safe to enable permission checks when working with critical files.

Model Advice: Use agentic models designed for autonomous task completion (not Q&A-focused models like GPT-4o) for best results.

Installation

npm install -g @shareai-lab/kode
🇨🇳 China Mirror / Additional Options
# China mirror
npm install -g @shareai-lab/kode --registry=https://registry.npmmirror.com
# Dev channel (latest features)
npm install -g @shareai-lab/kode@dev

Kode bundles per-platform ripgrep and native binaries via optionalDependencies. If installed with --no-optional, install system rg or set KODE_RIPGREP_PATH.

Standalone Binary (no npm)

Download Bun-compiled binaries from GitHub Releases. See docs/binary-distribution.md.

After installation, use any of these commands:

CommandDescription
kodePrimary command
kwaKode With Agent
kdUltra-short alias

Quick Start

Interactive Mode

kode

One-Shot Mode

kode -p "explain this function" path/to/file.js

ACP Mode (Agent Client Protocol)

kode-acp # stdio JSON-RPC for Toad/Zed clients

Keyboard Shortcuts

ShortcutAction
EnterSubmit message
Option+EnterInsert newline
Option+MCycle active model
Option+GOpen message in $EDITOR
Ctrl+VAttach clipboard image (macOS)

Slash Commands

/model Change AI model settings
/config Open configuration panel
/agents Manage subagents
/plugin Manage skills & plugins
/output-style Switch output behavior
/cost Show token usage & costs
/clear Clear conversation
/help Show all commands

Multi-Model Collaboration

Unlike single-model tools, Kode enables true multi-model orchestration — assign the right model to the right task.

Architecture

┌─────────────────────────────────────────────────┐
│ ModelManager │
├──────────┬──────────┬───────────┬───────────────┤
│ main │ task │ compact │ quick │
│ (primary)│(subagent)│(summarize)│ (utilities) │
└──────────┴──────────┴───────────┴───────────────┘
│ │ │
Main Agent SubAgents Expert Consult

Model Pointers — Configure defaults for each role via /model:

PointerPurpose
mainPrimary conversation model
taskSubAgent / delegation model
compactContext compression near window limit
quickFast operations & utilities

Shareable Config (YAML)

kode models export --output kode-models.yaml # Export (no plaintext keys)
kode models import kode-models.yaml # Import (merge)
kode models import --replace kode-models.yaml # Import (replace)
kode models list # List profiles + pointers

Workflow Examples

# Architecture — use reasoning models"Use o3 to design the message queue architecture"# Implementation — use coding models"Use Qwen Coder as subagent to refactor these three modules in parallel"# Expert consultation — consult a specialist"Ask Claude Opus 4.1 about this memory leak"# Model switching — Option+M or specify inline"Switch to Kimi k2 for code review"

Key Capabilities

FeatureKodeSingle-Model CLI
Models SupportedUnlimitedOne
Live SwitchingOption+MRestart required
Parallel SubAgentsYesNo
Per-Model Cost TrackingYesNo
Expert Consultation@ask-*Not available

Agents & Subagents

Agents are reusable templates for task delegation and orchestration.

# Manage
/agents # Interactive UI
kode agents validate # Validate templates# Run
@run-agent-reviewer ... # Via @ mention
Task(subagent_type: "reviewer") # Via tool call

Agent file (.kode/agents/reviewer.md):

---name: reviewerdescription: "Review diffs for correctness, security, and simplicity"tools: ["Read", "Grep"]model: inherit---
Be strict. Point out bugs and risky changes. Prefer small, targeted fixes.

Sources: .kode/agents (project) → ~/.kode/agents (user) → plugins → --agents flag.

Model field accepts: inherit, pointer names (main|task|compact|quick), profile names, or provider:modelName.

Skills & Plugins

Install from Marketplace

kode plugin marketplace add owner/repo
kode plugin install document-skills@anthropic-agent-skills --scope user

Use Skills

Run as slash commands (/pdf, /xlsx) or let Kode invoke them automatically.

Create a Skill

Create .kode/skills/<name>/SKILL.md:

---name: my-skilldescription: Describe what this skill does and when to use it.allowed-tools: Read Bash(git:*) Bash(jq:*)---# Skill instructions here

See docs/skills.md for full reference.

MCP Extensions

Connect to Model Context Protocol servers to extend Kode's capabilities.

kode mcp add # Add server
kode mcp list # List connected servers
kode mcp remove <name># Remove server

Config file (.mcp.json in project root):

{
"my-server": { "type": "sse", "url": "http://127.0.0.1:3333/sse" }
}

Permissions & Security

ModeBehavior
Default (YOLO)Skips permission prompts for speed
kode --safeRequires approval for writes & commands
Plan ModeRead-only until plan is approved

System Sandbox (Linux)

With --safe or KODE_SYSTEM_SANDBOX=1, Bash commands run inside a bwrap sandbox (network disabled by default).

Network & Privacy

  • No telemetry by default
  • Network requests only for: model API calls, web tools, plugin downloads, optional update checks

Configuration

ScopeLocation
Global config~/.kode.json (or $KODE_CONFIG_DIR/config.json)
Project settings.kode/settings.json, .kode/settings.local.json
MCP servers.mcp.json or .mcprc
Agents.kode/agents/*.md
Skills.kode/skills/*/SKILL.md

AGENTS.md Support

Kode discovers instruction files from repo root to CWD:

  • Prefers AGENTS.override.md > AGENTS.md (one per directory)
  • Concatenated root → leaf (32 KiB cap, override with KODE_PROJECT_DOC_MAX_BYTES)
  • Legacy CLAUDE.md / .claude/ compatibility included

Docker

git clone https://github.com/shareAI-lab/Kode.git &&cd Kode
docker build --no-cache -t kode .# Run in your projectcd your-project
docker run -it --rm \
-v $(pwd):/workspace \
-v ~/.kode:/root/.kode \
-v ~/.kode.json:/root/.kode.json \
-w /workspace \
kode

Development

Requires Bun for development.

# Setup
git clone https://github.com/shareAI-lab/kode.git &&cd kode
bun install
# Dev / Build / Test
bun run dev
bun run build
bun test

License

Apache 2.0 — Use freely in personal, commercial, and enterprise projects.

Acknowledgements

  • Some code from @dnakov's anonkode
  • UI inspiration from gemini-cli
  • System design learned from upstream agent CLIs

Documentation · Report Issues · Discussions

From July through December 2026, Kode is undergoing a major maintenance and refactoring phase.
Follow releases and announcements for the refreshed roadmap.

About

Kode CLI — Design for post-human workflows. One unit agent for every human & computer task.

Resources

Contributing

Stars

5.2k stars

Watchers

75 watching

Forks

Contributors

Languages