1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
pub mod check;
pub mod decrypt;
pub mod diff;
pub mod encrypt;
pub mod inject;
pub mod input;
pub mod keys;
pub mod receive;
pub mod redact;
#[cfg(feature = "server")]
pub mod serve;
pub mod share;
pub mod template;
pub mod validate;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "enseal",
about = "Secure, ephemeral secret sharing for developers"
)]
#[command(version, propagate_version = true)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
/// Show debug output (never prints secret values)
#[arg(long, short, global = true)]
pub verbose: bool,
/// Minimal output (for scripting)
#[arg(long, short, global = true)]
pub quiet: bool,
}
#[derive(Subcommand)]
pub enum Command {
/// Send a .env file, piped input, or inline secret
Share(share::ShareArgs),
/// Receive secrets via wormhole code or encrypted file
Receive(receive::ReceiveArgs),
/// Receive secrets and inject into a child process (no file on disk)
Inject(inject::InjectArgs),
/// Verify .env has all vars from .env.example
Check(check::CheckArgs),
/// Show missing/extra vars between two .env files (keys only)
Diff(diff::DiffArgs),
/// Output .env with values replaced by <REDACTED>
Redact(redact::RedactArgs),
/// Validate .env against schema rules in .enseal.toml
Validate(validate::ValidateArgs),
/// Generate .env.example from a real .env with type hints
Template(template::TemplateArgs),
/// Encrypt a .env file for safe storage (age-based)
Encrypt(encrypt::EncryptArgs),
/// Decrypt an at-rest encrypted .env file
Decrypt(decrypt::DecryptArgs),
/// Manage identity keys, aliases, and trusted keys
Keys(keys::KeysArgs),
/// Run the enseal relay server
#[cfg(feature = "server")]
Serve(serve::ServeArgs),
/// Generate shell completions
Completions {
/// Shell to generate completions for
#[arg(value_enum)]
shell: clap_complete::Shell,
},
}