Skip to content
$ shellfirm
How It Works

Accessibility

Use shellfirm without math challenges, without colour, with a screen reader or in a plain terminal.

No math challenges

If mental arithmetic is hard for you (dyscalculia, a screen reader, fatigue), run these three commands:

shellfirm config challenge Enter
shellfirm config escalation severity --critical Yes --high Yes --medium Enter --low Enter --info Enter
shellfirm config context escalation --elevated Yes --critical Yes
Output
challenge = Enter
severity escalation updated: critical = Yes, high = Yes, medium = Enter, low = Enter, info = Enter
escalation updated: elevated = Yes, critical = Yes

Medium (and, if you prompt for them, Low and Info) commands then need only Enter. Everything that would have asked for math asks you to type yes instead, including when SSH, root or a protected branch raises the risk.

Check the result with shellfirm pre-command -t, which prints the effective challenge without prompting:

shellfirm pre-command -t -c 'git push -f origin main'
Output
command: git push -f origin main
decision: challenge
matched:
  - git:force_push [HIGH] This force-pushes and can overwrite remote history.
denied: no
challenge: Yes (escalated from Enter: severity HIGH, protected branch `main`)
context: risk=Critical; branch=main, target=main
blast radius: [PROJECT] — Force-pushes to origin/main

A project's .shellfirm.yaml, or a per-group or per-check override, can still ask for Math. shellfirm policy show and shellfirm config show list them.

Plain output

  • The challenge is linear text with one labelled fact per line (Command:, Check:, Severity:, …). Severity is written as a word, not only as a colour.
  • There are no timeouts, and retries are unlimited.
  • NO_COLOR=1 (any non-empty value; an empty NO_COLOR= keeps colour), CLICOLOR=0 and a monochrome terminal (TERM=dumb, vt100, xterm-mono, …) turn colour off everywhere: the challenge, the CLI and the settings editor. CLICOLOR_FORCE=1 forces it on.
  • With a non-UTF-8 locale (LC_ALL=C), status, config show, policy show and audit show print ASCII instead of —, → and ✓. The approved line reads ok: approved, running: <command>.
  • Under TERM=dumb there are no cursor codes at all, and the transient checking impact… line is not shown.
  • doctor, status and check reports are word-wrapped to the terminal width with a hanging indent. Piped or redirected output is not wrapped.

The settings editor

shellfirm config opens a terminal settings editor:

  • Everything is reachable by keyboard. Press ? to see the keys.
  • The active tab is shown as [Name] and the selected row is marked with >, so focus is visible without colour. With NO_COLOR, highlights use reverse video.
  • With a non-UTF-8 locale, symbols fall back to ASCII.
  • Text fields place the terminal cursor at the insertion point.
  • In windows smaller than 80×24, tabs scroll to the selected row (the minimum is 60×16).
  • Under TERM=dumb the editor does not start. Use shellfirm config show and the shellfirm config <subcommand> commands instead. See shellfirm config.