Skip to content
Pixel-CLIPublic

About

A tool that replaces everything that can be deterministic in repository work: search, symbols, callers, task scope, history, review and Git from one local CLI, so your AI coding agent spends its tokens on the hard part.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

29 stars

Watchers

0 watching

Forks

Repository files navigation

🟩 Pixel

Your agent stops grepping. It starts answering.
Source-cited repo context, injected the moment you hit Enter.

Latest release CI OpenSSF Best Practices badge OpenSSF Best Practices baseline badge Release archives, SBOMs and install.sh carry SLSA Build L3 provenance attestations Prebuilt for macOS arm64 and Linux x86_64 and arm64 MIT license

Website · Docs · Benchmarks

Recorded Codex run on Requests, Pixel on the left and without Pixel on the right (each pane cropped to its left half): the same repository question reports 36 seconds with Pixel and 1 minute 58 seconds without, after additional searches and file reads.

Same question, same repo, same Codex. 36 s with Pixel. 1 min 58 s without. One recorded run, sped up uniformly — source and limits.


⚡ Install

curl -fsSL https://github.com/Pixel-CLI/pixel/releases/latest/download/install.sh | sh
pixel setup              # pick your agents

Restart your agent, approve hooks if asked, ask your next code question. That's it: Pixel indexes the repository on its first use. Want it warm up front? pixel prepare-repo .

Read the installer · release notes · build from main for unreleased integrations.

🧠 The problem

Your agent burns its first turns on discovery: plan a grep → run it → read a 2,000-line file → grep again → repeat. You pay for every loop. In tokens. In wall time. In context it never uses.

🟩 The fix

Pixel hooks your agent's prompt-submit event. Before the model sees your question, Pixel queries a local code index and attaches a compact [PIXEL:BRIEF]: definitions, callers, code, tests and git history, cited file:line.

Without Pixel the agent plans a search, greps, reads a whole file and greps again; with Pixel, pressing Enter runs a local index lookup and the agent starts from a cited brief

The agent starts with the evidence already in context. It keeps all its tools — it just doesn't have to go hunting.

pixel brief "Where is request validation implemented?" .   # see what your agent gets
pixel doctor .                                              # check install and index health
export PIXEL_BRIEF=0                                        # turn briefs off

🛠️ Retrieval on demand: the Pixel skill

Need more than the brief? pixel setup drops a pixel skill into each agent's skills/ folder. The agent asks the index directly — one call, then a targeted read:

Agent asks Pixel answers with
where is X defined? pixel find-symbol 'X'
who calls X? pixel who-calls '<uid>'
what breaks if I change X? pixel impact '<uid>' --depth 1
outline of this 2,000-line file? pixel list-signatures <file> — median −94.5% read volume
just this one function pixel pack-context '<uid>' --budget 1500

The same task without Pixel and with it: the agent wanders the repository, or starts from a ranked list of files

Both animations illustrate a workflow; they are not timed agent comparisons. Agent trials and their limits.

📊 Numbers

without Pixel with Pixel
Same Codex question on Requests (one recorded run) 1 min 58 s 36 s
Requests models.py: full read vs. outline 10,365 tokens* 641 tokens* (−94%)
8 large open-source files: full read vs. outline 100% median 5.5% (−94.5%)

*Estimated tokens (bytes ÷ 4), Pixel 0.8.0 (the Codex run, Pixel 0.5.x), no billed cost. Every number has a protocol, and we publish the losses too: benchmarks.

🆚 Alternatives

Keeping the agent's context bill down is an idea whose time has come — teams at AWS and Spotify, and projects like xerj, ship their own takes on it:

What it does Mechanism Cost model
Pixel Attaches cited repo context (file:line brief: definitions, callers, tests, git history) before the model sees your prompt Local code graph + prompt-submit hook Deterministic index lookup — no model call, no latency, free
AWS AgentCore Memory sample Wraps every query(): fetches short-term history and long-term summaries before the call, saves turns after Claude Agent SDK + managed AgentCore Memory Managed AWS service; LLM-extracted cross-session memory, not code structure
Spotify shunt Hooks block the agent from reading large files directly; a skill delegates the read to a cheaper internal LLM that summarizes (82–94% token savings claimed) Claude Code PreToolUse hooks → AiKA modes via Portal CLI An extra billed model call per delegated read or codegen
xerj Indexes any folder (code through tree-sitter, plus docs, logs and PDFs) into a local Elasticsearch-compatible engine that the agent searches instead of reading files (2.7× fewer output tokens than grep claimed on reference coding) Local server + xerj search / xerj def CLI, or the MCP tool and skill xerj init installs Free and local, but a server to keep running and a search call per lookup

We put a xerj brief (its top passages for the prompt, through the same hook and at the same size) in place of Pixel's on 13 arena prompts in Claude Code: 26 and 25 tool calls with Pixel's brief in two runs, 37 with xerj's. Installed with xerj init (MCP tools and a skill), the agent never called xerj (58 calls, none to xerj). Method, per-prompt results and indexing times.

Same goal, different lever: AWS and Spotify delegate work to another model or service, and xerj gives the agent a search engine it still has to call. Pixel makes the context a deterministic lookup in a local index, attached before the prompt. No extra tokens, no extra round trip, no cloud dependency — the same brief every time, cited to the line.

🔌 Works with

Claude Code · Codex · pi · Devin · OpenCode · Gemini CLI · Antigravity

One pixel setup wires each host's hooks or extension.

🔒 Local. Free. Yours.

  • 🦀 Single Rust binary · macOS (Apple Silicon) and Linux
  • 🏠 Indexing and lookup run on your machine — no account, no API key, no telemetry
  • 📜 MIT licensed · see NOTICE for attribution

🎯 Bonus: pixel classify

Typed decisions from a local model — routing, gating, triage — one probability per label:

pixel classify "Review this Rust PR, find correctness bugs, and propose a safe patch." \
  --engine ollaya \
  --context "Choose the cheapest model that can reliably handle the request." \
  --label 'claude-haiku-4.5_(fast)' \
  --label 'claude-opus-5.5_(strong)' \
  --label 'claude-fable-5.1_(reasoning)' \
  --criterion 'claude-haiku-4.5_(fast)=Simple rewriting, extraction, or classification; no deep reasoning.' \
  --criterion 'claude-opus-5.5_(strong)=Complex coding, multi-file review, or tool use; accuracy matters.' \
  --criterion 'claude-fable-5.1_(reasoning)=Multi-step analysis, difficult debugging, or high uncertainty.'

claude-fable-5.1_(reasoning): 0.192
claude-haiku-4.5_(fast): 0.098
claude-opus-5.5_(strong): 0.710
predicted: claude-opus-5.5_(strong)

Runs locally with Ollaya, or remote through OpenRouter, Ollama, DeepSeek, OpenCode Go, OpenAI or any OpenAI-compatible endpoint. Model bake-off →


Docs · Manual setup · Benchmarks · GitHub Actions · Architecture · Contributing · Security · Report a bug

About

A tool that replaces everything that can be deterministic in repository work: search, symbols, callers, task scope, history, review and Git from one local CLI, so your AI coding agent spends its tokens on the hard part.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

29 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages