Expand description
Manage the app configuration by creating, deleting and modify the configuration
Structs§
- Agent
Config - Configuration for AI agent guardrails.
- Config
- describe configuration folder
- Custom
Checks Load - Result of loading the user’s custom checks directory.
- LlmConfig
- Configuration for the optional LLM-powered command analysis.
- Resolved
Settings - Read-only view of settings with per-mode overrides resolved.
- Sandbox
Config - Extra paths for
shellfirm sandbox. - Settings
- Describe the configuration yaml
- Settings
Lock - Guard for
Config::lock_settings; the lock is released on drop. - Severity
Escalation Config - Configuration for severity-based challenge escalation.
- Wrapper
Tool Config - Per-tool configuration for the
shellfirm wrapproxy. - Wrappers
Config - Configuration for the
shellfirm wrapPTY proxy.
Enums§
- Challenge
- The user challenge when user need to confirm the command.
- Inherit
Or - Per-mode override sentinel.
Inheritmeans “use the global value”;Set(value)means “override with this value.” - Mode
- Runtime context that a settings value applies to.
Constants§
- ALWAYS_
ON_ BUILTIN_ RULE_ IDS - Built-in agent-protection rules that stay on with
agent.self_protection: false(they protect the machine, or they guard the analysis itself). - BUILTIN_
RULE_ IDS - Every built-in agent-protection rule id (
shellfirm-self:*,shellfirm:*). The others are switched off together withagent.self_protection: false. - CONFIG_
DIR_ ENV - Environment variable naming the configuration directory, with the same
meaning as
--config-dir(an explicit--config-dirwins). - CRITICAL_
CONTEXTS - What makes a context critical (see
ELEVATED_CONTEXTS). - DEFAULT_
BLAST_ RADIUS_ BUDGET_ MS - Default for
Settings::blast_radius_budget_ms. - DEFAULT_
CHALLENGE - DEFAULT_
ENABLED_ GROUPS - ELEVATED_
CONTEXTS - What makes a context elevated, worded the same in
status,config show, the TUI and the docs. - EXIT_
USAGE - Exit code for a usage mistake (
EX_USAGE-like, the same as clap’s): a typo’d group name incheck --list -gandconfig groups. - IGNORABLE_
BUILTIN_ RULE_ IDS - Built-in agent-protection rule ids that may be listed in
ignores_patterns_ids. - MAX_
BLAST_ RADIUS_ BUDGET_ MS - Upper bound for
Settings::blast_radius_budget_ms(ms). - MAX_
SETTINGS_ BACKUPS - Number of
settings.yaml.bak.*files kept byconfig reset. - SUPPORTED_
LLM_ PROVIDERS - LLM provider names understood by shellfirm.
Functions§
- ascii_
fallback - Replace the non-ASCII punctuation shellfirm prints (
—,→,✓,✗,…,·,×) with ASCII when the locale is not UTF-8. - builtin_
protection_ refusal - Why
id(a built-in agent protection id) cannot be put on the given list, orNonewhen it can (listisignores_patterns_idsordeny_patterns_ids). - check_
id_ format_ problem - Why a check id does not follow the
group:snake_caseform the built-in checks use (git:force_push,fs-strict:any_deletion), orNone. - check_
id_ has_ hidden_ chars truewhen a check id has characters that would make it look like a different id when printed: whitespace, control, bidi or zero-width characters. Such a custom check is not loaded.- color_
preference - What the environment says about colour, before looking at whether the output is a terminal.
- config_
dir_ from_ env - The configuration directory named by a
CONFIG_DIR_ENVvalue. - enable_
groups_ command - The command that enables
groups(shellfirm config groups --enable a --enable b). - glyph
unicodeunder a UTF-8 locale,asciiotherwise.- is_
builtin_ protection_ id truefor an id of a built-in agent protection rule (shellfirm-self:*,shellfirm:*) rather than a check.- known_
check_ ids - Every check id shellfirm knows about: built-ins plus the given custom checks.
- known_
groups - Every check group name: built-in groups (including ones that are off by
default, such as
shell) plus the groups of the given custom checks. - known_
settings_ keys - All top-level keys understood by
Settings. - load_
custom_ checks_ report - Load custom checks from every
*.yaml/*.ymlfile inchecks_dir. - one_
line - Collapse a (possibly multi-line) message into a single line.
- parse_
settings_ lenient - Parse settings YAML leniently.
- parse_
settings_ strict - Parse settings YAML strictly.
- read_
regular_ file - Read
pathonly when it is a regular file (or a symlink to one). A FIFO or a device at a settings path would block the read, or never end. - read_
regular_ string read_regular_fileas UTF-8 text.- suggest_
similar - Up to
maxcandidates similar toneedle, best first. - unicode_
locale - Whether text output may use non-ASCII glyphs (
—,→,✓): the first non-empty ofLC_ALL,LC_CTYPE,LANGnames a UTF-8 locale, or none is set. - unicode_
output unicode_localefor this process (computed once).- unknown_
group_ message - The one message for a group name that does not exist, with a “Did you
mean” hint (
check --list -g gti,config groups --disable gti). - unknown_
reference_ warnings - Warnings for settings entries that name an unknown check id or group.
- unknown_
settings_ key_ warnings - Human-readable warnings for unknown settings keys, with “did you mean” suggestions.
- unknown_
settings_ keys - Return the keys in
contentthatSettingsdoes not know. - value_
set - Set a value at a dot-notation path, creating intermediate mappings as needed.