Sift the repo.
Keep the signal.

sift walks a project directory, ranks files by git relevance, and renders one LLM-ready context document. Token budgeting, secret redaction, and signature-only compression are built in.

Single Go binary, no account or server round-trip. Also on Homebrew, Scoop, and as prebuilt binaries. Source on GitHub.

Noise stays gray and drops out. Everything else gets ranked, then rendered full or as signatures until the budget runs out.

Context curation is the bottleneck

Three ways teams feed code to models today — and why each breaks down.

  • Raw concatenation doesn't rank. Piping every file into a prompt ships vendored code, lockfiles, build output, and secrets — unranked and over budget.
  • A cloud service sees your code. Hosted context tools charge per seat and upload your repository. sift is a local MIT-licensed binary; nothing leaves your machine.
  • Hand-picking doesn't scale. Choosing files by hand stops working past a dozen. Git-relevance ranking re-curates on every run, for free.

One document, ranked and trimmed to fit

Two ideas do the heavy lifting; four more handle the details.

Git-relevance ranking

Modified files first, then recent diffs, then recent commits — weighted with churn and import fan-in, so the files you actually touched lead the document.

Signature compression

--mode signatures keeps declarations and doc comments via tree-sitter and drops function bodies — the full structure at a fraction of the tokens.

Token budgets

Set --budget and sift keeps the highest-priority files inside your model's context window.

Secret redaction

AWS, GitHub, Slack, Google, and Stripe keys are redacted before anything renders. On by default.

Interactive picker

A dual-pane TUI with per-file FULL/SIGS/SKIP modes, smart-select, and task prompts.

Incremental deltas

sift delta renders only what changed since your last dump, as full files or a raw patch.

Seven ways to generate the document

Run sift --help or sift <command> --help for the full flag list.

CommandWhat it does
siftLaunch the interactive picker (bare invocation)
sift dump [path]Render every eligible file in the tree
sift pick [path]Select files interactively, then render
sift select [path]Auto-select the most useful files and render them
sift diff [ref]Render only files changed relative to a git ref
sift delta [path]Render only changes since the last recorded dump
sift watch [path]Re-render the document whenever files change

Install in one line

macOS and Linux:

curl -fsSL https://bethropolis.github.io/sift/install.sh | sh

Homebrew, Scoop, go install, and building from source are on the install page.