Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Modern CLI hints

When a command reaches for a legacy tool that has a sharper modern alternative, tool-gates may attach a one-line suggestion via additionalContext. Hints never determine the permission decision; applicable allow and ask responses can carry them. They fire only when the modern tool is installed on this machine. Repeated suggestions are deduplicated, and each response carries at most three unique hints. Code-search guidance names capabilities rather than project-scoped tools that may not be loaded. Generated from the hint catalog in src/hints.rs.

Legacy → modern

7-day cache · tool-gates --tools-status to inspect
$ cat
$ bat
Tip from tool-gates: Line-numbered, syntax-highlighted output; precise follow-up edits.
$ less
$ bat
Tip from tool-gates: Paged, line-numbered viewing without a separate pager.
$ more
$ bat
Tip from tool-gates: Paged, line-numbered viewing without a separate pager.
$ head -n N <file>
$ bat -r :N
Tip from tool-gates: Arbitrary line ranges, not just first-N, with line numbers.
$ tail -n N <file>
$ bat -r -N:
Tip from tool-gates: Arbitrary line ranges, not just last-N, with line numbers.
$ grep
$ rg
Tip from tool-gates: Recursive by default, respects .gitignore, faster on large trees.
$ sg
$ ast-grep
Tip from tool-gates: Uses the supported executable name and avoids collision with the unrelated system `sg` group command.
$ ag / ack
$ rg
Tip from tool-gates: Faster with a similar interface.
$ find
$ fd
Tip from tool-gates: Shorter syntax, .gitignore-aware, faster.
$ rg/grep on PDFs, office docs, archives
$ rga
Tip from tool-gates: Searches inside PDF, docx, epub, and archives; plain rg/grep sees only bytes there.
$ sed s/.../.../
$ sd
Tip from tool-gates: Plain find/replace on non-code text, no s/.../.../g escaping.
$ awk '{print $N}'
$ choose
Tip from tool-gates: Field selection routes to choose; column sums to jq; line counts to rg -c; byte math to numbat; positional row/field to jc.
$ wc -l <file>
$ rg -c '.'
Tip from tool-gates: Counts non-blank lines without a separate utility (piped wc -l is fine).
$ curl <github-url>
$ gh api
Tip from tool-gates: Preserves auth, rate limits, and private-repo access.
$ wget <github-url>
$ gh api
Tip from tool-gates: Preserves auth, rate limits, and private-repo access.
$ xxd / hexdump
$ hexyl
Tip from tool-gates: Colored, readable hex output.
$ cloc
$ tokei
Tip from tool-gates: Faster with clearer formatting.
$ aspell / codespell
$ typos
Tip from tool-gates: Fast source-aware spell check with low false positives; read-only by default.
$ youtube-dl
$ yt-dlp
Tip from tool-gates: Maintained fork; youtube-dl is abandoned and breaks on current sites.
$ pip install
$ uv pip
Tip from tool-gates: Faster, lockfile-aware, cache-shared.
$ python -m venv
$ uv venv
Tip from tool-gates: Faster; picks up the project's Python pin.
$ dig / nslookup
$ doggo
Tip from tool-gates: Colored output, JSON with --json, modern defaults.
$ unzip
$ ouch decompress
Tip from tool-gates: Format-agnostic (zip/tar/gz/xz/7z), auto-detects.
$ zip
$ ouch compress
Tip from tool-gates: Format inferred from the output extension.
$ tar -x
$ ouch decompress
Tip from tool-gates: Format-agnostic, auto-detects compression (create with tar -c).

tool-gates · permission gate hook for Claude Code, Codex CLI, and Antigravity CLI, with deprecated Gemini CLI support. github.com/camjac251/tool-gates

13 gates · 400+ commands · built from rules/*.toml