Cheat Sheet
Discovery
Section titled “Discovery”# Territory scan — one call replaces 10-15 Glob/LS roundsftree --snapshot -o json /project
# Unified search — auto-routes by query intentfs "authenticate" --scope '*.py'
# File discoveryfsearch '*.py' src -o paths
# Directory listing with reconfls src/providers --mode recon
# Bounded content searchfcontent "authenticate" src/*.pyReading
Section titled “Reading”# Symbol skeleton of a filefmap src/auth.py
# Read exactly one functionfread src/auth.py --symbol authenticate
# Read an exact line rangefread src/auth.py --lines 120:160
# Read with context around a pattern matchfread src/auth.py --around "JWT_SECRET"Editing
Section titled “Editing”# Replace an exact line range (fastest mode)fedit src/auth.py --lines 71:73 --with-text "new code"
# Scope edit to a symbol without needing unique contextfedit src/auth.py --function_name authenticate --replace "old" --with-text "new"
# Insert after an anchorfedit src/auth.py --after "import foo" --with-text "\nimport bar"
# Create a new file atomicallyfwrite src/new.ts --content "file contents"# Token-budgeted shell — suggests fsuite tools when you're doing something sillyfbash --tag build -- npm run build
# Background jobfbash --background -- npm testInvestigation
Section titled “Investigation”fcase init my-bug --goal "trace 401 errors"fcase note my-bug --body "root cause: stale JWT in redis"fcase resolve my-bug --summary "added TTL check to middleware"
# Search past cases before starting new workfcase find --status all --deep --query "auth"Binary
Section titled “Binary”# Extract stringsfprobe strings ./binary --pattern VERSION
# Window-read bytes around an offsetfprobe window ./binary --offset 0x1000 --size 256
# In-place patchfprobe patch ./binary --offset 0x1234 --replace "new bytes"Measurement
Section titled “Measurement”fmetrics import # pull JSONL → SQLitefmetrics stats -o json # summaryfmetrics predict /project # best-next-tool predictionfreplay --session auth-bug # rerun a traced investigationOutput formats
Section titled “Output formats”-o json # Programmatic parsing-o paths # Pipe file lists into other tools-o pretty # Human terminal output (default)-q # Existence check, silent, exit code only