Skip to main content

Crate runtime_cli

Crate runtime_cli 

Source
Expand description

Runtime CLI library entrypoint. Exposes run(argv) so integration tests can drive the binary in-process and so the binary stays a one-liner.

Milestone 30. The CLI speaks the runtime GraphQL API via a thin reqwest::blocking client. Auth lives in ~/.config/runtime/config.json and is provisioned by runtime auth login.

Modules§

cli
clap derive surface for runtime. Top-level subcommands map 1:1 to the modules under commands/.
client
Thin GraphQL client. Uses reqwest::blocking so the CLI stays synchronous end-to-end — no tokio runtime, no async noise in the subcommand modules.
commands
config
On-disk config: ~/.config/runtime/config.json.
editor
$EDITOR integration for commands that compose a body (issue / PR / release create). Writes a temp file with prefill, launches the editor, then reads the file back. Empty contents ⇒ abort, matching gh’s behavior.
output
Output formatting helpers. Three modes:

Functions§

run
Parse argv and dispatch to the appropriate subcommand. Returns Ok(()) on success; subcommands surface errors via anyhow.