How windvalley/gossh works
GoSSH is a CLI for operating on SSH host fleets. Users select hosts and a task—run a command or script, push files, or fetch files—and receive task output; inventory expansion, authentication, and SSH execution support that workflow. Separate branches cover configuration generation and vault encryption/decryption. The task coordinator and batch SSH client are the internal execution layers. Some command and configuration implementations are unsampled, so their relationships are included only where the README documents capabilities or source-index references support them.
Main entry points: sshtask.go Task coordinator · main.go CLI entry · configflags Config and flags · command.go Run command
Components 17
CLI and tasks
- CLI entry
cmd/gossh/main.go - Run command
internal/cmd/command.go - Run script
internal/cmd/script.go - Push files
internal/cmd/push.go - Fetch files
internal/cmd/fetch.go - Generate config
internal/cmd/config.go
SSH execution
- Task coordinator
internal/pkg/sshtask/sshtask.go - Batch SSH client
pkg/batchssh/batchssh.go
Host and configuration
- Host inventory
pkg/inventory/inventory.go - Config and flags
internal/pkg/configflags - Task output
pkg/log
Vault security
- Vault commands
internal/cmd/vault/vault.go - File encryption
internal/cmd/vault/encrypt_file.go - AES wrapper
internal/pkg/aes/aes.go - AES implementation
pkg/aes/aes.go
Other components
- Operator
- SSH hosts
Connections 23
- Operator → CLI entry: invokes
- CLI entry → Run command: dispatches
- CLI entry → Run script: dispatches
- CLI entry → Push files: dispatches
- CLI entry → Fetch files: dispatches
- CLI entry → Generate config: dispatches
- CLI entry → Vault commands: dispatches
- Run command → Task coordinator: starts task
internal/cmd/command.go - Run script → Task coordinator: starts task
internal/cmd/script.go - Push files → Task coordinator: starts task
internal/cmd/push.go - Fetch files → Task coordinator: starts task
- Run command → Config and flags: validates settings
internal/cmd/command.go - Run script → Config and flags: validates settings
internal/cmd/script.go - Push files → Config and flags: validates settings
internal/cmd/push.go - Task coordinator → Config and flags: reads settings
internal/pkg/sshtask/sshtask.go - Task coordinator → Host inventory: resolves hosts
internal/pkg/sshtask/sshtask.go - Task coordinator → Batch SSH client: configures client
internal/pkg/sshtask/sshtask.go - Task coordinator → Task output: logs task
internal/pkg/sshtask/sshtask.go - Batch SSH client → SSH hosts: runs SSH tasks
pkg/batchssh/batchssh.go - Operator → Vault commands: requests vault task
- Vault commands → File encryption: provides file encryption
- File encryption → AES wrapper: encodes content
internal/cmd/vault/encrypt_file.go - AES wrapper → AES implementation: encrypts data
internal/pkg/aes/aes.go