ssh-cli 0.5.1

Native Rust CLI that gives LLMs (Claude Code, Cursor, Windsurf) the ability to operate remote servers via SSH over stdin/stdout
Documentation
[package]
name = "ssh-cli"
version = "0.5.1"
edition = "2021"
rust-version = "1.85.0"
default-run = "ssh-cli"
description = "Native Rust CLI that gives LLMs (Claude Code, Cursor, Windsurf) the ability to operate remote servers via SSH over stdin/stdout"
authors = ["Danilo Aguiar <daniloaguiarbr@proton.me>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/danilo-aguiar-br/ssh-cli"
homepage = "https://github.com/danilo-aguiar-br/ssh-cli"
documentation = "https://docs.rs/ssh-cli"
readme = "README.md"
keywords = ["ssh", "cli", "llm", "automation", "devops"]
categories = ["command-line-utilities", "network-programming"]
exclude = [
    ".serena/",
    ".claude/",
    ".setting.cyber/",
    ".vscode/",
    "logs/",
    "memory/",
    "/CLAUDE.md",
    "/AGENTS.md",
    "/MEMORY.md",
    "docs_rules/",
    "docs_prd/",
    "/gaps.md",
    "graphrag.sqlite",
    "graphrag.sqlite-shm",
    "graphrag.sqlite-wal",
    ".enrich-queue.sqlite",
    ".enrich-queue.sqlite-shm",
    ".enrich-queue.sqlite-wal",
    "projeto_ssh-cli.md",
    ".github/",
    "tests/fixtures/",
    "ralph-loop.local.md",
    "deny.toml",
    "Cross.toml",
    ".env",
    ".env.*",
    "*.profraw",
    "*.profdata",
    "coverage/",
]

[lib]
name = "ssh_cli"
path = "src/lib.rs"

[[bin]]
name = "ssh-cli"
path = "src/main.rs"

[dependencies]
# Async runtime
tokio = { version = "1.40", features = ["rt-multi-thread", "io-util", "io-std", "time", "sync", "macros", "fs", "net"] }

# CLI and configuration
clap = { version = "4.5", features = ["derive", "env", "unicode", "wrap_help"] }
clap_complete = "4.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
directories = "6"
tempfile = "3.13"
fs2 = "0.4"

# Internationalization
sys-locale = "0.3"

# Signals and terminal
ctrlc = { version = "3.4", features = ["termination"] }
termcolor = "1.4"
unicode-normalization = "0.1"

# musl allocator (enabled only with musl-allocator feature)
mimalloc = { version = "0.1", optional = true }

# Credential security
zeroize = { version = "1.8", features = ["derive"] }
secrecy = { version = "0.10", features = ["serde"] }
# Default at-rest encryption (GAP-009/R-SECRETS): ChaCha20-Poly1305 + env/file/keyring/xdg secrets.key
chacha20poly1305 = "0.10"
base64 = "0.22"
getrandom = "0.2"
keyring = "3"

# Logging and errors
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
thiserror = "2.0"
anyhow = "1.0"

# Utilities
chrono = { version = "0.4", features = ["serde", "clock"] }

# Async traits to enable test mocks.
async-trait = "0.1"

# Real SSH via russh (GAP-SSH-DEP-002 / 0.3.8).
# `default-features = false` evita puxar `rsa` 0.9.x (RUSTSEC-2023-0071 Marvin Attack).
# `aws-lc-rs` (crypto backend) + `flate2` (compressão zlib).
# Keys in . MSRV 1.85 (russh >= 0.55).
# Security floor: russh >= 0.60.3 (RUSTSEC-2026-0153/0154 / CVE-2026-46673).
# Target: 0.62.x (latest patched; no COMPAT RC pins — stable resolve on install).
russh = { version = "0.62", default-features = false, features = ["aws-lc-rs", "flate2"], optional = true }

[target.'cfg(unix)'.dependencies]
signal-hook = "0.3"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_System_Console", "Win32_Foundation"] }

[features]
# Real SSH is ENABLED BY DEFAULT as of iteration 2.
# For builds without russh (e.g. dependency diagnosis), use .
default = ["ssh-real"]
# Enables real SSH stack via russh + aws-lc-rs.
ssh-real = ["dep:russh"]
# Enables mimalloc as global allocator (useful for musl builds/performance).
musl-allocator = ["dep:mimalloc"]

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1"
tempfile = "3.13"
serial_test = "3.1"
mockall = "0.13"
async-trait = "0.1"
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1.5"
insta = { version = "1.39", features = ["json", "redactions"] }

[[bench]]
name = "ssh_operations"
harness = false

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = "symbols"
panic = "abort"

[profile.dev]
opt-level = 0
debug = true
panic = "unwind"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]