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 Yeschallenge = Enter
severity escalation updated: critical = Yes, high = Yes, medium = Enter, low = Enter, info = Enter
escalation updated: elevated = Yes, critical = YesMedium (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'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/mainA 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 emptyNO_COLOR=keeps colour),CLICOLOR=0and a monochrome terminal (TERM=dumb,vt100,xterm-mono, …) turn colour off everywhere: the challenge, the CLI and the settings editor.CLICOLOR_FORCE=1forces it on.- With a non-UTF-8 locale (
LC_ALL=C),status,config show,policy showandaudit showprint ASCII instead of—,→and✓. The approved line readsok: approved, running: <command>. - Under
TERM=dumbthere are no cursor codes at all, and the transientchecking impact…line is not shown. doctor,statusandcheckreports 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. WithNO_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=dumbthe editor does not start. Useshellfirm config showand theshellfirm config <subcommand>commands instead. See shellfirm config.