Lifecycle Overview¶
A bijux run follows one deterministic lifecycle from argv intake to stream
emission. Understanding this lifecycle is the fastest way to debug behavior and
review compatibility impact.
Visual Summary¶
sequenceDiagram
participant User
participant Parser as routing::parser
participant Dispatch as interface::cli::dispatch
participant Handler as command handler
participant Output as shared output
User->>Parser: argv
Parser->>Dispatch: parsed and normalized intent
Dispatch->>Handler: route execution
Handler->>Output: payload or process result
Output-->>User: stdout/stderr and exit code
Lifecycle Stages¶
- Decode OS argv and reject invalid UTF-8 input with usage-class failure.
- Normalize global flags and route path using the clap parser model.
- Resolve special fast paths such as help/version and known-tool delegation.
- Execute the matched built-in or plugin route.
- Render payload according to resolved output policy.
- Emit streams and finalize the exit code.
Code Anchors¶
crates/bijux-cli/src/bootstrap/wiring.rscrates/bijux-cli/src/bootstrap/run.rscrates/bijux-cli/src/routing/parser.rscrates/bijux-cli/src/interface/cli/dispatch.rscrates/bijux-cli/src/interface/cli/dispatch/route_exec.rs
Lifecycle Guarantees¶
- one normalized intent per invocation
- one route decision before handler execution
- one final exit code surfaced to the process host
- help and usage failures use explicit short-circuit paths