Skip to main content

bw/platform/
mod.rs

1use clap::Args;
2
3mod completion;
4mod config;
5mod encode;
6mod serve;
7mod sync;
8
9pub(crate) use completion::CompletionArgs;
10pub(crate) use config::ConfigCommand;
11pub(crate) use encode::EncodeArgs;
12pub(crate) use serve::ServeArgs;
13pub(crate) use sync::SyncArgs;
14
15#[derive(Args, Clone)]
16#[command(
17    about = "Show server, last sync, user information, and vault status.",
18    after_help = r#"Example return value:
19  {
20    "serverUrl": "https://bitwarden.example.com",
21    "lastSync": "2020-06-16T06:33:51.419Z",
22    "userEmail": "[email protected]",
23    "userId": "00000000-0000-0000-0000-000000000000",
24    "status": "locked"
25  }
26
27Notes:
28  `status` is one of:
29    - `unauthenticated` when you are not logged in
30    - `locked` when you are logged in and the vault is locked
31    - `unlocked` when you are logged in and the vault is unlocked
32"#
33)]
34pub struct StatusArgs;
35
36#[derive(Args, Clone)]
37pub struct GetFingerprintArgs {
38    #[arg(default_value = "me", help = "User ID or 'me' for current user")]
39    pub user: String,
40}