diff --git a/Cargo.toml b/Cargo.toml index caf1ed4..4c18374 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ serde_json = "1.0" rsa = "0.5.0" rand = "0.8.4" standback = "0.2.17" # required to fix a compilation error on a transient dependency -clap = { version = "3.1.18", features = ["derive", "cargo"] } +clap = { version = "3.1.18", features = ["derive", "cargo", "env"] } clap_complete = "3.2.1" log = "0.4.14" stderrlog = "0.4" diff --git a/src/cli.rs b/src/cli.rs index 947f915..03d6b20 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -27,7 +27,12 @@ pub(crate) struct Args { help = "Specify which folder your maFiles are in. This should be a path to a folder that contains manifest.json. Default: ~/.config/steamguard-cli/maFiles" )] pub mafiles_path: Option, - #[clap(short, long, help = "Specify your encryption passkey.")] + #[clap( + short, + long, + env = "STEAMGUARD_CLI_PASSKEY", + help = "Specify your encryption passkey." + )] pub passkey: Option, #[clap(short, long, arg_enum, default_value_t=Verbosity::Info, help = "Set the log level. Be warned, trace is capable of printing sensitive data.")] pub verbosity: Verbosity,