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.
$ sed s/.../.../
$ sd
Tip from tool-gates: Plain find/replace, 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 lines without a separate utility (piped wc -l is fine).
$ ls -la
$ eza -la
Tip from tool-gates: Git status integration and clearer formatting.
$ du
$ dust
Tip from tool-gates: Visual disk-usage tree (du -sh summaries are fine).
$ tree
$ eza -T
Tip from tool-gates: Git status integration and clearer formatting.
$ ps aux
$ procs
Tip from tool-gates: Readable columns and a tree view.
$ 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.
$ diff <a> <b>
$ difft
Tip from tool-gates: Syntax-aware diffs (git diff for unified patches).
$ xxd / hexdump
$ hexyl
Tip from tool-gates: Colored, readable hex output.
$ cloc
$ tokei
Tip from tool-gates: Faster with clearer formatting.
$ man
$ tldr
Tip from tool-gates: Practical examples, concise output.
$ 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