Skip to main content

VpsAction

Enum VpsAction 

Source
pub enum VpsAction {
    Add {
Show 18 fields name: String, host: String, port: u16, user: String, password: Option<String>, password_stdin: bool, key: Option<String>, key_passphrase: Option<String>, timeout: u64, max_command_chars: Option<String>, max_output_chars: Option<String>, max_chars: Option<String>, sudo_password: Option<String>, sudo_password_stdin: bool, su_password: Option<String>, su_password_stdin: bool, disable_sudo: bool, check: bool,
}, List { json: bool, }, Remove { name: String, }, Edit {
Show 17 fields name: String, host: Option<String>, port: Option<u16>, user: Option<String>, password: Option<String>, password_stdin: bool, key: Option<String>, key_passphrase: Option<String>, timeout: Option<u64>, max_command_chars: Option<String>, max_output_chars: Option<String>, max_chars: Option<String>, sudo_password: Option<String>, sudo_password_stdin: bool, su_password: Option<String>, su_password_stdin: bool, disable_sudo: Option<bool>,
}, Show { name: String, json: bool, }, Path, Doctor { json: bool, }, Export { include_secrets: bool, output: Option<String>, 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<String>

OpenSSH private key path.

§key_passphrase: Option<String>

Key passphrase.

§timeout: u64

Timeout in milliseconds (default 60000).

§max_command_chars: Option<String>

Command character limit (input). Legacy alias: maxChars.

§max_output_chars: Option<String>

Output character limit.

§max_chars: Option<String>

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.

§check: bool

Runs health-check after add.

§

List

Lists all VPS hosts (passwords masked).

Fields

§json: bool

JSON output.

§

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<String>

New private key path.

§key_passphrase: Option<String>

New key passphrase.

§timeout: Option<u64>

New timeout.

§max_command_chars: Option<String>

New max command chars.

§max_output_chars: Option<String>

New max output chars.

§max_chars: Option<String>

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: Option<bool>

Sets disable_sudo.

§

Show

Shows VPS details (passwords masked).

Fields

§name: String

VPS name.

§json: bool

JSON output.

§

Path

Shows the configuration file path.

§

Doctor

Diagnostics for XDG layers / path / schema.

Fields

§json: bool

JSON output.

§

Export

Exports hosts (passwords redacted by default).

Fields

§include_secrets: bool

Include secrets in the export.

§output: Option<String>

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

§json: bool

Agent-first JSON envelope (event: vps-export). Default body is TOML even on non-TTY pipes (GAP-AUD-001/022). Redacted unless --include-secrets.

§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