Skip to main content

Module cli

Module cli 

Source
Expand description

CLI argument definitions via clap derive and dispatcher.

  1. CRUD de VPS — vps add|list|remove|edit|show|path|doctor|export|import
  2. connect — writes sibling active file (not a TOML field)
  3. One-shot execution — exec|sudo-exec|su-exec|scp|sftp|tunnel|health-check
  4. secrets — primary-key status/init/reencrypt (cifragem at-rest default)
  5. Completions / commands (agent command-tree discovery)

ZERO .env at runtime. ZERO telemetry. One-shot cycle: start → dispatch → exit.

Structs§

CliArgs
Global ssh-cli arguments.
SshAuthArgs
Shared SSH authentication overrides (flatten into exec/scp/tunnel/health-check).

Enums§

Command
Top-level subcommands.
LocaleAction
Actions of the locale subcommand.
OutputFormat
Output format supported by the CLI.
ScpAction
Actions of the scp subcommand (regular files only; no -r).
SecretsAction
Actions of the secrets subcommand (primary-key / AEAD).
SftpAction
Actions of the sftp subcommand (SFTP v3 subsystem).
TlsAcmeAccountAction
ACME account sub-actions.
TlsAcmeAction
ACME actions (DNS-01, agent two-step).
TlsAction
Actions of the tls subcommand (SSH-over-TLS / mTLS / ACME).
TlsMtlsAction
mTLS identity store actions.
VpsAction
Actions of the vps subcommand.

Functions§

bootstrap_logs
Installs stderr tracing before clap parse (delegates to crate::telemetry).
command_tree_json
Builds a JSON command tree from the clap Command graph (G-IO-10).
dispatch
Runs the requested subcommand.
dispatch_impl
Shared dispatch implementation (cli + commands layers).
effective_timeout
Merges local subcommand timeout with global --timeout (local wins).
effective_timeout_ms
Merges local/global timeout and refines to crate::domain::TimeoutMs (G-TYPE-18).
generate_completions
Writes shell completions to stdout.
initialize_logs
Reloads the tracing filter from CLI flags (delegates to crate::telemetry).
parse_args
Parses CLI arguments.
parse_remote_steps
Maps CLI --step strings into refined remote commands (G-TYPE-19).
render_manpage
Renders a man page for ssh-cli (G-12 / clap_mangen).
resolve_format
Resolves output format: --json global / explicit enum > non-TTY JSON > Text.
resolve_format_from_cli
Resolves format from global --json + --output-format (G-AUD-01).
run_schema
Runs ssh-cli schema [NAME].