Skip to content
$ shellfirm

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.

Output
Usage: shellfirm config [OPTIONS] [COMMAND]

Every config subcommand accepts --config-dir <DIR> (use the shellfirm configuration in DIR) and -h, --help.

Subcommands

SubcommandDescription
showShow current configuration
resetReset configuration to defaults (the old file is backed up first)
editOpen settings.yaml in $EDITOR; invalid edits are rejected and the file is left unchanged
challengeSet the challenge type (Math, Enter, Yes)
approved-noticeTurn the approved, running: <command> line after a passed challenge on or off
impact-budgetSet the total time (ms) for measuring a command's impact before the prompt
severitySet the minimum severity threshold
groupsEnable or disable check groups (lists them without arguments)
ignoreManage ignored check ids (stop asking for these checks)
denyManage denied check ids (always blocked, no challenge)
llmConfigure LLM analysis settings
contextConfigure context-aware protection settings
escalationManage 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 Yes

A 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:

Terminal
$ 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: HIGH

config show also lists warnings and whether a project policy applies.

reset

OptionDescription
-y, --yesReset 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.

Terminal
$ 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

Output
Usage: shellfirm config challenge [OPTIONS] [value]

[value]: Math, Enter or Yes. Values are case-sensitive.

Terminal
$ shellfirm config challenge Foo
shellfirm: error: invalid challenge type: 'Foo'. Valid values: Math, Enter, Yes

That exits 2. See Challenge types.

approved-notice

Output
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.

Terminal
$ shellfirm config approved-notice
approved_notice = on
(change it with `shellfirm config approved-notice on|off`)
$ shellfirm config approved-notice off
approved_notice = off

impact-budget

Output
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.

Terminal
$ 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

Output
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.

Terminal
$ shellfirm config severity High
min_severity = HIGH

Medium is the recommended Balanced level that shellfirm init --yes sets. A check that a project policy enforces still prompts below your threshold.

groups

Output
Usage: shellfirm config groups [OPTIONS]
OptionDescription
--listList every group and whether it is active (the default)
--pickChoose 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.

Terminal
$ 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

Output
Usage: shellfirm config ignore [OPTIONS] [CHECK_ID]
OptionDescription
[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
--listList 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:

Terminal
$ 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

Output
Usage: shellfirm config deny [OPTIONS] [CHECK_ID]
OptionDescription
[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
--listList 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.

Terminal
$ shellfirm config deny git:force_push
deny list: added 'git:force_push'
$ shellfirm config deny
deny list:
  git:force_push

escalation

Raises the minimum challenge. Three subcommands:

escalation severity

OptionDescription
--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.

Terminal
$ shellfirm config escalation severity --medium Math
severity escalation updated: medium = Math

escalation group

Output
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.

Terminal
$ shellfirm config escalation group kubernetes Yes
group override: kubernetes = Yes

escalation check

Output
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.

Terminal
$ shellfirm config escalation check git:force_push Yes
check-id override: git:force_push = Yes

Group 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.

SubcommandOptionsSetting
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)
Terminal
$ 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 = Yes

env --remove takes the name alone or NAME=VALUE as --list prints it.

llm

OptionDescription
--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
Terminal
$ shellfirm config llm --provider anthropic --timeout 5000
llm updated: provider = anthropic, timeout = 5000ms

LLM 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:

settings.yaml
# 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: Yes

Writes 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.