MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / run_cli

Function run_cli

crates/openshell-server/src/cli.rs:221–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219}
220
221pub async fn run_cli() -> Result<()> {
222 rustls::crypto::ring::default_provider()
223 .install_default()
224 .map_err(|e| miette::miette!("failed to install rustls crypto provider: {e:?}"))?;
225
226 let matches = command().get_matches();
227 let cli = Cli::from_arg_matches(&matches).expect("clap validated args");
228
229 match cli.command {
230 Some(Commands::GenerateCerts(args)) => certgen::run(args).await,
231 None => Box::pin(run_from_args(cli.run, matches)).await,
232 }
233}
234
235fn prepare_server_config(args: &mut RunArgs, matches: &ArgMatches) -> Result<ServerStartupConfig> {
236 // Load TOML when explicitly requested, or from the default XDG location

Callers 1

mainFunction · 0.70

Calls 3

commandFunction · 0.85
run_from_argsFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected