Skip to main content

Crate taskfast_cli

Crate taskfast_cli 

Source
Expand description

taskfast-cli library surface.

The crate ships primarily as the taskfast binary (see src/main.rs), but every subcommand’s run function and the shared envelope/exit/error types are re-exported here so integration tests (and, later, embedded callers) can drive the pipeline without spawning a process.

Re-exports§

pub use config::Config;
pub use envelope::Envelope;
pub use envelope::ErrorPayload;
pub use exit::ExitCode;

Modules§

cmd
Subcommand module tree + shared Ctx / CmdError types.
config
JSON config file for the taskfast CLI.
envelope
JSON output envelope — uniform across success/error/dry-run.
exit
Deterministic exit-code taxonomy — stable contract for agent orchestrators.
wallet_lock
F9: exclusive file-lock guarding wallet-signing operations against concurrent taskfast post invocations sharing the same keystore.

Enums§

Environment
Re-exported from main.rs so tests can construct a cmd::Ctx with a named Environment without depending on the binary entry point.
Network
Tempo network selector. Derived from Environment — never persisted, never accepted as a CLI flag. The compile-time mapping in Environment::network is the single source of truth; the runtime invariant in cmd::enforce_server_network_invariant cross-checks it against /config/network.

Functions§

accounts_url
Derive the human-facing account-tokens URL from an API base URL.
is_well_known_api_base
True when url exactly matches a known-good default from well_known_api_bases. Trailing / is tolerated so a value https://api.taskfast.app/ isn’t flagged as custom.
well_known_api_bases
Iterator over the well-known TaskFast API base URLs — one per Environment variant, derived from Environment::api_base.