Skip to main content

Crate id_effect_cli

Crate id_effect_cli 

Source
Expand description

CLI ergonomics for id_effect::Effect programs: exit code mapping, optional clap integration, and a small run_main helper.

Design matches Phase E — CLI ergonomics: embrace clap for parsing, run the effect with id_effect::runtime::run_blocking, map Result / id_effect::Exit / id_effect::Cause to std::process::ExitCode for fn main() -> ExitCode.

Modules§

generator
Stub project generator for id-effect new.

Structs§

RunMainConfig
Options for run_main.

Functions§

cause_max_exit_byte
Numeric byte used inside ExitCode for a Cause tree (deepest / worst wins for composites).
exit_code_for_cause
ExitCode from a structured Cause.
exit_code_for_exit
ExitCode for a finished Exit value.
exit_code_for_result
Map a synchronous Result from id_effect::runtime::run_blocking to an ExitCode.
run_main
Run effect with env, optionally install tracing, log Err to stderr, return ExitCode.