komando

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT

README

komando

CI

One safe command line for all your DevOps work — servers, databases, caches, storage and more. For you and your AI agent.

Most people juggle many tools: Termius for servers, TablePlus for databases, redis-cli for caches, a web console for storage, kubectl for clusters. Each has its own logins, its own commands and its own way to break things. komando puts them behind one command line, built so that both you and AI agents (Claude Code, Codex, your own bot) can use it well:

  • Remembers everything you manage in one list: servers, databases, caches, storage.
  • Keeps passwords locked in an encrypted vault. The AI never sees them.
  • Gives clear answers: readable text for you, structured data (JSON) for the AI.
  • Has seatbelts: read-only unless you say otherwise, dangerous commands are blocked, production can be protected.
  • Keeps a history of everything that was done.
You ──ask──▶ AI agent ──▶ komando ──▶ servers, databases, caches, storage, ...

No windows, no menus. Just commands.

Install

Open a terminal (macOS: the Terminal app; Linux: your terminal; Windows: install WSL first) and paste:

curl -fsSL https://raw.githubusercontent.com/sgnd/komando/main/install.sh | sh

Check it worked:

komando version

Other ways: download a file from Releases, or read the script first with curl -fsSLO https://raw.githubusercontent.com/sgnd/komando/main/install.sh and then run sh install.sh. Developers with Go can use go install github.com/sgnd/komando/cmd/komando@latest.

First steps

You need your server's user name and IP address. Your hosting provider shows them in its dashboard. Below, ubuntu and 203.0.113.10 are examples; replace them with yours.

# 1. Add a server and give it a short name (web1)
komando host add web1 ubuntu@203.0.113.10

# 2. Check that it works
komando test web1

# 3. Ask something
komando facts web1            # what is this server?
komando recipe run health web1   # is it healthy?
komando exec web1 -- uptime   # run any command

Logging in with a password? Store it once. You type it, nothing is shown, and it is saved encrypted:

komando secret set web1-pass
komando host edit web1 --password-ref secret:web1-pass

Mark production servers as protected. Then nothing can be changed there unless the command includes --yes (a deliberate "yes, I'm sure"):

komando host edit web1 --protected
Databases and caches

Add them the same way, by name. A private database is reached through a server (--via), so it never has to be open to the internet:

komando secret set app-db-pass
komando conn add app-db postgres://app@10.0.0.5:5432/app \
  --via web1 --password-ref secret:app-db-pass --protected

komando db schema app-db                          # what tables are there?
komando db query app-db "select count(*) from users"
komando cache info my-cache                       # a Redis cache, added with conn add

Queries only read unless you add --write. Try a change first with --write --dry-run: it runs, shows what would change, and is rolled back.

Give it to your AI agent

One command teaches your AI agents (Claude Code, Codex, Cursor, Gemini CLI) to use komando, for every project on this computer:

komando guide install

It adds the komando skill: a short note the agent reads by itself whenever a task touches a server, database, cache or storage. Restart the agent after it. Run it again after you update komando.

Other agents: copy the text of AGENTS.md into your agent's instructions file (Codex: AGENTS.md, Claude Code: CLAUDE.md, in the folder you work in), or simply tell your agent:

Use the komando CLI to manage my servers and databases. Run komando guide first and follow it. Never use --allow-dangerous or --yes without asking me.

Then just ask: "Why is web1 slow?", "Update all servers", "How many users signed up today?", "Renew the certificate on web2".

What it can do

Task Commands
See and check everything at once (servers and conns) list, test
Keep a list of servers and how to log in host, group, key, secret
Bring in what you have (ssh config, .pgpass, my.cnf, .env) or move computers import, export
Run commands on one or many servers exec, script, job (long tasks)
Read, edit and copy files fs, upload, download
Check health (39 ready-made checks) facts, recipe
Manage services, logs, Docker, software, users, schedules svc, logs, docker, pkg, user, cron
Test the network, reach private servers net, tunnel
Reach things behind VPNs, several at once without switching vpn, --via
Keep a list of databases, caches and storage conn
Query and back up databases (PostgreSQL, MySQL, SQLite) db
Read and change caches (Redis, Valkey) cache
Kubernetes and Docker Swarm: status, logs, apply, restart, scale cluster
Container registries: tags, image details, clean up registry
Browse, download and upload files in object storage (S3, MinIO, R2, ...) storage, upload, download
See history and safety rules audit, policy

What comes next: see the roadmap.

Every task, step by step, one page per feature: docs/features. Help for any command: komando <command> --help.

Safety, in one minute

  • Commands like rm -rf /, reboot, DROP TABLE or FLUSHALL are blocked unless a human allows them.
  • Protected servers and databases refuse changes without --yes (looking is still allowed; mark exec commands with --read-only).
  • Database queries and cache commands only read unless you add --write. For databases, the database itself enforces it.
  • --dry-run shows what would happen.
  • File edits change exactly the text you name, never leave a half-written file, and can keep a backup.
  • If a server's identity changes, komando refuses to connect.
  • Everything is recorded: komando audit.

Key terms

Word Meaning
Server A computer (usually in the cloud) that runs your apps.
Terminal / CLI A window where you type commands instead of clicking.
SSH The secure way to log in to and control a Linux server remotely.
Database Where an app keeps its data in tables (PostgreSQL, MySQL, SQLite).
Cache A fast, temporary store an app uses to speed things up (Redis).
Conn komando's word for anything you connect to that isn't a server: a database, cache or storage bucket.
AI agent An AI that can run commands by itself to finish a task.
SSH key A pair of files that proves who you are; safer than a password.
Flag An option added to a command, like --yes or --dry-run.
sudo Running a command as the administrator.
JSON Structured text that programs read easily.

More in the glossary.

Contributing

Bug reports, ideas and pull requests are welcome. See CONTRIBUTING.md. Security issues: SECURITY.md.

License

MIT

Directories

Path Synopsis
cmd
komando command
Command komando is an agent-first SSH and server operations CLI.
Command komando is an agent-first SSH and server operations CLI.
internal
cachex
Package cachex talks to Redis-compatible caches (Redis, Valkey, KeyDB, Dragonfly) and classifies their commands by risk.
Package cachex talks to Redis-compatible caches (Redis, Valkey, KeyDB, Dragonfly) and classifies their commands by risk.
cli
Package cli wires every komando command.
Package cli wires every komando command.
cloud
Package cloud holds komando's own clients for cloud and secret-manager APIs, so no vendor CLI (aws, gcloud, vault) has to be installed (docs/design/built-in.md).
Package cloud holds komando's own clients for cloud and secret-manager APIs, so no vendor CLI (aws, gcloud, vault) has to be installed (docs/design/built-in.md).
dbx
Package dbx runs classified SQL against a conn and turns the result into plain JSON values.
Package dbx runs classified SQL against a conn and turns the result into plain JSON values.
driver
Package driver describes the kinds of non-SSH resources komando can talk to (databases, caches, object storage) and the risk levels its safety checks work with.
Package driver describes the kinds of non-SSH resources komando can talk to (databases, caches, object storage) and the risk levels its safety checks work with.
kube
Package kube talks to the Kubernetes API directly over HTTPS, from one kubeconfig context, without client-go.
Package kube talks to the Kubernetes API directly over HTTPS, from one kubeconfig context, without client-go.
netx
Package netx opens the networks komando reaches targets through (docs/design/network.md).
Package netx opens the networks komando reaches targets through (docs/design/network.md).
openvpn
Package openvpn is komando's own OpenVPN client: the control channel (TLS over OpenVPN's reliable transport, with tls-auth or tls-crypt), the key exchange (key-method 2, TLS-EKM or the OpenVPN PRF), the data channel (AES-GCM, ChaCha20-Poly1305, or AES-CBC with HMAC) and the pushed options.
Package openvpn is komando's own OpenVPN client: the control channel (TLS over OpenVPN's reliable transport, with tls-auth or tls-crypt), the key exchange (key-method 2, TLS-EKM or the OpenVPN PRF), the data channel (AES-GCM, ChaCha20-Poly1305, or AES-CBC with HMAC) and the pushed options.
out
Package out renders every command result as a stable, machine-readable envelope.
Package out renders every command result as a stable, machine-readable envelope.
policy
Package policy detects destructive commands so an agent cannot wreck a server by accident.
Package policy detects destructive commands so an agent cannot wreck a server by accident.
registry
Package registry talks to container registries (Docker Hub, GHCR, GitLab, Harbor, ECR, registry:2) over the OCI Distribution API, with basic or bearer-token auth.
Package registry talks to container registries (Docker Hub, GHCR, GitLab, Harbor, ECR, registry:2) over the OCI Distribution API, with basic or bearer-token auth.
sshx
Package sshx dials hosts from the inventory (with jump-host chains, keychain/agent/password auth and TOFU host-key checking) and runs commands.
Package sshx dials hosts from the inventory (with jump-host chains, keychain/agent/password auth and TOFU host-key checking) and runs commands.
sslvpn
Package sslvpn holds komando's own clients for corporate SSL VPNs: Cisco AnyConnect / ocserv, Fortinet, Palo Alto GlobalProtect, F5 BIG-IP and Pulse/Ivanti.
Package sslvpn holds komando's own clients for corporate SSL VPNs: Cisco AnyConnect / ocserv, Fortinet, Palo Alto GlobalProtect, F5 BIG-IP and Pulse/Ivanti.
store
Package store persists komando state (inventory, conns, keys, snippets, jobs, tunnels, settings) as JSON files under $KOMANDO_HOME (default ~/.komando).
Package store persists komando state (inventory, conns, keys, snippets, jobs, tunnels, settings) as JSON files under $KOMANDO_HOME (default ~/.komando).
storex
Package storex gives `komando storage` one interface over S3-compatible object storage (AWS S3, MinIO, R2, Wasabi, Spaces, B2), FTP/FTPS and SFTP.
Package storex gives `komando storage` one interface over S3-compatible object storage (AWS S3, MinIO, R2, Wasabi, Spaces, B2), FTP/FTPS and SFTP.
vault
Package vault stores secrets (passwords, key passphrases, tokens) encrypted with AES-256-GCM, each bound to its name.
Package vault stores secrets (passwords, key passphrases, tokens) encrypted with AES-256-GCM, each bound to its name.
test
e2e/bwseed command
Command bwseed creates a Vaultwarden account with one login item, the way a Bitwarden client does (keys made and encrypted here), for the e2e test of komando's bw:// references.
Command bwseed creates a Vaultwarden account with one login item, the way a Bitwarden client does (keys made and encrypted here), for the e2e test of komando's bw:// references.
e2e/wgpeer command
wgpeer is a WireGuard "server" for the e2e test.
wgpeer is a WireGuard "server" for the e2e test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL