Files
Kilo-Org_kilocode/packages/opencode
Imanol Maiztegui 39a7305c97 Effect Migration for Kilo callsites (follow-up) (#10587)
* refactor(opencode): migrate ModelCache and Config to effect-native services

Remove legacy async wrapper functions from Config module and convert
ModelCache from a stateful namespace with module-level Maps into a
proper Effect service with Context/Layer semantics.

Key changes:
- Delete Config's `makeRuntime`-based async wrappers (get, getGlobal,
  update, warnings, etc.) — all callsites now use
  `Config.Service.use(...)` through AppRuntime
- Rewrite ModelCache as an Effect service with HttpClient dependency
  injection, replacing imperative Map-based caching with Effect-native
  Ref cells and TTL logic
- Convert KiloSessions.init and KilocodeBootstrap.init into proper
  Effect services with Layer-based dependency injection
- Wire ModelCache.Service into AppLayer, ProviderAuth, ModelsDev, and
  HTTP API handler layers
- Update Permission.layer to depend on Config.Service directly instead
  of calling Config async wrappers
- Add new test files for KiloSessions and ModelCache Effect integration
- Remove stale Config.get spyOn mocks from tests that no longer need
  them (experimental-session-list, recall)
- Fix indexing-auth to use typed IndexingConfig parameter instead of
  untyped record access

* fix(model-cache): resolve race conditions in concurrent fetch and cache invalidation

Introduce versioned cache cells with proper key derivation to prevent
stale responses from overwriting fresher data during concurrent fetches.

- Add version tracking to detect and discard outdated fetch results
- Derive cache keys from provider-specific options (baseURL, token, apiKey)
  to isolate concurrent requests with different credentials
- Make ModelCache.clear async to properly await invalidation across layers
- Update OrganizationDeps.clear signature to allow Promise<void> return
- Add concurrency and ordering tests for fetch/refresh race scenarios
- Rename local variable from `state` to `entry` in kilo-sessions sync loop

* chore(opencode): remove duplicate imports and fix test layer composition

Remove duplicate `AppRuntime` imports introduced during merge and update
kilo-sessions tests to use Effect-native Auth service instead of static
module calls.

- Remove duplicate `AppRuntime` import in index.ts and instance.ts
- Add Auth.defaultLayer to test layer helper
- Refactor test to yield Auth.Service and use instance methods
- Reorder Effect.provide/Effect.ensuring for correct resource cleanup

* style(opencode): normalize kilocode_change marker comments to block format

Standardize inline `// kilocode_change` annotations across source and
test files to use consistent `// kilocode_change start` / `// kilocode_change end`
block delimiters, improving readability and grep-ability of custom
modifications.
2026-05-27 11:43:32 +02:00
..
2026-05-22 09:01:40 +02:00
2026-05-21 14:48:36 +02:00
2026-04-12 13:36:08 +02:00
2026-05-26 20:02:42 +00:00
2026-04-11 14:06:52 +02:00
2026-05-26 20:58:33 +00:00

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

License

MIT