GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bethropolis/sift: A code dumping tool for LLMs

BranchesTags
Open more actions menu

Latest commit

 

History

263 Commits
263 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cmd/sift
cmd/sift
 
 
docs
docs
 
 
internal
internal
 
 
packaging
packaging
 
 
scripts
scripts
 
 
site
site
 
 
skills
skills
 
 
web
web
 
 
.gitignore
.gitignore
 
 
.goreleaser.yaml
.goreleaser.yaml
 
 
.sift.toml
.sift.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
justfile
justfile
 
 
mise.toml
mise.toml
 
 

Repository files navigation

Sift

CodeFactor GitHub release (latest by date) GitHub license Go Reference Go Version

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's interactive picker showing the file tree, live token counts, and a preview pane

What it does

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.

Commands

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.

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.

Rather click? Use the browser.

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.

Sift's web UI with the same file tree, live token counts, and preview pane, running in a browser

Mobile pairing, remote TLS, and the PWA flow: docs/serve.md.

Incremental deltas

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

Dump history

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.

Agent Skills

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

Installation

macOS / Linux — installs to ~/.local/bin:

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

macOS (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.sh

Prebuilt 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.

Usage

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).

Profiles

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

Documentation

  • Installation
  • Usage
  • Interactive picker
  • Web UI (serve)
  • Configuration and profiles
  • Output formats and prompts
  • Incremental deltas

Development

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 ./...

Contributing

Issues and pull requests are welcome.

License

MIT

About

A code dumping tool for LLMs

bethropolis.github.io/sift/

Topics

clicode-contextcommand-line-toolcontent-aggregatorgogolangllm

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.