Skip to content

// Generated from the parser

CLI

Every subcommand of the Halbert command-line interface, generated from the parser in Halbert/main.py. Help text, flags, defaults and required arguments below are the parser’s own, not a retelling of them.

This file is generated. Edit Halbert/main.py (or scripts/gen_cli_reference.py for the prose around the tables), then run:

Terminal window
arch -arm64 .venv/bin/python scripts/gen_cli_reference.py

--check reports drift without writing, which is the form for CI:

Terminal window
arch -arm64 .venv/bin/python scripts/gen_cli_reference.py --check

On Apple Silicon the arch -arm64 prefix is required: the venv’s python3 is a universal2 binary and otherwise starts its x86_64 slice, which cannot load the project’s compiled extensions.


Terminal window
python Halbert/main.py <command> [options]

The installed halbert console script does not reach this CLI — it starts the web dashboard. Run the CLI through python Halbert/main.py until the entry point is rewired, which is tracked as README-1 in ROADMAP.md §3.

Global flags, accepted before the subcommand:

Flag Description
-h, --help Show help and exit. Also accepted after any subcommand.
--version Print the version and the GPLv3 notice, then exit.

A subcommand is required; running the CLI with no arguments is an error.

The GPLv3 notice printed by --version tells you to type halbert license. Until the console script is rewired, read that as python Halbert/main.py license.


67 subcommands.

Information and legal — Print what this build is, what it is licensed under, and what is in the tree.

Command Description
info Show product info and legal summary
license Show software license and third-party notices
roadmap Show Phase 1 roadmap (docs/Phase1/ROADMAP.md)
show Show a project file (relative to Halbert/)
show-doc Show a docs file (relative to docs/)

Ingestion — Follow a live source and append telemetry events to JSONL.

Command Description
ingest-journald Run journald follower and write JSONL (uses config/ingestion.yml by default)
ingest-hwmon Poll hwmon temp sensors and write JSONL (uses config/ingestion.yml by default)

Configuration tracking — Snapshot the configuration files under watch, and diff or index those snapshots.

Command Description
snapshot-configs Snapshot tracked config files (uses config/config-registry.yml by default)
watch-configs Watch tracked config files and snapshot on changes
diff-configs Diff latest vs previous config snapshots (or provide –prev/–curr)
index-configs Index canonical config records into the vector DB

Knowledge and retrieval — Query what the machine knows about itself and about Linux administration.

Command Description
index-query Query the vector index (self_knowledge_all)
ask Ask a Linux/DevOps question using RAG + LLM (Phase 7)
eval-golden Run the golden task harness (stub)

RAG corpus — Curate the retrieval corpus: add sources, inspect trust tiers, rebuild.

Command Description
rag-add Add URL to RAG corpus (Phase 10)
rag-check Check URL before adding (Phase 10)
rag-bulk Add multiple URLs from file (Phase 10)
rag-sitemap Discover URLs from sitemap (Phase 10)
rag-sources List RAG sources and trust tiers (Phase 10)
rag-stats Show RAG corpus statistics (Phase 10)
rag-merge Rebuild RAG corpus from all sources (Phase 10)

Runtime — Drive the runtime engine by hand, one iteration at a time.

Command Description
runtime-tick Run one iteration of the runtime (LangGraph if available, else fallback)

Policy — Show the loaded policy and evaluate what it would decide for a tool call.

Command Description
policy-show Show the currently loaded policy (from config_dir/policy.yml or defaults)
policy-eval Evaluate policy decision for a tool with inputs JSON file (apply path)

Integrity and ledgers — Verify the append-only ledgers and reproject their derived views.

Command Description
audit-verify Check the audit log for tampering (edits, truncation, deleted shards)
vault-rebuild Reproject the change ledger into the Markdown vault (generated; overwrites edits)
consent-verify Check the consent ledger for tampering (chain + projection)
consent-rebuild Reproject consent-state.json from the authoritative ledger (generated; refuses a tampered chain)

Scheduler — The job queue: add work, list it, cancel it.

Command Description
scheduler-add Add a job to the scheduler queue (Phase 2)
scheduler-list List scheduler jobs (Phase 2)
scheduler-cancel Cancel a pending job (Phase 2)

Autonomous executor — Cron-shaped autonomous jobs and the one-shot autonomous task runner.

Command Description
executor-status Show autonomous executor status (Phase 3 M3)
executor-schedule Schedule a cron job (Phase 3 M3)
executor-list List scheduled jobs (Phase 3 M3)
executor-cancel Cancel a scheduled job (Phase 3 M3)
autonomous-run Run an autonomous task with LLM decision making (Phase 3 M3)

Approval — The human-in-the-loop queue an autonomous action waits in.

Command Description
approval-list List pending approval requests (Phase 3 M4)
approval-history Show approval history (Phase 3 M4)

Autonomy guardrails — Pause and resume autonomy, and read what the guardrails caught.

Command Description
autonomy-status Show autonomy guardrail status (Phase 3 M6)
autonomy-pause Pause autonomous operations (safe-mode) (Phase 3 M6)
autonomy-resume Resume autonomous operations (Phase 3 M6)
autonomy-anomalies View detected anomalies (Phase 3 M6)
autonomy-recovery View recovery action history (Phase 3 M6)

Personas, memory and context — Which persona is speaking, what it remembers, and how context is detected.

Command Description
persona-list List available personas (Phase 4 M1)
persona-status Show active persona status (Phase 4 M1)
persona-switch Switch to a different persona (Phase 4 M1)
memory-purge Purge persona-specific memory (Phase 4 M1)
memory-export Export persona memory to file (Phase 4 M1)
context-detect Detect current user context (Phase 4 M4)
context-prefs Show/update context detection preferences (Phase 4 M4)

Models and prompts — Connection slots, routing, system prompts, and training-data preparation.

Command Description
model-status Show model status (Phase 3)
model-test Test model with a prompt (Phase 3)
model-list-all List all available models (Phase 5 M1)
model-router-status Show model router status (Phase 5 M1)
model-select-specialist Select specialist model (Phase 5 M1)
model-disable-specialist Disable specialist (orchestrator-only) (Phase 5 M1)
prompt-show Show system prompt for a mode (Phase 3)
prompt-init Initialize default prompt configuration (Phase 3)
prepare-training-data Prepare training data for persona (Phase 5 M4)

Hardware and configuration — What this machine can carry, and the wizard that writes the answer down.

Command Description
hardware-detect Detect hardware and show the model size budget (Phase 5 M3)
config-wizard Run configuration wizard (Phase 5 M3)
config-validate Validate model configuration (Phase 5 M3)

Performance — Latency and throughput metrics, and the alerts raised from them.

Command Description
performance-status Show model performance metrics (Phase 5 M5)
performance-alerts Show performance alerts (Phase 5 M5)
performance-reset Reset performance metrics (Phase 5 M5)

Dashboard and artifacts — Serve the web dashboard, or build the JSON artifacts it reads.

Command Description
dashboard Start Halbert web dashboard (Phase 3 M5)
build-dashboard Build dashboard JSON artifacts under data/dashboard

Show product info and legal summary

python Halbert/main.py info

Show software license and third-party notices

python Halbert/main.py license [--full] [--third-party]
Argument Description Default
--full Show complete verbatim GNU GPLv3 license text. off
--third-party Show third-party notices (RAG corpus sources, dependencies, foundation models) off

Show Phase 1 roadmap (docs/Phase1/ROADMAP.md)

python Halbert/main.py roadmap

This command cannot find its file. It reads <repo>/docs/Phase1/ROADMAP.md, but docs/ is gitignored (.gitignore:108) and carries no Phase1/ directory, so a clone has nothing for it to open. It prints File not found and still exits 0. The live roadmap is ROADMAP.md at the repository root.

Show a project file (relative to Halbert/)

python Halbert/main.py show path
Argument Description Default
path (positional) Relative path, e.g., planning/phase-1-alpha.md. required

Show a docs file (relative to docs/)

python Halbert/main.py show-doc path
Argument Description Default
path (positional) Relative path, e.g., Phase1/ROADMAP.md. required

Paths resolve under the same gitignored docs/ tree, not under documentation/. Whatever is there is machine-local and absent from a fresh clone. Read a file in documentation/ directly, or use show, which resolves under Halbert/.


Run journald follower and write JSONL (uses config/ingestion.yml by default)

python Halbert/main.py ingest-journald [--config CONFIG] [--schema SCHEMA]
Argument Description Default
--config CONFIG Path to ingestion.yml. —
--schema SCHEMA Path to telemetry-event.schema.json. —

Poll hwmon temp sensors and write JSONL (uses config/ingestion.yml by default)

python Halbert/main.py ingest-hwmon [--config CONFIG]
Argument Description Default
--config CONFIG Path to ingestion.yml. —

Snapshot tracked config files (uses config/config-registry.yml by default)

python Halbert/main.py snapshot-configs [--manifest MANIFEST]
Argument Description Default
--manifest MANIFEST Path to config-registry.yml. —

Watch tracked config files and snapshot on changes

python Halbert/main.py watch-configs [--manifest MANIFEST] [--interval INTERVAL]
Argument Description Default
--manifest MANIFEST Path to config-registry.yml. —
--interval INTERVAL Polling interval seconds when watchdog is unavailable (default 600) 600

Diff latest vs previous config snapshots (or provide –prev/–curr)

python Halbert/main.py diff-configs [--prev PREV] [--curr CURR]
Argument Description Default
--prev PREV Path to previous snapshot JSON. —
--curr CURR Path to current snapshot JSON. —

Index canonical config records into the vector DB

python Halbert/main.py index-configs

Query the vector index (self_knowledge_all)

python Halbert/main.py index-query [-k K] text
Argument Description Default
text (positional) Query text. required
-k K Top-K. 5

Ask a Linux/DevOps question using RAG + LLM (Phase 7)

python Halbert/main.py ask [--model MODEL] [--no-llm] [--top-k TOP_K] [question ...]
Argument Description Default
question ... (positional) Question to ask (can be multiple words) optional
--model MODEL Ollama model to use (default: the model configured in Settings → AI Models) —
--no-llm Just retrieve docs, no LLM generation. off
--top-k TOP_K Number of documents to retrieve (default: 3) (int) 3

Run the golden task harness (stub)

python Halbert/main.py eval-golden

Add URL to RAG corpus (Phase 10)

python Halbert/main.py rag-add [--trust] url
Argument Description Default
url (positional) URL to add. required
--trust Trust unknown source. off

Check URL before adding (Phase 10)

python Halbert/main.py rag-check url
Argument Description Default
url (positional) URL to check. required

Add multiple URLs from file (Phase 10)

python Halbert/main.py rag-bulk [--trust] file
Argument Description Default
file (positional) File with URLs (one per line) required
--trust Trust unknown sources. off

Discover URLs from sitemap (Phase 10)

python Halbert/main.py rag-sitemap [--include [INCLUDE ...]] [--exclude [EXCLUDE ...]]
[--max MAX] [--add] [--trust]
sitemap_url
Argument Description Default
sitemap_url (positional) Sitemap URL (e.g., https://site.com/sitemap.xml) required
--include [INCLUDE ...] Only include URLs containing these patterns. —
--exclude [EXCLUDE ...] Exclude URLs containing these patterns. —
--max MAX Max URLs to show (default: 50) (int) 50
--add Actually add the URLs (otherwise just preview) off
--trust Trust unknown sources. off

List RAG sources and trust tiers (Phase 10)

python Halbert/main.py rag-sources

Show RAG corpus statistics (Phase 10)

python Halbert/main.py rag-stats

Rebuild RAG corpus from all sources (Phase 10)

python Halbert/main.py rag-merge

Run one iteration of the runtime (LangGraph if available, else fallback)

python Halbert/main.py runtime-tick

Show the currently loaded policy (from config_dir/policy.yml or defaults)

python Halbert/main.py policy-show

Evaluate policy decision for a tool with inputs JSON file (apply path)

python Halbert/main.py policy-eval --tool TOOL --inputs INPUTS
Argument Description Default
--tool TOOL Tool name (e.g., write_config, schedule_cron) required
--inputs INPUTS Path to JSON file with tool inputs. required

Check the audit log for tampering (edits, truncation, deleted shards)

python Halbert/main.py audit-verify [--dir DIR] [--json]
Argument Description Default
--dir DIR Audit log directory (default: <log_dir>/audit) —
--json Emit machine-readable JSON. off

Reproject the change ledger into the Markdown vault (generated; overwrites edits)

python Halbert/main.py vault-rebuild [--json]
Argument Description Default
--json Emit machine-readable JSON. off

Check the consent ledger for tampering (chain + projection)

python Halbert/main.py consent-verify [--data-dir DATA_DIR] [--config-dir CONFIG_DIR]
[--json]
Argument Description Default
--data-dir DATA_DIR Data dir (default: the resolved data dir) —
--config-dir CONFIG_DIR Config dir (default: the resolved config dir) —
--json Emit machine-readable JSON. off

Reproject consent-state.json from the authoritative ledger (generated; refuses a tampered chain)

python Halbert/main.py consent-rebuild [--data-dir DATA_DIR] [--config-dir CONFIG_DIR]
[--json]
Argument Description Default
--data-dir DATA_DIR Data dir (default: the resolved data dir) —
--config-dir CONFIG_DIR Config dir (default: the resolved config dir) —
--json Emit machine-readable JSON. off

Add a job to the scheduler queue (Phase 2)

python Halbert/main.py scheduler-add --id ID --task TASK --schedule SCHEDULE
[--priority PRIORITY] --inputs INPUTS
Argument Description Default
--id ID Job ID. required
--task TASK Task name (e.g., snapshot_configs) required
--schedule SCHEDULE Cron expression or ISO timestamp. required
--priority PRIORITY Priority (1=highest, 10=lowest) 5
--inputs INPUTS Path to JSON file with task inputs. required

List scheduler jobs (Phase 2)

python Halbert/main.py scheduler-list [--state STATE]
Argument Description Default
--state STATE Filter by state (pending, running, completed, failed, cancelled) —

Cancel a pending job (Phase 2)

python Halbert/main.py scheduler-cancel --id ID
Argument Description Default
--id ID Job ID. required

Show autonomous executor status (Phase 3 M3)

python Halbert/main.py executor-status

Schedule a cron job (Phase 3 M3)

python Halbert/main.py executor-schedule --job-id JOB_ID --cron CRON
[--description DESCRIPTION] [--daemon]
Argument Description Default
--job-id JOB_ID Unique job identifier. required
--cron CRON Cron expression JSON (e.g., ‘{“hour”: 2, “minute”: 0}’) required
--description DESCRIPTION Job description. —
--daemon Run in daemon mode (keep running) off

List scheduled jobs (Phase 3 M3)

python Halbert/main.py executor-list

Cancel a scheduled job (Phase 3 M3)

python Halbert/main.py executor-cancel --job-id JOB_ID
Argument Description Default
--job-id JOB_ID Job ID to cancel. required

Run an autonomous task with LLM decision making (Phase 3 M3)

python Halbert/main.py autonomous-run --task-type {health_check,log_cleanup}
[--confidence CONFIDENCE] [--context CONTEXT]
[--no-approval]
Argument Description Default
--task-type TASK_TYPE Type of autonomous task. Choices: health_check, log_cleanup. required
--confidence CONFIDENCE Confidence threshold (default: 0.7) (float) —
--context CONTEXT Task context as JSON string. —
--no-approval Skip approval prompts (auto-approve) off

List pending approval requests (Phase 3 M4)

python Halbert/main.py approval-list

Show approval history (Phase 3 M4)

python Halbert/main.py approval-history [--limit LIMIT] [--approved-only]
Argument Description Default
--limit LIMIT Max records to show. (int) 10
--approved-only Only show approved requests. off

Show autonomy guardrail status (Phase 3 M6)

python Halbert/main.py autonomy-status

Pause autonomous operations (safe-mode) (Phase 3 M6)

python Halbert/main.py autonomy-pause --reason REASON
Argument Description Default
--reason REASON Reason for pausing autonomy. required

Resume autonomous operations (Phase 3 M6)

python Halbert/main.py autonomy-resume --user USER
Argument Description Default
--user USER Your username (for audit trail) required

View detected anomalies (Phase 3 M6)

python Halbert/main.py autonomy-anomalies [--hours HOURS]
Argument Description Default
--hours HOURS Look back hours (default: 24) (int) 24

View recovery action history (Phase 3 M6)

python Halbert/main.py autonomy-recovery [--limit LIMIT]
Argument Description Default
--limit LIMIT Max records to show (default: 20) (int) 20

List available personas (Phase 4 M1)

python Halbert/main.py persona-list

Show active persona status (Phase 4 M1)

python Halbert/main.py persona-status

Switch to a different persona (Phase 4 M1)

python Halbert/main.py persona-switch --to {it_admin,friend,custom} [--user USER]
[--confirm]
Argument Description Default
--to TO Target persona. Choices: it_admin, friend, custom. required
--user USER Your username (for audit trail) —
--confirm Confirm the switch (required to execute) off

Purge persona-specific memory (Phase 4 M1)

python Halbert/main.py memory-purge --persona PERSONA [--user USER] [--confirm]
[--no-export]
Argument Description Default
--persona PERSONA Persona to purge (e.g., friend, custom) required
--user USER Your username (for audit trail) —
--confirm Confirm the purge (required to execute) off
--no-export Skip export before purge (not recommended) off

Export persona memory to file (Phase 4 M1)

python Halbert/main.py memory-export --persona PERSONA --output OUTPUT
Argument Description Default
--persona PERSONA Persona to export (e.g., friend, custom) required
--output OUTPUT Output JSONL file path. required

Detect current user context (Phase 4 M4)

python Halbert/main.py context-detect

Show/update context detection preferences (Phase 4 M4)

python Halbert/main.py context-prefs [--enabled] [--disable] [--auto-switch]
[--no-auto-switch]
Argument Description Default
--enabled Enable context detection. off
--disable Disable context detection. off
--auto-switch Enable auto-switching (no confirmation) off
--no-auto-switch Disable auto-switching (suggest only) off

Show model status (Phase 3)

python Halbert/main.py model-status

Test model with a prompt (Phase 3)

python Halbert/main.py model-test --prompt PROMPT [--max-tokens MAX_TOKENS]
Argument Description Default
--prompt PROMPT Test prompt. required
--max-tokens MAX_TOKENS Max tokens to generate. (int) —

List all available models (Phase 5 M1)

python Halbert/main.py model-list-all

Show model router status (Phase 5 M1)

python Halbert/main.py model-router-status

Select specialist model (Phase 5 M1)

python Halbert/main.py model-select-specialist --model MODEL [--provider PROVIDER]
Argument Description Default
--model MODEL Model ID as served by your endpoint. required
--provider PROVIDER Provider (ollama, llamacpp, mlx) ollama

Disable specialist (orchestrator-only) (Phase 5 M1)

python Halbert/main.py model-disable-specialist

Show system prompt for a mode (Phase 3)

python Halbert/main.py prompt-show [--mode MODE] [--context CONTEXT]
Argument Description Default
--mode MODE Prompt mode (interactive, autonomous, it_admin, friend, custom) interactive
--context CONTEXT Additional task context. —

Initialize default prompt configuration (Phase 3)

python Halbert/main.py prompt-init

Prepare training data for persona (Phase 5 M4)

python Halbert/main.py prepare-training-data [--persona PERSONA] [--output OUTPUT]
[--num-synthetic NUM_SYNTHETIC]
[--list-personas] [--validate VALIDATE]
Argument Description Default
--persona PERSONA Persona name. —
--output OUTPUT Output file path (JSONL) —
--num-synthetic NUM_SYNTHETIC Number of synthetic samples (default: 10) (int) 10
--list-personas List available persona templates. off
--validate VALIDATE Validate existing training data file. —

Detect hardware and show the model size budget (Phase 5 M3)

python Halbert/main.py hardware-detect

Run configuration wizard (Phase 5 M3)

python Halbert/main.py config-wizard [--auto] [--model MODEL] [--peer PEER]
Argument Description Default
--auto Run automatically without prompts. off
--model MODEL Guide model ID as served by your endpoint (default: largest installed model that fits) —
--peer PEER Compute peer address (hostname:port) for offload-only devices (<4GB RAM): all LLM work is offloaded to the peer. —

Validate model configuration (Phase 5 M3)

python Halbert/main.py config-validate

Show model performance metrics (Phase 5 M5)

python Halbert/main.py performance-status

Show performance alerts (Phase 5 M5)

python Halbert/main.py performance-alerts [--severity {info,warning,error,critical}]
[--hours HOURS]
Argument Description Default
--severity SEVERITY Filter by severity. Choices: info, warning, error, critical. —
--hours HOURS Show alerts from last N hours (default: 24) (int) 24

Reset performance metrics (Phase 5 M5)

python Halbert/main.py performance-reset [--model MODEL]
Argument Description Default
--model MODEL Reset specific model (or all if not specified) —

Start Halbert web dashboard (Phase 3 M5)

python Halbert/main.py dashboard [--host HOST] [--port PORT]
Argument Description Default
--host HOST Host to bind to. 127.0.0.1
--port PORT Port to bind to. (int) 8000

Build dashboard JSON artifacts under data/dashboard

python Halbert/main.py build-dashboard


Code Meaning
0 Success
1 The command reported a failure
2 argparse rejected the arguments (unknown command, missing required flag)

A handler that returns an integer sets the exit code; one that returns None exits 0. Commands that only print an error message without returning a status still exit 0 — check the output, not just $?.


Variable Description
HALBERT_CONFIG_DIR Override the configuration directory
HALBERT_DATA_DIR Override the data directory
HALBERT_LOG_DIR Override the log directory
OLLAMA_HOST Endpoint used when resolving model licence attribution

The mixed-case spellings (Halbert_CONFIG_DIR, Halbert_DATA_DIR, Halbert_LOG_DIR) are still read as fallbacks. Prefer the uppercase names.


Track a configuration change end to end:

Terminal window
python Halbert/main.py snapshot-configs
# edit /etc/ssh/sshd_config
python Halbert/main.py snapshot-configs
python Halbert/main.py diff-configs

Ask a question against the retrieval corpus, without a model in the loop:

Terminal window
python Halbert/main.py ask "Why did docker.service fail to start?"
python Halbert/main.py ask --no-llm --top-k 5 "journald disk usage"

Check that the ledgers have not been tampered with, machine-readably:

Terminal window
python Halbert/main.py audit-verify --json
python Halbert/main.py consent-verify --json

Schedule a nightly job and leave the executor running:

Terminal window
python Halbert/main.py executor-schedule \
--job-id nightly-health \
--cron '{"hour": 2, "minute": 0}' \
--description "Nightly system health check" \
--daemon

Export a persona’s memory before purging it:

Terminal window
python Halbert/main.py memory-export --persona friend --output /tmp/friend.jsonl
python Halbert/main.py memory-purge --persona friend --confirm