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 the README for positioning and the agent ABI.

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.
config
The roba config init subcommand: claude-assisted, parse-validated per-project roba.toml bootstrap.
cost
roba cost – aggregate token usage from session history.
detach
--detach – fire a run that survives the caller.
doctor
roba doctor – a health check for the claude boundary.
draft
Shared plumbing for the claude-assisted draft/init verbs (roba alias draft, roba profile draft, roba config init).
env
ROBA_<PARAM> env-var override layer.
error
JSON error envelope for --json mode.
history
roba history, roba last, and the --pick interactive chooser.
lint
roba config lint – static checks over roba config (read-only).
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.
show
roba show <SESSION_ID> – read-only result handle for a stored session.
stdin_probe
Cross-platform stdin classification, shared by two callers.
stream
Streaming-mode pipeline (–stream).
worktree
roba worktree list – read-only enumeration of the repo’s git worktrees.

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