explaingit

hunhee98/pluck

Analysis updated 2026-05-18

4RustAudience · developer

TLDR

A local code search tool for AI coding agents that cuts token usage by 84-88 percent by returning structured code chunks instead of whole files.

Mindmap

mindmap
  root((pluck))
    What it does
      Local code search
      For AI coding agents
      Cuts read tokens
    Tech stack
      Rust
      Tree-sitter
      MCP
    Use cases
      Structured code search
      Reduce agent token use
      Raw fallback commands
    Audience
      Developers
      AI agent builders
    Search method
      BM25F keyword
      Semantic embeddings

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give AI coding agents structured, token-efficient access to your codebase

USE CASE 2

Search code by combining keyword matching with semantic similarity

USE CASE 3

Return function signatures and outlines instead of full file contents

USE CASE 4

Fall back to raw cat or grep behavior when structured search isn't needed

What is it built with?

RustTree-sitterMCPBM25F

How does it compare?

hunhee98/pluckandroolloyd/octravpngabriele06-local/localmind
Stars444
LanguageRustRustRust
Setup difficultyhardmoderate
Complexity5/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

In plain English

Pluck is a local code search tool designed for AI coding agents like Claude Code, Codex, or Cursor. It runs as a background process on your machine and exposes smarter ways for agents to read and search your codebase over MCP (Model Context Protocol), a standard way for AI tools to call external services. The problem it solves: when AI agents explore code using standard tools like cat or grep, they repeatedly read entire files, even parts they don't need, and re-read the same chunks multiple times. Each read consumes part of the agent's context window (the limit on how much text the AI can hold in mind at once). Pluck replaces these wasteful reads with structured alternatives that cut eligible code-read tokens by 84-88%. Instead of dumping an entire file, pluck reads code at the Abstract Syntax Tree (AST) level using Tree-sitter, which means it understands the structure of the code and can return just function signatures or outlines, with full bodies available on demand. For search, it combines keyword matching (BM25F) with semantic similarity (using a small embedding model, potion-code-16M) to rank the most relevant code chunks for a given query. A session deduplication feature tracks which chunks the agent has already seen and replaces repeats with a single short placeholder instead of resending all the text. Every pluck tool has a raw fallback that behaves exactly like the standard cat or grep command, so agents never lose capability by defaulting to pluck. Pluck is built in Rust (1.75+) and is available via crates.io or a Homebrew tap. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Help me install pluck and connect it to Claude Code or Cursor over MCP
Prompt 2
Explain how pluck's AST-based reading reduces token usage for AI agents
Prompt 3
Show me how the BM25F and semantic search ranking works together
Prompt 4
Walk me through how session deduplication avoids re-reading the same code

Frequently asked questions

What is pluck?

A local code search tool for AI coding agents that cuts token usage by 84-88 percent by returning structured code chunks instead of whole files.

What language is pluck written in?

Mainly Rust. The stack also includes Rust, Tree-sitter, MCP.

Who is pluck for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.