cd26320f62 feat: add WarpGrep AI-powered codebase search tool (#6685)
* feat: add WarpGrep AI-powered codebase search tool

Add WarpGrep integration as a new tool for intelligent multi-step
codebase search. WarpGrep delegates search to Morph's RL-trained
search agent, which runs parallel tool calls across multiple turns
and returns only relevant code spans.

- Add WarpGrep core client with multi-turn API loop, local tool
  executors (ripgrep, file read, directory list), and XML parsing
- Add tool definition gated behind KILO_ENABLE_WARPGREP flag
- Register tool in registry with feature flag gating
- Add warpgrep permission to orchestrator, ask, and explore agents
- Conditionally enhance explore agent prompt when WarpGrep available
- Add unit tests for parsing, file ops, and tool registration

* fix: align warpgrep with Morph XML protocol

* chore: drop warpgrep test changes from branch

* chore: remove warpgrep test files from branch

* refactor: replace custom WarpGrep implementation with @morphllm/morphsdk

- Delete 396-line custom warpgrep.ts, replace with SDK's WarpGrepClient
- Only check MORPH_API_KEY (drop WARPGREP_API_KEY)
- Route through Kilo proxy during free period when no API key is set
- Add actionable error message for when free period ends
- Grep for FREE_PERIOD_TODO to find what to change post-free-period

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: rename warpgrep to codebase_search, add error toast for 429/402

- Rename tool from warpgrep to codebase_search throughout
- Switch proxy URL to /api/gateway
- Detect auth/rate-limit errors (401/402/429) and show actionable
  fallback message telling users to set MORPH_API_KEY
- Fire a TUI toast notification on auth/rate-limit errors so users
  see a visible popup, not just hidden tool output
- Wire up GlobalBus "global.event" in TUI thread so Bus events from
  tools can reach the TUI event system

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* build: bump @morphllm/morphsdk to 0.2.141

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use Bus.publish for toast, revert global.event subscription

Address PR review: emit toast via Bus.publish(TuiEvent.ToastShow)
instead of GlobalBus.emit() so it works in both direct-RPC and
server-backed TUI modes. Revert the global.event subscription in
createEventSource since it's no longer needed and caused double
event delivery.

Also update codebase_search tool description to clarify natural
language input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add codebase search toggle to experimental settings

Replace KILO_ENABLE_WARPGREP env var with a UI toggle in the
Experimental settings tab. The tool is now gated by the
experimental.codebase_search config field, accessible from both
VSCode settings and TUI config file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update packages/opencode/src/tool/warpgrep.ts

Co-authored-by: Marius <marius@kilocode.ai>

* feat: limit codebase_search output to prevent context bloat

When search results exceed 45k chars (~15k tokens), degrade to showing
file paths and line ranges instead of full content. Also bumps
@morphllm/morphsdk from 0.2.129 to 0.2.147.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* build: bump @morphllm/morphsdk to 0.2.148

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: format codebaseSearch i18n strings to respect prettier line width

* fix: only advertise codebase_search in explore prompt when feature flag is enabled

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Christiaan Arnoldus <christiaan.arnoldus@outlook.com>
Co-authored-by: Marius <marius@kilocode.ai>
2026-03-17 09:06:15 +00:00
2026-03-09 13:02:22 +01:00
2026-03-12 12:19:04 +01:00
2026-03-13 12:45:52 +00:00
2026-02-27 19:12:19 -06:00
2026-02-02 18:32:22 -03:00
2026-03-04 11:56:03 +01:00
2026-03-10 00:31:00 -03:00
2026-02-27 15:38:51 -03:00
2026-02-23 11:47:15 -03:00
2026-02-13 14:18:59 +00:00
2026-03-12 12:06:20 +01:00
2026-03-03 17:08:52 +01:00
2026-03-12 12:42:48 +01:00

VS Code Marketplace X (Twitter) Substack Blog Discord Reddit

🚀 Kilo

Kilo is the all-in-one agentic engineering platform. Build, ship, and iterate faster with the most popular open source coding agent. #1 coding agent on OpenRouter. 1.5M+ Kilo Coders. 25T+ tokens processed

  • Generate code from natural language
  • Checks its own work
  • 🧪 Run terminal commands
  • 🌐 Automate the browser
  • Inline autocomplete suggestions
  • 🤖 Latest AI models
  • 🎁 API keys optional
  • 💡 Get $20 in bonus credits when you top-up for the first time Credits can be used with 500+ models like Gemini 3.1 Pro, Claude 4.6 Sonnet & Opus, and GPT-5.2

Key Features

  • Code Generation: Kilo can generate code using natural language.
  • Inline Autocomplete: Get intelligent code completions as you type, powered by AI.
  • Task Automation: Kilo can automate repetitive coding tasks to save time.
  • Automated Refactoring: Kilo can refactor and improve existing code efficiently.
  • MCP Server Marketplace: Kilo can easily find, and use MCP servers to extend the agent capabilities.
  • Multi Mode: Plan with Architect, Code with Coder, and Debug with Debugger, and make your own custom modes.

Get Started in Visual Studio Code

  1. Install the Kilo Code extension from the VS Code Marketplace.
  2. Create your account to access 500+ cutting-edge AI models including Gemini 3 Pro, Claude 4.5 Sonnet & Opus, and GPT-5 with transparent pricing that matches provider rates exactly.
  3. Start coding with AI that adapts to your workflow. Watch our quick-start guide to see Kilo in action:

Watch the video

Get Started with the CLI

# npm
npm install -g @kilocode/cli

# Or run directly with npx
npx @kilocode/cli

Then run kilo in any project directory to start.

npm Install Note: Hidden .kilo File

On some systems and npm versions, installing @kilocode/cli can create a hidden .kilo file near the installed kilo command (for example in a global npm bin directory). This file is an npm-generated launcher helper, not project data.

  • Why it exists: npm may create helper artifacts while wiring CLI executables.
  • Size caveat: size can vary by platform, npm version, and install mode (symlink vs copied launcher), so a strict fixed size is not guaranteed.
  • Safety: it is safe to leave in place. Do not edit it manually. Use your package manager's uninstall (npm uninstall -g @kilocode/cli) to remove install artifacts cleanly.

Install from GitHub Releases (Optional)

Download the latest binary or source code from the Releases page, use this quick guide:

  • kilo-<os>-<arch>.zip is the CLI binary for your OS and CPU architecture on Windows and macOS. (kilo-linux-<arch>.tar.gz for Linux)
  • darwin means macOS.
  • x64 is standard 64-bit Intel/AMD CPUs.
  • x64-baseline is a compatibility build for older x64 CPUs(do not support AVX Instruction).
  • arm64 is ARM-based Linux/MacOS.
  • musl is statically linked Linux build for Alpine/minimal Docker without glibc. Alpine/minimal Docker users should prefer the matching *-musl asset.
  • kilo-vscode-*.vsix is the VS Code extension package and not the CLI binary.
  • Source code releases are for building from source, not normal installation.

For most users:

  • Windows (most PCs): kilo-windows-x64.zip
  • macOS Apple Silicon: kilo-darwin-arm64.zip
  • macOS Intel: kilo-darwin-x64.zip
  • Linux x64: kilo-linux-x64.tar,gz
  • Linux on ARM: kilo-linux-arm64.tar.gz

Autonomous Mode (CI/CD)

Use the --auto flag with kilo run to enable fully autonomous operation without user interaction. This is ideal for CI/CD pipelines and automated workflows:

kilo run --auto "run tests and fix any failures"

Important: The --auto flag disables all permission prompts and allows the agent to execute any action without confirmation. Only use this in trusted environments like CI/CD pipelines.

Contributing

We welcome contributions from developers, writers, and enthusiasts! To get started, please read our Contributing Guide. It includes details on setting up your environment, coding standards, types of contribution and how to submit pull requests.

See RELEASING.md for the release process.

Code of Conduct

Our community is built on respect, inclusivity, and collaboration. Please review our Code of Conduct to understand the expectations for all contributors and community members.

License

This project is licensed under the MIT License. Youre free to use, modify, and distribute this code, including for commercial purposes as long as you include proper attribution and license notices. See License.

Where did Kilo CLI come from?

Kilo CLI is a fork of OpenCode, enhanced to work within the Kilo agentic engineering platform.

S
Description
Kilo is the all-in-one agentic engineering platform. Build, ship, and iterate faster with the most popular open source coding agent. #1 coding agent on OpenRouter. 1.5M+ Kilo Coders. 25T+ tokens processed
Readme MIT
1.3 GiB
Languages
TypeScript 81.2%
Kotlin 12.5%
CSS 3.1%
JavaScript 2.6%
HTML 0.3%
Other 0.2%