FAQ
Short answers to the questions people ask most about shellfirm.
Can I allow a command just once?
No. There is no "allow once" switch or bypass variable. To run a flagged command, solve its challenge. To stop being asked about a check for good, ignore its id:
shellfirm config ignore git:reset # never prompt for this check
shellfirm config ignore --remove git:reset # undoThe banner prints the exact command for the check that matched. Unknown ids are rejected, so a typo cannot leave you unprotected.
Why a math problem?
A small sum makes you stop and read the banner instead of pressing Enter out
of habit. The default challenge is a math problem. Critical commands, and
commands in a risky context (a push to a protected branch, root, a
production cluster), ask you to type yes instead. You can choose Enter or
Yes as your challenge with shellfirm config challenge. If math is hard
for you, see Accessibility.
Does shellfirm slow down my shell?
Not noticeably. Measured with the native binary: a safe line adds about 2 to 3 ms, and loading the hook adds about 10 ms to a new bash or zsh (4 ms for fish). Installed with npm, each call also starts Node.js (about 17 ms more); Homebrew, Cargo or a release binary avoid that. The numbers and how to measure them yourself are on Performance.
For a risky command, shellfirm measures what it would affect before showing the banner,
within one time budget: 400 ms by default, 5000 ms at most. When that takes
longer than 200 ms you see shellfirm: checking impact… (Ctrl-C cancels).
Change it with shellfirm config impact-budget <ms>; 0 turns the
measurement off.
Can someone bypass it?
shellfirm is a guard against mistakes, not a sandbox. Common spellings are
followed: command rm -rf ~, \rm -rf ~, env rm -rf ~ and sudo … are
all checked. But anyone can remove the hook from their rc file, and scripts
you run are not read. See Known limitations.
Can an AI agent get around it?
With shellfirm connect <agent> (Claude Code, Cursor, Codex CLI, Gemini CLI, Qwen
Code, Copilot CLI, Windsurf, Cline or OpenCode), every shell command line the
agent runs goes through the agent hook. The hook reads the command line, not
the files the agent writes: an agent that writes a script and then runs it
(bash cleanup.sh) is only checked on bash cleanup.sh. See
Known limitations. Agents cannot solve a challenge, so
risky commands are handed back to you (ask; blocked in agents whose hooks
cannot ask) and dangerous ones are denied.
Agents are also stopped from quietly editing shellfirm's settings, policies,
hooks, shell startup files and agent instruction files (self-protection).
Claude Code hooks fail closed (2.1.295 and later): if shellfirm is missing or
crashes, the tool call is blocked; so do Copilot CLI, Cline and OpenCode.
Cursor, Codex CLI, Qwen Code and Windsurf hooks are not fail-closed. To stop
what a script does once it runs, turn on the agent sandbox.
See AI agents.
What is logged, and where?
Every decision on a risky command (allowed, denied, cancelled, skipped below
your threshold, handed to an agent's prompt, blocked without a terminal) is
written to audit.log next to your settings file, as JSON Lines. Commands
that match no check are not logged. Values that look like secrets are
replaced with ***. The log stays on your machine. See
Audit log.
Is my command data sent anywhere?
No, unless you turn on the experimental LLM analysis
(shellfirm config llm, used only for AI-agent commands when
agent.llm_review is enabled). Then the command text is sent to the provider
you configured.
Can my personal settings weaken a team policy?
No. Checks that a project policy (.shellfirm.yaml) or the org policy
denies, overrides or adds stay active for you, even if you ignore them,
disable their group or raise min_severity. shellfirm policy show lists
which of your settings the policy overrides. To change a rule, change the
policy file, in code review. See Team policies.
Does it work in scripts and CI?
The shell hook only runs in interactive shells. In scripts and CI, call shellfirm yourself:
shellfirm check -c "$CMD" --fail-on high
shellfirm policy validate --strictIf a hooked shell runs a risky command without a terminal, the command is blocked (exit 74). See CI/CD pipelines.
Does it work with sudo?
Yes. sudo and its options are followed to the real command, and running as
root raises the challenge (critical context). For example sudo rm -rf
~/projects asks you to type yes ("runs as root (sudo)").
Which platforms does it run on?
macOS (Apple Silicon and Intel), Linux and Windows. The npm package covers
macOS, Linux x64 and Windows x64. On Linux arm64 (Graviton, Raspberry Pi,
Docker on Apple Silicon) install with cargo install shellfirm --locked. The
full table is in Supported platforms.
What about Windows?
There is a Windows x64 binary (npm, release archive or Cargo). The PowerShell
hook is shipped but not yet tested end to end. Under WSL you run a real Linux
shell (bash, zsh, fish), which is tested. cmd.exe is not supported.
Does it work with oh-my-zsh, powerlevel10k, starship or atuin?
Yes. The hook line can go anywhere in your rc file, and plugins that rebind Enter after it are still covered. zsh-autosuggestions, zsh-syntax-highlighting and bash-preexec work too. bash with ble.sh is not supported. See Plugins and frameworks.
Is it open source?
Yes. shellfirm is licensed under Apache-2.0 (LICENSE) and written in Rust. It is free to use, also commercially. See Contributing to add a check, and Security to report a vulnerability.
How do I update?
Update the binary the way you installed it (npm install -g @shellfirm/cli,
brew upgrade shellfirm, cargo install shellfirm --locked), then restart
your shells and re-run shellfirm connect <agent> for each agent. A hook
embedded in the rc file (nushell, elvish, xonsh) is updated by running
shellfirm init --all again. Coming from 0.3.10? Read
Upgrading to 0.4.0.
How do I uninstall?
shellfirm init --uninstall # remove the hooks from your rc files
shellfirm connect claude-code --uninstall # if you connected an AI tool
shellfirm status # confirm: no shell shows "installed"Then restart open shells and remove the binary. See Uninstall.
How many checks are there?
532 built-in checks in 23 groups, all on by default. List them with
shellfirm check --list --all, or browse
Protection coverage. You can add your own
custom checks.