Expand description
CLI startup orchestration for winbrew-cli.
This module owns the pre-dispatch portion of the command lifecycle. The
crate entrypoint crate::run_app delegates here so startup policy stays
with the CLI layer instead of leaking into winbrew-bin.
The workflow is intentionally split into three phases:
- Load the persisted configuration from storage.
- Build a
crate::CommandContextfrom that configuration and the current verbosity level. - Initialize process services and dispatch the selected command.
The order is important because:
- configuration must be loaded before the effective log and database paths are known;
- logging must start before later startup failures are emitted;
- database initialization must happen before runtime cleanup, because the
bootstrap cleanup uses
crate::database::get_conn; - command dispatch runs last, after the process is fully hydrated.
Modulesยง
- config ๐
- Configuration capture for CLI startup.
- process ๐
- Process-global service initialization for CLI startup.
Functionsยง
- dispatch_
command ๐ - Hand the hydrated context to the CLI dispatcher after startup side effects have completed.
- run ๐
- Run the full CLI startup sequence and then execute the selected command.