# Supported Commands
Auto-generated by `safe-chains --list-commands`.
Any command with only `--version` or `--help` as its sole argument is always allowed.
## Bare Safe
These commands take no flags or subcommands.
| Command | Description |
|---------|-------------|
| `false` | Return failure exit code |
| `true` | Return success exit code |
| `whoami` | Print current user |
## Unconditionally Safe
These commands are allowed with any arguments. All operations are read-only.
| Command | Description |
|---------|-------------|
| `b2sum` | BLAKE2 checksum |
| `base64` | Base64 encode/decode |
| `basename` | Strip directory from path |
| `bat` | Syntax-highlighted cat |
| `bc` | Calculator |
| `branchdiff` | Branch diff tool |
| `cal` | Display calendar |
| `cd` | Change directory |
| `cksum` | File checksum |
| `cloc` | Count lines of code |
| `colordiff` | Colorized diff |
| `column` | Format into columns |
| `cucumber` | BDD test runner |
| `date` | Display date and time |
| `delta` | Syntax-highlighted diff viewer |
| `df` | Disk free space |
| `dig` | DNS lookup |
| `dirname` | Strip filename from path |
| `du` | Disk usage |
| `dust` | Disk usage viewer |
| `echo` | Print text |
| `exa` | Modern ls replacement |
| `expand` | Convert tabs to spaces |
| `expr` | Evaluate expression |
| `eza` | Modern ls replacement |
| `factor` | Print prime factors |
| `fd` | Find files |
| `file` | Detect file type |
| `fmt` | Reformat text |
| `fold` | Wrap lines |
| `getconf` | Get system configuration values |
| `groups` | Print group memberships |
| `hexdump` | Display file in hex |
| `host` | DNS lookup |
| `htop` | Interactive process viewer |
| `iconv` | Convert character encoding |
| `id` | Print user/group IDs |
| `identify` | ImageMagick identify |
| `ifconfig` | Network interface info |
| `ioreg` | macOS I/O Registry viewer |
| `iotop` | I/O usage monitor |
| `jq` | JSON processor |
| `last` | Show login history |
| `lastlog` | Show last login for all users |
| `locale` | Print locale info |
| `ls` | List directory |
| `lsof` | List open files |
| `md5` | MD5 checksum (macOS) |
| `md5sum` | MD5 checksum |
| `mdfind` | Spotlight search (macOS) |
| `mdls` | File metadata (macOS) |
| `netstat` | Network connections and statistics |
| `nm` | List object file symbols |
| `nproc` | Print number of CPUs |
| `nroff` | Text formatter |
| `nslookup` | DNS lookup |
| `od` | Octal dump |
| `otool` | Object file tool (macOS) |
| `pgrep` | Search for processes |
| `printenv` | Print environment variables |
| `printf` | Format and print text |
| `procs` | Modern process viewer |
| `ps` | List processes |
| `pwd` | Print working directory |
| `readlink` | Resolve symlink |
| `realpath` | Resolve path |
| `route` | Routing table |
| `safe-chains` | Safe command checker |
| `seq` | Print number sequence |
| `sha1sum` | SHA-1 checksum |
| `sha256sum` | SHA-256 checksum |
| `sha512sum` | SHA-512 checksum |
| `shasum` | SHA checksum |
| `shellcheck` | Shell script linter |
| `size` | Object file section sizes |
| `sleep` | Pause execution |
| `ss` | Socket statistics |
| `stat` | File status |
| `strings` | Find printable strings in binary |
| `sum` | File checksum |
| `sw_vers` | macOS version info |
| `system_profiler` | macOS hardware/software info |
| `test` | Evaluate conditional expression |
| `tokei` | Code statistics |
| `top` | Process monitor |
| `tree` | Directory tree |
| `tty` | Print terminal name |
| `type` | Identify command type |
| `uname` | System information |
| `unexpand` | Convert spaces to tabs |
| `unset` | Unset environment variables |
| `uptime` | System uptime |
| `uuidgen` | Generate UUID |
| `vm_stat` | Virtual memory statistics |
| `w` | Show logged-in users and activity |
| `whereis` | Locate binary, source, and man page |
| `which` | Locate command |
| `who` | Show logged-in users |
| `whois` | Domain registration lookup |
| `xxd` | Hex dump |
## Handled Commands
These commands are allowed with specific subcommands or flags.
### `arch`
Allowed: bare `arch` only (prints machine architecture). Flags denied (can execute commands under different architectures).
### `asdf`
Subcommands: current, help, info, list, plugin list, plugin-list, plugin-list-all, version, which. Flags: --version.
### `awk / gawk / mawk / nawk`
Safe unless program contains system, getline, |, >, >>, or -f flag (file-based program).
### `bash / sh`
Allowed: --version, --help. Only `bash -c` / `sh -c` with a safe inner command. Scripts denied.
### `brew`
Subcommands: casks, cat, config, deps, desc, doctor, formulae, home, info, leaves, list, log, outdated, search, shellenv, tap, uses. Flags: --prefix, --version.
### `bun`
Subcommands: outdated, pm bin, pm cache, pm hash, pm ls, test.
Flags: --version.
x delegates to bunx logic.
### `bundle`
Subcommands: check, info, list, show.
Flags: --version.
Guarded: exec (brakeman, cucumber, erb_lint, herb, rspec, standardrb only).
### `bunx`
Allowed packages: @herb-tools/linter, eslint, karma.
Guarded: tsc (requires --noEmit).
Skips flags: --bun/--no-install/--package/-p.
### `cargo`
Subcommands: audit, bench, build, check, clippy, deny, doc, license, locate-project, metadata, pkgid, read-manifest, search, test, tree, verify-project.
Flags: --version.
Guarded: fmt (Requires: --check), package (Requires: --list), publish (Requires: --dry-run. Denied: --force, --no-verify).
+toolchain selectors (e.g. +nightly, +stable) are skipped.
### `cat`
Allowed standalone flags: --number, --number-nonblank, --show-all, --show-ends, --show-nonprinting, --show-tabs, --squeeze-blank, -A, -E, -T, -b, -e, -l, -n, -s, -t, -u, -v. Bare invocation allowed.
### `cmake`
Allowed: --version, --system-information (single argument only).
### `codesign`
Requires: --display, --verify, -d, -v. Denied: --force, --remove-signature, --sign, -f, -s.
### `comm`
Allowed standalone flags: --check-order, --nocheck-order, --total, --zero-terminated, -1, -2, -3, -i, -z. Allowed valued flags: --output-delimiter.
### `command`
Allowed: -v, -V (check if command exists). Bare `command` and execution of other commands denied.
### `composer`
Subcommands: about, audit, check-platform-reqs, diagnose, fund, help, info, licenses, outdated, show, suggests. Flags: --version.
### `conda`
Subcommands: info, list.
Flags: --version.
Guarded: config (--show, --show-sources only).
### `csrutil`
Subcommands: authenticated-root, report, status.
### `curl`
Allowed standalone flags: --compressed, --fail, --globoff, --head, --insecure, --ipv4, --ipv6, --location, --no-buffer, --no-progress-meter, --show-error, --silent, --verbose, -4, -6, -I, -L, -N, -S, -f, -g, -k, -s, -v.
Allowed valued flags: --connect-timeout, --max-time, --write-out, -m, -w.
Allowed methods (-X/--request): GET, HEAD, OPTIONS.
### `cut`
Allowed standalone flags: --complement, --only-delimited, --zero-terminated, -n, -s, -w, -z. Allowed valued flags: --bytes, --characters, --delimiter, --fields, --output-delimiter, -b, -c, -d, -f.
### `defaults`
Subcommands: domains, export, find, read, read-type.
### `deno`
Subcommands: check, doc, info, lint, test.
Flags: --version.
Guarded: fmt (requires --check).
### `diff`
Allowed standalone flags: --brief, --ed, --expand-tabs, --ignore-all-space, --ignore-blank-lines, --ignore-case, --ignore-space-change, --ignore-tab-expansion, --left-column, --minimal, --new-file, --no-dereference, --no-ignore-file-name-case, --normal, --paginate, --rcs, --recursive, --report-identical-files, --show-c-function, --side-by-side, --speed-large-files, --strip-trailing-cr, --suppress-blank-empty, --suppress-common-lines, --text, --unidirectional-new-file, -B, -E, -N, -P, -T, -a, -b, -c, -d, -e, -f, -i, -l, -n, -p, -q, -r, -s, -t, -u, -w, -y. Allowed valued flags: --changed-group-format, --color, --context, --exclude, --exclude-from, --from-file, --ifdef, --ignore-matching-lines, --label, --line-format, --new-group-format, --new-line-format, --old-group-format, --old-line-format, --show-function-line, --starting-file, --tabsize, --to-file, --unchanged-group-format, --unchanged-line-format, --unified, --width, -C, -D, -F, -I, -L, -S, -U, -W, -X, -x.
### `diskutil`
Subcommands: activity, apfs list, apfs listCryptoUsers, apfs listSnapshots, apfs listVolumeGroups, info, list, listFilesystems.
### `docker / podman`
Subcommands: buildx --version, buildx inspect, buildx ls, buildx version, compose --version, compose config, compose images, compose ls, compose ps, compose top, compose version, container diff, container inspect, container list, container logs, container ls, container port, container stats, container top, context inspect, context ls, context show, diff, history, image history, image inspect, image list, image ls, images, info, inspect, logs, manifest inspect, network inspect, network ls, port, ps, stats, system df, system info, top, version, volume inspect, volume ls. Flags: --version.
### `dotnet`
Subcommands: build, list, test. Flags: --info, --list-runtimes, --list-sdks, --version.
### `env`
Strips flags (-i, -u) and KEY=VALUE pairs, then recursively validates the inner command. Bare `env` allowed.
### `find`
Safe unless dangerous flags: -delete, -ok, -okdir, -fls, -fprint, -fprint0, -fprintf. -exec/-execdir allowed when the executed command is itself safe.
### `fnm`
Subcommands: current, default, list, ls-remote. Flags: --version.
### `gem`
Subcommands: contents, dependency, environment, help, info, list, outdated, pristine, search, sources, specification, stale, which. Flags: --version.
### `gh`
Subcommands attestation, cache, codespace, extension, gpg-key, issue, label, pr, release, repo, run, ssh-key, variable, workflow are allowed with actions: checks, diff, list, status, verify, view, watch.
Always safe: --version, search, status.
Guarded: auth (status, token only), browse (requires: --no-browser), api (GET only, no body flags).
### `git`
Subcommands: blame, cat-file, check-ignore, count-objects, describe, diff, diff-tree, fetch, for-each-ref, grep, help, log, ls-files, ls-remote, ls-tree, merge-base, merge-tree, name-rev, reflog, rev-parse, shortlog, show, status, verify-commit, verify-tag.
Flags: --version.
Guarded: remote (deny add, prune, remove, rename, set-branches, set-url), branch (deny --copy, --delete, --edit-description, --move, --set-upstream-to, --unset-upstream, -C, -D, -M, -c, -d, -m, -u), stash (list, show only), tag (list only, deny --annotate, --delete, --force, --sign, -a, -d, -f, -s), config (--get, --get-all, --get-regexp, --list, -l only), worktree (list only), notes (list, show only). Supports `-C <dir>` prefix.
### `glab`
Subcommands ci, cluster, deploy-key, gpg-key, incident, issue, iteration, label, milestone, mr, release, repo, schedule, snippet, ssh-key, stack, variable are allowed with actions: diff, issues, list, status, view.
Always safe: --version, -v, check-update, version.
Guarded: auth (status only), api (GET only, no body flags).
### `go`
Subcommands: build, doc, env, list, test, version, vet. Flags: --version.
### `gradle / gradlew`
Subcommands: build, check, dependencies, properties, tasks, test. Flags: --version.
### `grep`
Allowed standalone flags: --basic-regexp, --binary, --byte-offset, --color, --colour, --count, --dereference-recursive, --extended-regexp, --files-with-matches, --files-without-match, --fixed-strings, --ignore-case, --initial-tab, --invert-match, --line-buffered, --line-number, --line-regexp, --no-filename, --no-messages, --null, --null-data, --only-matching, --perl-regexp, --quiet, --recursive, --silent, --text, --with-filename, --word-regexp, -E, -F, -G, -H, -I, -J, -L, -P, -R, -S, -T, -U, -V, -Z, -a, -b, -c, -h, -i, -l, -n, -o, -p, -q, -r, -s, -v, -w, -x, -z. Allowed valued flags: --after-context, --before-context, --binary-files, --color, --colour, --context, --devices, --directories, --exclude, --exclude-dir, --exclude-from, --file, --group-separator, --include, --label, --max-count, --regexp, -A, -B, -C, -D, -d, -e, -f, -m.
### `head`
Allowed standalone flags: --quiet, --silent, --verbose, --zero-terminated, -q, -v, -z.
Allowed valued flags: --bytes, --lines, -c, -n.
Bare invocation allowed.
### `hostname`
Flags: -A, -I, -d, -f, -i, -s.
### `hyperfine`
Recursively validates each benchmarked command. Denied if --prepare, --cleanup, or --setup flags are used (arbitrary shell execution).
### `jj`
Subcommands: bookmark list, config get, config list, diff, file list, file show, git fetch, git remote list, help, log, op log, root, show, st, status, version, workspace list.
Flags: --version.
Skips global flags: standalone (--debug, --ignore-immutable, --ignore-working-copy, --no-pager, --quiet, --verbose), valued (--at-op, --at-operation, --color, --repository, -R).
### `launchctl`
Subcommands: blame, dumpstate, error, examine, help, hostinfo, list, print, print-cache, print-disabled, resolveport, version.
### `lipo`
Requires: -archs, -detailed_info, -info, -verify_arch. Denied: -output.
### `llm`
Subcommands: aliases, collections, logs, models, plugins, templates. Flags: --version.
### `log`
Subcommands: help, show, stats, stream.
### `magick`
Subcommands: identify. Flags: --help, --version.
### `mise`
Subcommands: config list, config ls, current, doctor, env, list, ls, settings get, which. Flags: --version.
### `mvn / mvnw`
Subcommands: compile, dependency:list, dependency:tree, help:describe, test, test-compile, validate, verify. Flags: --version, -v.
### `networksetup`
Allowed: subcommands starting with -list, -get, -show, -print, plus -version and -help.
### `nice / ionice`
Skips priority flags (-n/--adjustment), then recursively validates the inner command.
### `nl`
Allowed standalone flags: --no-renumber, -p.
Allowed valued flags: --body-numbering, --footer-numbering, --header-numbering, --join-blank-lines, --line-increment, --number-format, --number-separator, --number-width, --section-delimiter, --starting-line-number, -b, -d, -f, -h, -i, -l, -n, -s, -v, -w.
Bare invocation allowed.
### `npm`
Subcommands: audit, doctor, explain, fund, info, list, ls, outdated, prefix, root, test, view, why.
Flags: --version.
Guarded: config (list/get only), run/run-script (test/test:* only).
### `npx`
Allowed packages: @herb-tools/linter, eslint, karma.
Guarded: tsc (requires --noEmit).
Skips flags: --yes/-y/--no/--package/-p.
### `nvm`
Subcommands: current, list, ls, ls-remote, version, which. Flags: --version.
### `ollama`
Subcommands: list, ps, show. Flags: --version.
### `paste`
Allowed standalone flags: --serial, --zero-terminated, -s, -z.
Allowed valued flags: --delimiters, -d.
Bare invocation allowed.
### `perl`
Allowed: -e/-E inline one-liners with safe code, --version, --help, -v, -V. Blocked: script files (no -e/-E), -i (in-place edit), s///e modifier, backticks, and code containing identifiers not in the safe built-in allowlist.
### `pip / pip3`
Subcommands: check, debug, freeze, help, index, inspect, list, show.
Flags: --version.
Guarded: config (list/get only).
### `pkgutil`
Requires: --check-signature, --export-plist, --file-info, --file-info-plist, --files, --group-pkgs, --groups, --groups-plist, --packages, --payload-files, --pkg-groups, --pkg-info, --pkg-info-plist, --pkgs, --pkgs-plist. Denied: --expand, --flatten, --forget, --learn.
### `plutil`
Flags: -help, -lint, -p, -type.
### `pmset`
Allowed: -g (get/display settings only).
### `pnpm`
Subcommands: audit, list, ls, outdated, why. Flags: --version.
### `poetry`
Subcommands: check, env info, env list, show. Flags: --version.
### `pyenv`
Subcommands: help, root, shims, version, versions, which. Flags: --version.
### `rbenv`
Subcommands: help, root, shims, version, versions, which. Flags: --version.
### `rev`
Bare invocation allowed.
### `rg`
Allowed standalone flags: --binary, --block-buffered, --byte-offset, --case-sensitive, --column, --count, --count-matches, --crlf, --debug, --files, --files-with-matches, --files-without-match, --fixed-strings, --follow, --glob-case-insensitive, --heading, --hidden, --ignore-case, --ignore-file-case-insensitive, --include-zero, --invert-match, --json, --line-buffered, --line-number, --line-regexp, --max-columns-preview, --mmap, --multiline, --multiline-dotall, --no-config, --no-filename, --no-heading, --no-ignore, --no-ignore-dot, --no-ignore-exclude, --no-ignore-files, --no-ignore-global, --no-ignore-messages, --no-ignore-parent, --no-ignore-vcs, --no-line-number, --no-messages, --no-mmap, --no-pcre2-unicode, --no-require-git, --no-unicode, --null, --null-data, --one-file-system, --only-matching, --passthru, --pcre2, --pcre2-version, --pretty, --quiet, --search-zip, --smart-case, --sort-files, --stats, --text, --trim, --type-list, --unicode, --unrestricted, --vimgrep, --with-filename, --word-regexp, -F, -H, -I, -L, -N, -P, -S, -U, -V, -a, -b, -c, -h, -i, -l, -n, -o, -p, -q, -s, -u, -v, -w, -x, -z. Allowed valued flags: --after-context, --before-context, --color, --colors, --context, --context-separator, --dfa-size-limit, --encoding, --engine, --field-context-separator, --field-match-separator, --file, --glob, --iglob, --ignore-file, --max-columns, --max-count, --max-depth, --max-filesize, --path-separator, --regex-size-limit, --regexp, --replace, --sort, --sortr, --threads, --type, --type-add, --type-clear, --type-not, -A, -B, -C, -E, -M, -T, -e, -f, -g, -j, -m, -r, -t.
### `rustup`
Subcommands: component list, doc, show, target list, toolchain list, which.
Flags: --version.
run <toolchain> delegates to inner command validation.
### `security`
Subcommands: cms, dump-keychain, dump-trust-settings, find-certificate, find-generic-password, find-identity, find-internet-password, list-keychains, show-keychain-info, smartcard, verify-cert.
### `sed`
Safe unless -i/--in-place flag or 'e' modifier on substitutions (executes replacement as shell command).
### `sort`
Safe unless -o/--output or --compress-program flag.
### `spctl`
Requires: --assess, -a. Denied: --add, --disable, --enable, --master-disable, --master-enable, --remove.
### `swift`
Subcommands: build, package describe, package dump-package, package show-dependencies, test. Flags: --version.
### `sysctl`
Safe unless -w/--write flag or key=value assignment syntax.
### `tac`
Allowed standalone flags: --before, --regex, -b, -r.
Allowed valued flags: --separator, -s.
Bare invocation allowed.
### `tail`
Allowed standalone flags: --follow, --quiet, --retry, --silent, --verbose, --zero-terminated, -F, -f, -q, -r, -v, -z.
Allowed valued flags: --bytes, --lines, --max-unchanged-stats, --pid, --sleep-interval, -b, -c, -n.
Bare invocation allowed.
### `tea`
Subcommands b, branch, branches, i, issue, issues, label, labels, milestone, milestones, ms, n, notification, notifications, org, organization, organizations, pr, pull, pulls, r, release, releases, repo, repos, t, time, times are allowed with actions: list, view. Bare subcommand (no action) is also safe.
Always safe: --version, -v, whoami.
Guarded: logins/login (list only).
### `time`
Skips -p flag, then recursively validates the inner command.
### `timeout`
Skips timeout flags (-s/--signal, -k/--kill-after, --preserve-status), then recursively validates the inner command.
### `tr`
Allowed standalone flags: --complement, --delete, --squeeze-repeats, --truncate-set1, -C, -c, -d, -s.
### `uniq`
Allowed standalone flags: --count, --ignore-case, --repeated, --unique, --zero-terminated, -D, -c, -d, -i, -u, -z.
Allowed valued flags: --all-repeated, --check-chars, --group, --skip-chars, --skip-fields, -f, -s, -w.
Bare invocation allowed. Max 1 positional arg (second would be output file).
### `uv`
Subcommands: pip check, pip freeze, pip list, pip show, python list, tool list. Flags: --version.
### `volta`
Subcommands: list, which. Flags: --version.
### `wc`
Allowed standalone flags: --bytes, --chars, --lines, --max-line-length, --words, --zero-terminated, -L, -c, -l, -m, -w.
Allowed valued flags: --files0-from.
Bare invocation allowed.
### `xargs`
Recursively validates the inner command. Skips xargs-specific flags (-I, -L, -n, -P, -s, -E, -d, -0, -r, -t, -p, -x).
### `xcode-select`
Allowed: -p/--print-path, -v/--version. Denied: -s/--switch, -r/--reset, --install.
### `xcodebuild`
Flags: -list, -showBuildSettings, -showdestinations, -showsdks, -version.
### `xcrun`
Subcommands: notarytool history, notarytool info, notarytool log, simctl list, stapler validate.
Flags: --find, --show-sdk-build-version, --show-sdk-path, --show-sdk-platform-path, --show-sdk-platform-version, --show-sdk-version, --show-toolchain-path.
Skips flags: --sdk/--toolchain (with arg), -v/-l/-n.
### `xmllint`
Safe unless --output flag.
### `yarn`
Subcommands: info, list, ls, why.
Flags: --version.
Also allowed: test, test:*.
### `yq`
Safe unless -i/--inplace flag.