sim_cli/lib.rs
1//! The library behind the `sim` CLI. It is not a supported API: any release can change it.
2//!
3//! Install the CLI with `cargo install sim-cli --locked`. To use the simulator from Rust, depend
4//! on [`simulator-client`](https://docs.rs/simulator-client) instead.
5
6use clap::Args;
7
8pub mod args;
9pub mod client;
10#[doc(hidden)]
11pub mod engine;
12#[doc(hidden)]
13pub mod signals;
14
15#[derive(Debug, Clone, Args)]
16pub struct ApiKeyArg {
17 /// Your simulator API key. Set SIMULATOR_API_KEY to avoid passing it on
18 /// every command.
19 #[arg(long, env = "SIMULATOR_API_KEY", hide_env_values = true)]
20 pub api_key: String,
21}
22
23impl ApiKeyArg {
24 pub fn get(&self) -> String {
25 self.api_key.clone()
26 }
27}