Your repo is too big to paste into a chatbot. That's the whole problem.
sift fixes it: point it at a directory, get back one clean document with
exactly the code the model needs.
sift walks a project directory, skips what you wouldn't paste into a prompt (.gitignored files, dotfiles, binaries, lockfiles), and writes the rest to a single document for an LLM. Output can be plain text, Markdown, JSON, or XML.
Files are ranked by git relevance: modified files first, then files in recent diffs, then files in recent commits. Pass --budget 200k and sift fills the document in that order and stops when the budget is used up.
Secrets are redacted before anything is rendered. This covers AWS, GitHub, Slack, Google, and Stripe keys.
With --mode signatures, sift uses tree-sitter to keep declarations and comments and drop function bodies. You keep the structure of the code at a fraction of the tokens.
The result can go to a file, stdout, or the clipboard (--clipboard). sift copy puts the last codebase.md back on the clipboard.
Languages supported in signature mode
Go, Rust, JavaScript/TypeScript (including TSX), Python, PHP, Java, Kotlin, C#, C/C++, Ruby, Swift, Dart/Flutter, Zig.
| Command | Description |
|---|---|
dump |
Render every eligible file |
pick |
Choose files yourself in the TUI, then render |
select |
Let git relevance and the budget choose the files |
clone |
Clone a repo, then run on it |
copy |
Re-copy the last output to the clipboard |
diff |
Render files changed relative to a git ref |
delta |
Render files changed since the last dump |
history |
Show, locate or clear recorded dump history |
follow |
Render a file plus its import-graph neighbors |
watch |
Re-render whenever files change |
serve |
Run sift from a browser |
mcp |
Serve context tools over stdio to coding agents |
check |
Validate .sift.toml and print its resolved config |
skill |
Install and manage agent skills for AI tools |
desktop |
Launch the desktop app wrapper |
Running sift with no command opens the picker.
sift pick (or just sift) opens a two-pane TUI: file tree on the left, preview on the right, and a budget bar at the bottom.
Each file is in one of three modes: FULL, SIGS, or SKIP. Press m to cycle a file through them, or press s to have git relevance assign modes for you. / starts a fuzzy search. p attaches a task prompt, with presets for review, refactor, and debugging. Y builds codebase.md and copies it to the clipboard. d opens the commit-range picker.
Nerd Font icons are on by default. Pass --no-nerd-fonts to turn them off.
The full key list is in docs/picker.md.
sift serve runs the same picker as a web UI. sift serve --app goes one further: chromeless window, auto-login, and closing the window stops the server.
Mobile pairing, remote TLS, and the PWA flow: docs/serve.md.
sift delta renders only what changed since the last recorded dump.
--patch emits a raw unified diff instead, which is cheaper token-wise:
sift delta --patch --clipboard sift delta --since main
History is opt-in. Add enabled = true under [history] in .sift.toml or
~/.config/sift/config.toml, then use sift history (or --json, --limit N)
to see recent successful renders. sift history --path prints the log path;
sift history clear -y removes the log and its archived dumps, and
--no-history skips a single run. JSON entries include the cached file and
the original dump output path. See
docs/configuration.md.
Sift bundles agent skills (including sift-project-dotfile for authoring optimized .sift.toml configurations) for tools like OpenCode, Antigravity, Claude Code, Codex, and standard .agents/ setups.
Install with Sift:
sift skill install # auto-detects installed coding tools sift skill install --local # installs to .agents/skills in current repo
Or install via npx skills:
npx skills add https://bethropolis.github.io/sift
macOS / Linux — installs to ~/.local/bin:
curl -fsSL https://bethropolis.github.io/sift/install.sh | shmacOS (Homebrew):
brew install bethropolis/tap/sift
Arch Linux (AUR):
yay -S sift-context-bin
Windows (Scoop):
scoop bucket add bethropolis https://github.com/bethropolis/scoop-bucket scoop install sift
Go toolchain (CLI only — no embedded serve web UI):
go install github.com/bethropolis/sift/cmd/sift@latest
From source or a prebuilt archive:
git clone https://github.com/bethropolis/sift.git
cd sift
./scripts/install.shPrebuilt archives for Linux, Windows, macOS, FreeBSD, and Android (amd64 and arm64) are on the releases page.
Uninstall
From a checkout: ./scripts/uninstall.sh (--purge also removes
~/.config/sift). Otherwise use your package manager (brew uninstall,
scoop uninstall, rm ~/.local/bin/sift). Full details:
docs/installation.md.
sift # interactive picker sift dump [path] # scan a directory (writes codebase.md next to the root) sift pick [path] # interactively choose files, then render sift select [path] # automatically select useful files sift diff [ref] # files changed relative to a git ref sift delta [path] # only changes since the last recorded dump sift history # recent dumps (opt-in; see docs/configuration.md) sift follow <file> # render a file plus its import-graph neighbors sift watch [path] # re-render on file changes sift serve # browser picker at http://127.0.0.1:7777 sift serve --pair --insecure-http --listen 0.0.0.0:7777 # read-only phone pairing on a trusted LAN sift skill install # install Sift skill into detected AI tools
More examples
sift dump --style markdown sift dump --dir ./src --style xml --clipboard sift dump --budget 50000 sift dump --mode signatures --style xml sift dump --prompt "Review this codebase for race conditions." sift select . --selection-only --print-selection sift pick --no-nerd-fonts
sift dump writes codebase.md by default; --output - writes to stdout
instead. sift --help lists everything else (profiles, ignore rules, secret
scanning).
A .sift.toml in the scanned directory, or ~/.config/sift/config.toml
globally, bundles flags under a --profile name. Flags always win over
profile values:
[profiles.claude] style = "xml" budget = 60000 compress_mode = "signatures" extensions = ["go", "md"] ignore = ["vendor/**", "testdata/**"] prompt_file = "prompts/review.md" smart_filter = true copy_on_generate = true
sift dump --profile claude
- Installation
- Usage
- Interactive picker
- Web UI (
serve) - Configuration and profiles
- Output formats and prompts
- Incremental deltas
Needs Go 1.26+ and a POSIX shell (just test, just test-race, just build,
just dump, just pick cover the common recipes):
go test ./... go vet ./... go test -race ./...
Issues and pull requests are welcome.

