# Supported Commands
Auto-generated by `safe-chains --list-commands`.
Any command with only `--version` or `--help` as its sole argument is always allowed.
## Unconditionally Safe
These commands are allowed with any arguments.
| Command | Description |
|---------|-------------|
| `arch` | Print machine architecture |
| `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 |
| `cat` | Print file contents |
| `cd` | Change directory |
| `cksum` | File checksum |
| `cloc` | Count lines of code |
| `colordiff` | Colorized diff |
| `column` | Format into columns |
| `comm` | Compare sorted files |
| `command` | Run command or check existence |
| `cucumber` | BDD test runner |
| `cut` | Extract fields from lines |
| `date` | Display date and time |
| `delta` | Syntax-highlighted diff viewer |
| `df` | Disk free space |
| `diff` | Compare files |
| `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 |
| `false` | Return failure exit code |
| `fd` | Find files |
| `file` | Detect file type |
| `fmt` | Reformat text |
| `fold` | Wrap lines |
| `getconf` | Get system configuration values |
| `grep` | Search file contents |
| `groups` | Print group memberships |
| `head` | Print first lines |
| `hexdump` | Display file in hex |
| `host` | DNS lookup |
| `hostname` | Print hostname |
| `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 |
| `nl` | Number lines |
| `nm` | List object file symbols |
| `nproc` | Print number of CPUs |
| `nslookup` | DNS lookup |
| `od` | Octal dump |
| `otool` | Object file tool (macOS) |
| `paste` | Merge lines of files |
| `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 |
| `rev` | Reverse lines |
| `rg` | Ripgrep search |
| `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 |
| `tac` | Print file in reverse |
| `tail` | Print last lines |
| `test` | Evaluate conditional expression |
| `tokei` | Code statistics |
| `top` | Process monitor |
| `tr` | Translate characters |
| `tree` | Directory tree |
| `true` | Return success exit code |
| `tty` | Print terminal name |
| `uname` | System information |
| `unexpand` | Convert spaces to tabs |
| `uniq` | Filter duplicate lines |
| `unset` | Unset environment variables |
| `uptime` | System uptime |
| `uuidgen` | Generate UUID |
| `vm_stat` | Virtual memory statistics |
| `w` | Show logged-in users and activity |
| `wc` | Count lines/words/bytes |
| `which` | Locate command |
| `who` | Show logged-in users |
| `whoami` | Print current user |
| `whois` | Domain registration lookup |
| `xxd` | Hex dump |
## Handled Commands
These commands are allowed with specific subcommands or flags.
### `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.
Any subcommand with --help is safe (unless -- separator is present).
### `cmake`
Allowed: --version, --system-information (single argument only).
### `codesign`
Requires: --display, --verify, -d, -v. Denied: --force, --remove-signature, --sign, -f, -s.
### `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.
### `defaults`
Subcommands: domains, export, find, read, read-type.
### `deno`
Subcommands: check, doc, info, lint, test.
Flags: --version.
Guarded: fmt (requires --check).
### `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.
### `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 show, git fetch, git remote list, help, log, op log, show, st, status, version.
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.
### `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.
### `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.
### `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.
### `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.
### `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.
### `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.
### `uv`
Subcommands: pip check, pip freeze, pip list, pip show, python list, tool list. Flags: --version.
### `volta`
Subcommands: list, which. Flags: --version.
### `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.