pub fn run_cli_from<T, I, D, M, F>(
spec: &'static ToolSpec,
env: &ProcessEnv,
argv: I,
doctor: &D,
metadata_command: M,
run: F,
) -> i32where
T: CommandFactory + FromArgMatches,
I: IntoIterator,
I::Item: Into<OsString> + Clone,
D: DoctorChecks,
M: FnOnce(&T) -> Option<StandardCommand>,
F: FnOnce(T) -> Result<i32, FatalCliError>,Expand description
Parse CLI arguments from a caller-provided argv, route shared metadata commands, and run the domain handler.
env carries the process-edge environment reads (agent tokens, HOME)
performed in the binary’s main (REPO_INVARIANTS.md #5).