mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
* fix: use .kilo instead of .kilocode for config directories * fix: keep global ~/.kilocode untouched for legacy CLI compat Only rename project-level .kilocode/ to .kilo/. The global ~/.kilocode directory must stay because legacy CLI instances and legacy-migration.ts in kilo-gateway still read from it. * test: update VS Code extension tests to use .kilo directory paths * fix: correct paths.ts comment and use specific git exclude entries - Fix comment referencing ~/.kilo when globalDir() returns ~/.kilocode - Revert to specific .kilo/ git exclude entries instead of blanket .kilo/ to avoid hiding user-authored rules/workflows/config from git status * fix: handle legacy per-worktree metadata and stale paths in state - readMetadata() falls back to .kilocode/ inside worktrees since the per-worktree metadata dirs aren't renamed by the top-level migration - Rewrite stale .kilocode/ paths in agent-manager.json on load * fix: run .kilocode migration at extension activation, not just Agent Manager Move migration call to the top of activate() so it runs for all users on every extension startup, before kilo serve is spawned or any code reads from the .kilo directory. * fix: update git worktree refs after .kilocode → .kilo rename After renaming the directory, git's internal .git/worktrees/*/gitdir files still reference the old .kilocode path. This causes git to lose track of worktrees, leading to crashes. Both the CLI and extension migration now rewrite these gitdir files after a successful rename. * fix: read from both .kilo and .kilocode, write to .kilo Replace the one-time directory rename migration with a dual-read strategy: - CLI config (rules, workflows, skills, MCP, project-id): read from both .kilo/ and .kilocode/ directories, with .kilo taking precedence - Agent Manager data (worktrees, state, setup scripts): migrate from .kilocode/ to .kilo/ at startup since the extension exclusively owns these - Config discovery (paths.ts, config.ts): include .kilocode in directory and agent/command pattern matching Key decisions: - .kilo/ is the new canonical write location for all new data - .kilocode/ is read as a legacy fallback (no data loss for existing users) - No directory rename: both dirs can coexist safely - Agent Manager migration is item-level (moves individual files), not a full directory rename, so it handles both-dirs-exist gracefully - Windows path rewrite in WorktreeStateManager handles both / and \ separators - Workflow/MCP load order: .kilocode first, .kilo second (last wins) - Rules dedup via seen-set with .kilo checked first (first wins) - Delete migrate-kilo-dir.ts (no longer needed) * fix: resolve .git file when fixing worktree refs during migration When the project root is itself a worktree, .git is a file pointing at the shared git dir, not a directory. Follow the gitdir pointer to find the actual .git/worktrees/ location. * fix: recover partial .kilo migrations and global dirs Always repair stale git worktree refs when .kilo worktrees already exist so partially migrated repos recover on startup. Also dual-read global skills, rules, and workflows from both legacy and new home directories. * fix: keep .kilo ahead of legacy config dirs * fix: narrow legacy agent manager excludes * chore: link migration cleanup follow-up
Kilo Code CLI
The AI coding agent built for the terminal. Generate code from natural language, automate tasks, and run terminal commands -- powered by 500+ AI models.
Install
npm install -g @kilocode/cli
Or run directly with npx:
npx --package @kilocode/cli kilo
Getting Started
Run kilo in any project directory to launch the interactive TUI:
kilo
Run a one-off task:
kilo run "add input validation to the signup form"
Features
- Code generation -- describe what you want in natural language
- Terminal commands -- the agent can run shell commands on your behalf
- 500+ AI models -- use models from OpenAI, Anthropic, Google, and more
- MCP servers -- extend agent capabilities with the Model Context Protocol
- Multiple modes -- Plan with Architect, code with Coder, debug with Debugger, or create your own
- Sessions -- resume previous conversations and export transcripts
- API keys optional -- bring your own keys or use Kilo credits
Commands
| Command | Description |
|---|---|
kilo |
Launch interactive TUI |
kilo run "<task>" |
Run a one-off task |
kilo auth |
Manage authentication |
kilo models |
List available models |
kilo mcp |
Manage MCP servers |
kilo session list |
List sessions |
kilo session delete |
Delete a session |
kilo export |
Export session transcripts |
Run kilo --help for the full list.
Alternative Installation
Homebrew (macOS/Linux)
brew install Kilo-Org/tap/kilo
GitHub Releases
Download pre-built binaries from the Releases page.
Documentation
Links
License
MIT