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

Basic Utilities gate

priority 100 unknown ask structure safe_commands array ~180 commands

The default-safe list. Unlike other gates, basics doesn't define per-program rules: it's one big safe_commands = […] array of commands that are always allowed without prompting. Lowest priority (100) so other gates' specific rules win first.

Display & output

echoprintfprintcatzcatheadtaillessmorebatbatcat

Listing & finding

lsezalsdtreefindfdlocatewhichwhereistype

Text processing

greprgripgrepzgrepchoosecutsortuniqwctrcolumnpastejoincommdiffcmpfoldfmtnlrevtacexpandunexpandpr

File info

filestatdudflsofreadlinkrealpathbasenamedirnamelsattrgetfacl

Process & system info

pstophtopbtopprocspgreppidofuptimewwhowhoamiidgroupsunamehostnamehostnamectldatecalfreevmstatiostatnproclscpulsmemlsblklspcilsusblocalegetconf

GPU & display info

vainfovdpauinfoglxinfoclinfoxdpyinfoxwininfo

Network info

pingtraceroutetracepathmtrdignslookuphostwhoisssnetstatipifconfigroutearp

Archive & document inspection

zipinfounrarpdftotextpdfinfo

Dev tools (read-only)

tokeiclocsccloctoken-counterjqyqgronhexdumpxxdbase64odhexylstringsdeltadifftdustpastelnumbatfzftigglowjc

Navigation

zzizoxide

Checksums

sha256summd5sumsha1sumsha512sumb2sumcksumb3sumxxhsumxxh32sumxxh64sumxxh128sum

Help & docs

maninfohelptldrtealdeercheat

Shell built-ins & misc

mktemptruefalseyesseqexprbcdcfactorsleepwaitprintenvenvexportsetpwdcdpushdpopddirsunaliashashtest[[[dpkg-queryreadexit

Three custom handlers extend the list. check_xargs allows xargs only when the target command is itself in safe_commands; otherwise asks. check_shell_c parses bash -c/-lc '…' / sh -c '…' / zsh -c '…' and runs the raw security floor, then checks every command in the inner script. check_command_builtin handles command -v / -V and evaluates other invocations through the gate engine.

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