Skip to main content

ssh_cli/commands/
mod.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2// G-CLOSE-04 / G-CLOSE-09: command layer (clap CAMADA 2) — real thin handlers.
3#![forbid(unsafe_code)]
4//! Per-subcommand command layer (rules clap CAMADA 2).
5//!
6//! CLI types live in [`crate::cli`]; this module owns the dispatch entry so
7//! `main` / `lib::run` route through a stable command surface.
8
9use crate::cli::CliArgs;
10use anyhow::Result;
11
12/// Runs the requested subcommand (command-layer entry).
13pub async fn run(args: CliArgs) -> Result<()> {
14    crate::cli::dispatch_impl(args).await
15}
16
17/// Exec-family handlers (domain: [`crate::vps`] exec_ops).
18pub mod exec {
19    pub use crate::vps::{
20        run_exec as run, run_su_exec as run_su, run_sudo_exec as run_sudo, ExecOptions,
21    };
22}
23
24/// VPS inventory handlers.
25pub mod vps {
26    pub use crate::vps::{run_connect as connect, run_vps_command as run};
27}
28
29/// SCP handlers.
30pub mod scp {
31    pub use crate::scp::{run_scp as run, ScpOptions};
32}
33
34/// SFTP handlers (G-SFTP).
35pub mod sftp {
36    pub use crate::sftp::{run_sftp as run, SftpOptions};
37}
38
39/// Tunnel handler.
40pub mod tunnel {
41    pub use crate::tunnel::run_tunnel as run;
42}
43
44/// Health-check handler.
45pub mod health {
46    pub use crate::vps::run_health_check as run;
47}
48
49/// Secrets handlers.
50pub mod secrets {
51    pub use crate::vps::run_secrets_command as run;
52}
53
54/// Completions generation.
55pub mod completions {
56    pub use crate::cli::generate_completions as run;
57}