shellfirm config
Change shellfirm settings from the command line or the interactive editor. Every subcommand and option.
shellfirm config manages your personal settings. Without a subcommand it
opens the interactive editor (TUI). Every setter writes only the key you
change, validates ids and values, and never overwrites an invalid file.
Usage: shellfirm config [OPTIONS] [COMMAND]Every config subcommand accepts --config-dir <DIR> (use the shellfirm
configuration in DIR) and -h, --help.
Subcommands
| Subcommand | Description |
|---|---|
show | Show current configuration |
reset | Reset configuration to defaults (the old file is backed up first) |
edit | Open settings.yaml in $EDITOR; invalid edits are rejected and the file is left unchanged |
challenge | Set the challenge type (Math, Enter, Yes) |
approved-notice | Turn the approved, running: <command> line after a passed challenge on or off |
impact-budget | Set the total time (ms) for measuring a command's impact before the prompt |
severity | Set the minimum severity threshold |
groups | Enable or disable check groups (lists them without arguments) |
ignore | Manage ignored check ids (stop asking for these checks) |
deny | Manage denied check ids (always blocked, no challenge) |
llm | Configure LLM analysis settings |
context | Configure context-aware protection settings |
escalation | Manage challenge escalation settings |
shellfirm config # interactive editor (needs a terminal)
shellfirm config show # current settings
shellfirm config challenge Yes # Math | Enter | Yes
shellfirm config severity High # all | Info | Low | Medium | High | Critical
shellfirm config approved-notice off # on | off
shellfirm config impact-budget 1000 # 0 (off) to 5000 ms
shellfirm config ignore git:reset
shellfirm config deny git:force_push
shellfirm config groups --disable heroku
shellfirm config context branches --add develop
shellfirm config escalation check git:force_push YesA bad value exits 2 (usage error) with a message that names the valid values. Nothing is written.
Interactive editor
shellfirm config with no subcommand opens a keyboard-driven editor. Press
? for the keys. The active tab is shown as [Name] and the selected row is
marked with >, so focus is visible without colour. The editor needs a
terminal of at least 60x16 and does not start under TERM=dumb; use the
subcommands there instead.
show
Prints the effective settings, including defaults you never wrote:
$ shellfirm config show
config: /home/dev/.config/shellfirm/settings.yaml (not created yet — showing defaults)
challenge: Math
min_severity: (all)
audit: enabled
audit_max_files: 5 (rotated audit.log.N files kept; each up to 10 MiB)
blast_radius: enabled (at most 400 ms per command; `shellfirm config impact-budget <ms>`)
approved_notice: on, a line after a passed challenge (`shellfirm config approved-notice on|off`)
groups (23 active, 0 disabled):
aws, azure, base, database, docker, exfil, flyio, fs, gcp, git, github, heroku, kubernetes, mongodb, mysql, netlify, network, npm, psql, redis, shell, terraform, vercel
context:
protected branches: main, master, production, release/*
production k8s: prod, production, prd, live
escalation: at least Math in an elevated context (SSH, or git / kubectl did not answer in time), at least Yes in a critical one (root, production k8s / env, sensitive paths, and commands that push to, rewrite or delete a protected branch)
escalation:
severity: minimum challenge per severity (a challenge is only ever raised; Enter < Math < Yes)
Critical: at least Yes, High: at least Math, Medium: at least Enter, Low: at least Enter, Info: at least Enter
llm: (not configured)
agent: auto-deny severity: HIGHconfig show also lists warnings and whether a project policy applies.
reset
| Option | Description |
|---|---|
-y, --yes | Reset without prompting (no setup questions) |
config reset asks, writes settings.yaml.bak.<timestamp> next to the
settings file, then runs the setup questions again. Only the three newest
backups are kept. Aborting a question (Esc / Ctrl-C) leaves the file
untouched.
$ shellfirm config reset --yes
shellfirm settings reset (/home/dev/.config/shellfirm/settings.yaml)edit
Opens a temporary copy of settings.yaml in $VISUAL / $EDITOR
(arguments allowed, for example code -w). If the result does not parse,
uses an invalid value, has an unknown key, or names an unknown check id or
group, nothing is applied. The original file is left unchanged and the path
of your edited copy is printed.
challenge
Usage: shellfirm config challenge [OPTIONS] [value][value]: Math, Enter or Yes. Values are case-sensitive.
$ shellfirm config challenge Foo
shellfirm: error: invalid challenge type: 'Foo'. Valid values: Math, Enter, YesThat exits 2. See Challenge types.
approved-notice
Usage: shellfirm config approved-notice [OPTIONS] [value][value]: on or off. Without a value it shows the current setting.
After you pass a challenge, shellfirm prints one dim line on the terminal,
✓ approved — running: <command>, so a slow command does not look hung.
$ shellfirm config approved-notice
approved_notice = on
(change it with `shellfirm config approved-notice on|off`)
$ shellfirm config approved-notice off
approved_notice = offimpact-budget
Usage: shellfirm config impact-budget [OPTIONS] [MS][MS]: milliseconds, 0 to 5000 (default 400). This is
blast_radius_budget_ms: the total time shellfirm may spend measuring one
command's impact before the prompt. 0 turns the measurement off. Without a
value it shows the current setting. Setting 400 removes the key from the
file.
$ shellfirm config impact-budget
blast_radius_budget_ms = 400
(change it with `shellfirm config impact-budget <ms>`; 0 turns the impact measurement off, at most 5000, default 400)
$ shellfirm config impact-budget 1000
blast_radius_budget_ms = 1000
$ shellfirm config impact-budget 9000
shellfirm: error: invalid impact budget '9000': give milliseconds from 0 (off) to 5000, e.g. `shellfirm config impact-budget 400`The last command exits 2. See Blast radius.
severity
Usage: shellfirm config severity [OPTIONS] [level][level]: all, Info, Low, Medium, High or Critical. Checks below
the level do not prompt (they are logged as Skipped). all removes the
threshold.
$ shellfirm config severity High
min_severity = HIGHMedium is the recommended Balanced level that shellfirm init --yes sets.
A check that a project policy enforces still prompts below your threshold.
groups
Usage: shellfirm config groups [OPTIONS]| Option | Description |
|---|---|
--list | List every group and whether it is active (the default) |
--pick | Choose the active groups in an interactive checklist |
--enable <enable> | Enable a check group |
--disable <disable> | Disable a check group |
Only the change is written: --disable heroku adds heroku to
disabled_groups and leaves enabled_groups alone, so groups added by a
later release are still enabled for you.
$ shellfirm config groups
check groups:
aws active
azure active
base active
...
terraform active
vercel active
23 of 23 active. Change with `shellfirm config groups --enable <GROUP>` / `--disable <GROUP>`.See Check groups.
ignore
Usage: shellfirm config ignore [OPTIONS] [CHECK_ID]| Option | Description |
|---|---|
[CHECK_ID] | Check id to add to the ignore list (for example git:reset) |
--remove <CHECK_ID> | Check id to remove from the ignore list |
--list | List the ignored check ids (the default without arguments) |
Manages ignores_patterns_ids: check ids that never challenge you. A personal
deny, and a project or org policy that enforces the check, always win over an
ignore. Unknown ids are rejected with suggestions, so a typo cannot leave you
silently unprotected:
$ shellfirm config ignore git:rest
shellfirm: error: unknown check id: 'git:rest'.
Did you mean: git:reset, git:restore_discard_all, git:restore_discard_path, database:firebase_firestore_delete, database:firebase_firestore_delete_all
List all ids with `shellfirm check --list --all`.That exits 2. There is no "allow once" switch: to run a flagged command, solve its challenge.
deny
Usage: shellfirm config deny [OPTIONS] [CHECK_ID]| Option | Description |
|---|---|
[CHECK_ID] | Check id to add to the deny list (for example git:force_push) |
--remove <CHECK_ID> | Check id to remove from the deny list |
--list | List the denied check ids (the default without arguments) |
Manages deny_patterns_ids: commands that match these checks are always
blocked, with no challenge. A deny wins over an ignore of the same id.
$ shellfirm config deny git:force_push
deny list: added 'git:force_push'
$ shellfirm config deny
deny list:
git:force_pushescalation
Raises the minimum challenge. Three subcommands:
escalation severity
| Option | Description |
|---|---|
--enabled <enabled> | Enable or disable severity escalation (true / false) |
--critical <critical> | Challenge for Critical severity (Math, Enter, Yes) |
--high <high> | Challenge for High severity |
--medium <medium> | Challenge for Medium severity |
--low <low> | Challenge for Low severity |
--info <info> | Challenge for Info severity |
Defaults: Critical at least Yes, High at least Math, Medium, Low and Info at least Enter. Lowering one below the default is accepted with a warning.
$ shellfirm config escalation severity --medium Math
severity escalation updated: medium = Mathescalation group
Usage: shellfirm config escalation group [OPTIONS] [name] [challenge][name] is a group (fs, git, kubernetes, …), [challenge] is Math,
Enter or Yes. --remove <group> removes an override, --list lists them.
$ shellfirm config escalation group kubernetes Yes
group override: kubernetes = Yesescalation check
Usage: shellfirm config escalation check [OPTIONS] [id] [challenge][id] is a check id, [challenge] is Math, Enter or Yes. --remove <id>
removes an override, --list lists them.
$ shellfirm config escalation check git:force_push Yes
check-id override: git:force_push = YesGroup and check overrides only ever raise the challenge, so Enter there
warns that it changes nothing.
context
Configures context-aware protection. Five subcommands; each lists its values without arguments.
| Subcommand | Options | Setting |
|---|---|---|
branches | --list, --add <branch>, --remove <branch> | context.protected_branches (default main, master, production, release/*) |
k8s | --list, --add <pattern>, --remove <pattern> | context.production_k8s_patterns (default prod, production, prd, live) |
paths | --list, --add <path>, --remove <path> | context.sensitive_paths (globs allowed, ~ for your home) |
env | --list, --add <NAME=VALUE>, --remove <NAME[=VALUE]> | context.production_env_vars |
escalation | --elevated <challenge>, --critical <challenge> | context.escalation (default elevated Math, critical Yes) |
$ shellfirm config context branches --add develop
protected branches: added 'develop'
$ shellfirm config context env --add APP_ENV=production
production env vars: set 'APP_ENV=production'
$ shellfirm config context env
production env vars:
APP_ENV=production
ENVIRONMENT=production
NODE_ENV=production
RAILS_ENV=production
$ shellfirm config context paths --add '~/secrets'
sensitive paths: added '~/secrets'
$ shellfirm config context escalation --elevated Yes
escalation updated: elevated = Yesenv --remove takes the name alone or NAME=VALUE as --list prints it.
llm
| Option | Description |
|---|---|
--provider <provider> | LLM provider (for example anthropic, openai-compatible) |
--model <model> | Model id |
--timeout <timeout> | Request timeout in milliseconds |
--base-url <base-url> | Custom base URL for openai-compatible providers |
$ shellfirm config llm --provider anthropic --timeout 5000
llm updated: provider = anthropic, timeout = 5000msLLM analysis is experimental. It is used only to review AI-agent commands
when agent.llm_review is enabled. See
LLM analysis.
What gets written
Settings are sparse: only what you change is written, so new defaults in a
later release still reach you. After config reset --yes and the deny,
escalation, context env / paths / escalation and llm commands
above, the file looks like this:
# shellfirm settings. Keys that are not listed use the built-in defaults.
# Reference: https://github.com/kaplanelad/shellfirm/blob/main/docs/config.md
llm:
provider: anthropic
check_escalation:
git:force_push: Yes
group_escalation:
kubernetes: Yes
severity_escalation:
medium: Math
deny_patterns_ids:
- git:force_push
context:
production_env_vars:
APP_ENV: production
ENVIRONMENT: production
NODE_ENV: production
RAILS_ENV: production
sensitive_paths:
- ~/secrets
escalation:
elevated: YesWrites are atomic and hold a lock (.settings.lock), so two setters running
at once never lose each other's changes. Full-line comments and unknown keys
are kept. See the settings reference
for every key.
Related
- Settings reference
- Accessibility: settings for no math challenges
- Exit codes