What is Sweet-search?
Sweet-search is a local code-search CLI for developers who use AI coding agents such as Claude Code, Codex, or opencode. It indexes a repository on the developer’s machine and gives agents dedicated ways to search and read code, including semantic search and symbol tracing. The index updates as files change, so searches can reflect active work, including uncommitted changes. Setup can also add agent instructions or register an MCP server for tools that use that interface.
Sweet-search Features:
Local Indexing: The CLI builds a repository index using on-device models, with GPU acceleration where available and no cloud service or API key required.
Six Search Tools: Agents can use purpose-built search, grep, find, semantic search, trace, and read tools to locate and inspect code.
Semantic Retrieval: Search supports semantic retrieval and optional late-interaction reranking, with model tiers that include an edge option for constrained machines.
Live Updates: A background process keeps the index current as the working tree changes, including edits that have not been committed.
Agent Setup: The init command can configure Claude Code, Codex, or opencode, and can add instruction files for tools including Gemini and Cursor.
MCP Server: An optional MCP server exposes eight tools, including search, trace, read, index, health, and repo-map.
Sweet-search Benefits:
Less Search Overhead: Purpose-built retrieval can spare agents repeated grep-and-read passes when answering questions about a codebase.
Lower Run Costs: In the project’s reported tests across engineering tasks and model setups, agent runs cost less while completing the same number of tasks.
Current Results: Automatic index updates reduce the chance that an agent searches an outdated view of code being actively edited.
Private Code Search: Keeping models and indexing on-device means repository contents do not need to leave the developer’s machine for search.
Flexible Agent Use: Setup choices let developers use the same indexed repository with different supported coding agents and interfaces.
Use Cases:
Find Validation Logic: Ask an agent where a repository validates JWT tokens or handles another specific behavior, then inspect the relevant code.
Explore An Unfamiliar Repo: Use semantic search or a ranked repo map to brief an agent on key symbols before assigning it a code task.
Trace Code Paths: Have an agent follow related symbols and references when investigating how a function or feature connects across files.
Review Active Changes: Search an index that includes uncommitted edits while debugging or asking an agent to help with work in progress.
Configure Coding Agents: Set up repository search for a Claude Code, Codex, or opencode project, with optional MCP access for compatible tools.

