Skip to main content

Crate roba

Crate roba 

Source
Expand description

roba – single-prompt CLI runner built on claude-wrapper.

This lib hosts the module surface so integration tests can drive the same code paths the binary uses. main.rs is just an entry that hands a parsed cli::Cli to dispatch.

See cli-runner.md at the repo root for the design brainstorm.

Modules§

agent_check
Agent frontmatter permission check.
aliases
User-defined aliases: git-style shortcuts defined in roba.toml that expand to a prompt template (plus default flags / a pinned agent) and dispatch like a normal roba call.
cli
Clap-derived CLI structs. Cli is the top-level entry; default invocation (no subcommand) dispatches to crate::run_ask with the flattened AskArgs.
cost
roba cost – aggregate token usage from session history.
doctor
roba doctor – a health check for the claude boundary.
env
ROBA_<PARAM> env-var override layer.
error
JSON error envelope for --json mode.
history
roba history, roba last, and the --pick interactive chooser.
output
Output-side helpers: formatters for the cost footer, truncation, refusal heuristics, code-block extraction.
profile
Config system for roba.
prompt
Prompt input + composition.
rates
Per-model dollar-rate table for cost reporting.
render
Presentation / “eye candy” subsystem.
session
Session continuation and permission preset application.
stream
Streaming-mode pipeline (–stream).

Functions§

classify_exit_code
Map an anyhow error chain to a stable exit code:
dispatch
Dispatch a parsed Cli to the matching runner. Subcommands (history, last) run synchronously; the default action (run_ask) is async.
run_ask
Default action: resolve a prompt, send it through claude, render the result.