Skip to main content

VpsAction

Enum VpsAction 

Source
pub enum VpsAction {
    Add {
Show 26 fields name: String, host: String, port: u16, user: String, password: Option<String>, password_stdin: bool, key: Option<PathBuf>, key_passphrase: Option<String>, key_passphrase_stdin: bool, use_agent: bool, agent_socket: Option<PathBuf>, timeout: u64, max_command_chars: Option<usize>, max_output_chars: Option<usize>, max_chars: Option<usize>, sudo_password: Option<String>, sudo_password_stdin: bool, su_password: Option<String>, su_password_stdin: bool, disable_sudo: bool, tags: Vec<String>, tls: bool, tls_sni: Option<String>, tls_client_cert: Option<PathBuf>, tls_client_key: Option<PathBuf>, check: bool,
}, List { json: bool, tags: Vec<String>, }, Remove { name: String, }, Edit {
Show 26 fields name: String, host: Option<String>, port: Option<u16>, user: Option<String>, password: Option<String>, password_stdin: bool, key: Option<PathBuf>, key_passphrase: Option<String>, key_passphrase_stdin: bool, use_agent: bool, agent_socket: Option<PathBuf>, timeout: Option<u64>, max_command_chars: Option<usize>, max_output_chars: Option<usize>, max_chars: Option<usize>, sudo_password: Option<String>, sudo_password_stdin: bool, su_password: Option<String>, su_password_stdin: bool, disable_sudo: bool, enable_sudo: bool, tls: bool, no_tls: bool, tls_sni: Option<String>, tls_client_cert: Option<PathBuf>, tls_client_key: Option<PathBuf>,
}, Show { name: String, json: bool, }, Path, Doctor { json: bool, probe_ssh: bool, hosts: Option<String>, }, Export { include_secrets: bool, output: Option<PathBuf>, json: bool, i_understand_secrets_on_stdout: bool, }, Import { file: PathBuf, allow_incomplete: bool, }, }
Expand description

Actions of the vps subcommand.

Variants§

§

Add

Adds a new VPS to the registry.

Fields

§name: String

Unique VPS name.

§host: String

Hostname or IP.

§port: u16

SSH port.

§user: String

SSH username.

§password: Option<String>

SSH password.

§password_stdin: bool

Reads the password from stdin.

§key: Option<PathBuf>

OpenSSH private key path.

§key_passphrase: Option<String>

Key passphrase.

§key_passphrase_stdin: bool

Reads the key passphrase from stdin.

D13: exec, scp, health-check and tunnel all accepted --key-passphrase-stdin, but vps add and vps edit — the only two commands that persist the passphrase — did not. The one secret that reaches disk was also the one that had to travel through argv, where any local process can read it from ps. Found by running the E2E matrix for real for the first time (D1).

§use_agent: bool

Authenticate via SSH agent (mutually exclusive with –password / –key; G-E2E-19).

§agent_socket: Option<PathBuf>

Optional SSH agent socket path (defaults to platform agent when omitted).

§timeout: u64

Timeout in milliseconds (default crate::vps::model::DEFAULT_TIMEOUT_MS).

§max_command_chars: Option<usize>

Command character limit (input). Use 0 or none for unlimited.

§max_output_chars: Option<usize>

Output character limit. Use 0 or none for unlimited.

§max_chars: Option<usize>

Legacy alias: maps to max_command_chars.

§sudo_password: Option<String>

Password for sudo.

§sudo_password_stdin: bool

Reads the sudo password from stdin.

§su_password: Option<String>

Password for su -.

§su_password_stdin: bool

Reads the su password from stdin.

§disable_sudo: bool

Disables sudo/su on this host.

§tags: Vec<String>

Host tags for fleet selection (G-O2). Repeatable: --tag prod --tag web.

§tls: bool

Enable SSH-over-TLS (rustls) for this host.

§tls_sni: Option<String>

TLS SNI / cert name (defaults to --host when omitted).

§tls_client_cert: Option<PathBuf>

mTLS client certificate PEM path.

§tls_client_key: Option<PathBuf>

mTLS client private key PEM path.

§check: bool

Runs health-check after add.

§

List

Lists all VPS hosts (passwords masked).

Fields

§json: bool

JSON output (from global --json).

§tags: Vec<String>

Filter hosts that have any of these tags (OR, G-O2).

§

Remove

Removes a VPS from the registry.

Fields

§name: String

VPS name to remove.

§

Edit

Edits fields of an existing VPS.

Fields

§name: String

VPS name to edit.

§host: Option<String>

New hostname/IP.

§port: Option<u16>

New SSH port.

§user: Option<String>

New username.

§password: Option<String>

New password.

§password_stdin: bool

Reads the password from stdin.

§key: Option<PathBuf>

New private key path.

§key_passphrase: Option<String>

New key passphrase.

§key_passphrase_stdin: bool

Reads the new key passphrase from stdin (D13 — see VpsAction::Add).

§use_agent: bool

Switch primary auth to SSH agent (clears password/key when set; G-E2E-19).

§agent_socket: Option<PathBuf>

Optional SSH agent socket path.

§timeout: Option<u64>

New timeout.

§max_command_chars: Option<usize>

New max command chars. Use 0 or none for unlimited.

§max_output_chars: Option<usize>

New max output chars. Use 0 or none for unlimited.

§max_chars: Option<usize>

Legacy alias maxChars → command.

§sudo_password: Option<String>

New sudo password.

§sudo_password_stdin: bool

Reads the sudo password from stdin.

§su_password: Option<String>

New su password.

§su_password_stdin: bool

Reads the su password from stdin.

§disable_sudo: bool

Disable sudo/su elevation for this host.

§enable_sudo: bool

Re-enable sudo/su elevation for this host.

§tls: bool

Enable SSH-over-TLS for this host.

§no_tls: bool

Disable SSH-over-TLS for this host.

§tls_sni: Option<String>

TLS SNI / cert name.

§tls_client_cert: Option<PathBuf>

mTLS client certificate PEM path.

§tls_client_key: Option<PathBuf>

mTLS client private key PEM path.

§

Show

Shows VPS details (passwords masked).

Fields

§name: String

VPS name.

§json: bool

JSON output (from global --json).

§

Path

Shows the configuration file path.

§

Doctor

Diagnostics for XDG layers / path / schema.

Fields

§json: bool

JSON output (from global --json).

§probe_ssh: bool

After local diagnostics, probe hosts over SSH (bounded fan-out, G-PAR-29). Default scope is every registered host; use --hosts for a subset (G-PAR-38).

§hosts: Option<String>

Comma-separated host subset for --probe-ssh only (ignored without probe).

§

Export

Exports hosts (passwords redacted by default).

Fields

§include_secrets: bool

Include secrets in the export.

§output: Option<PathBuf>

Output file (stdout if omitted). Written atomically with mode 0o600.

§json: bool

Agent-first JSON envelope (event: vps-export; from global --json). Default body is TOML on text; JSON when format/json (G-AUD-03).

§i_understand_secrets_on_stdout: bool

Acknowledge writing plaintext secrets to stdout (pipe/non-TTY). Prefer --output.

§

Import

Imports hosts from a TOML file or JSON vps-export envelope (EN + legacy PT keys).

Fields

§file: PathBuf

Source file (TOML wire or JSON export envelope).

§allow_incomplete: bool

Allow hosts without full auth (redacted export / skeleton) — GAP-SSH-IMP-001.

Trait Implementations§

Source§

impl Debug for VpsAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for VpsAction

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for VpsAction

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more