komando

module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0

README

komando

CI

One safe command line for your servers, databases, caches, queues, storage, clusters and VPNs. For you and your AI agent.

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

  • One list for everything you manage: servers, databases, caches, queues, storage, clusters, registries and VPNs.
  • Passwords stay in an encrypted vault (or your own password manager). An AI agent that komando recognises (Claude Code, Codex, Cursor, Gemini CLI, or any agent with KOMANDO_AGENT=1) never sees them.
  • Readable text for you, JSON for an AI agent.
  • It only reads unless you say otherwise. Dangerous commands are blocked, and production can be protected.
  • A history of everything that was done, and by whom.
  • One file to install, with its own SSH, database and VPN clients built in.

New here? Install it, then type komando. A menu asks what you want to do, one plain question at a time. Unsure about a word? See Key terms.

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 that it worked:

komando version

It says command not found? The installer put komando in a folder your terminal does not look in yet. Run the export PATH=... line it printed, and add that line to ~/.zshrc (macOS) or ~/.bashrc (Linux) so it stays.

Other ways to install:

  • Download a file from Releases.
  • Read the script first with curl -fsSLO https://raw.githubusercontent.com/sgnd/komando/main/install.sh, then run sh install.sh. KOMANDO_INSTALL_DIR=DIR picks the folder and KOMANDO_VERSION=v0.5.0 one version.
  • With Go 1.27.3 or newer: go install github.com/sgnd/komando/cmd/komando@latest.

To check that a downloaded archive was built by komando's release workflow, run gh attestation verify FILE --repo sgnd/komando.

Updating, tab completion and removing komando are at the end: Update, tab completion, uninstall.

Your first five minutes

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; use yours.

komando logs in like ssh does: with your SSH key (in ~/.ssh/ or your SSH agent), a key file or a password. The first time, it remembers the server's identity (its host key) and checks it on every later visit.

1. Type komando
komando

A menu opens. On a new computer it looks like this:

komando · v0.9.0 · 0 servers

Nothing here yet. Add asks for a name, an address and a user, one at a time.

> 1. Add           A server, database, cache, queue, storage, cluster, VPN ...
  2. AI agent      Teach your AI agents to use komando (once)
  3. All features  Everything komando does, by area, as questions
  4. List          Everything komando knows about
  5. Doctor        Check your setup, the inventory and its security

↑↓ move · Enter or 1-5 choose · ? help · q quit

Move with the arrow keys (or j/k) and press Enter, or press a row's number. ? shows what komando does, by task, and q quits. AI agent shows while no AI agent on this computer has komando's skill, and Import shows when ~/.ssh/config names servers komando does not know yet.

2. Add a server

Choose Add, then Server. komando asks one question at a time: a name, what the server runs (Linux or Windows), the address, the user, the port, how you log in, and whether it is production. Each question shows an example, and Enter takes the default (Port [22]:). A wrong answer, such as a name that is taken or a key file that is not there, is marked ! under the question and waits for you to fix it. The production question starts on Yes, protect it: komando then asks you before every change there. Choose No for a test machine.

The last screen shows the commands your answers make, before anything runs:

Add a server: check and run
This runs:
  $ komando host add web1 ubuntu@203.0.113.10 --protected
  $ komando test web1

Choose Run it. If you log in with a password, the command adds --ask-password: it asks for the password itself, hidden, and keeps it in the vault. You never type a password into the menu.

Add works the same way for a database, a cache, a message queue, file storage, Kubernetes, a container registry or a VPN.

3. Test it

The add already ran komando test web1. Run it again any time, from the menu (Test) or by typing:

komando test web1
4. Run a command

In the menu, Facts shows what the server is and Shell logs you in. All features lists every command by area and asks for what each one needs. Or type the command:

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

The menu runs the same command you could type, and shows it first ($ komando facts web1). Every key and screen of the menu is on the menu page.

The same steps, typed

Everything the menu does is a command. These lines add, check and protect the same server:

komando host add web1 ubuntu@203.0.113.10
komando test web1
komando host edit web1 --protected

Did your cloud provider give you a key file to download (AWS calls it a key pair)? Name it when you add the server: komando host add web1 ubuntu@203.0.113.10 --identity ~/Downloads/my-key.pem.

On a protected server nothing can change unless the command includes --yes (a deliberate "yes, I'm sure"). Looking around is still allowed: for exec, say that the command only reads with --read-only, for example komando exec web1 --read-only -- uptime.

Passwords and two-factor login

At your terminal komando asks for a password, as ssh does, and also for a one-time code if the server wants one. Store the password once to skip the question and to let your AI agent use the server too. 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

A two-factor server needs a fresh code, so a stored password is not enough. Log in once and komando keeps that login for 8 hours (the login_for setting), for your AI agent too:

komando login web1
Where the vault key is kept

A new vault keeps its key in the system keychain (the macOS keychain, or the Secret Service on Linux), so a backup or a synced copy of ~/.komando does not open it. Where there is no keychain (a Linux server, a container), the key is a file in ~/.komando and komando doctor says so. A vault from an older komando keeps its key file until you move the key, once (nothing is re-encrypted):

komando secret keychain

On Linux this needs secret-tool (sudo apt install libsecret-tools) and a desktop session with a keyring. On a server without one, give the vault a passphrase instead (komando secret passphrase). You do not need KOMANDO_VAULT_PASS: a vault passphrase is optional, mainly for a computer without a keychain (see Settings). komando doctor checks your whole setup.

Databases and caches

Add them with the menu, or with conn add and a short 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 conn add app-cache redis://default@10.0.0.7:6379/0 --via web1

komando db schema app-db                          # what tables are there?
komando db query app-db "select count(*) from users"
komando cache info app-cache                      # memory, clients, keys

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.

Already have a list?

komando import brings servers and conns in from ~/.ssh/config, .pgpass, my.cnf, .env, kubeconfig, Docker, FileZilla, rclone, DBeaver, AWS profiles (S3 buckets) and CSV spreadsheets. Try it with --dry-run first.

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, and run it again after you update komando. In Codex, open /hooks once and approve komando's guard; Codex asks before it runs a new hook.

Other agents: copy the text of AGENTS.md into your agent's instructions file (for example AGENTS.md or CLAUDE.md in the folder you work in), or 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.

Also set KOMANDO_AGENT=1 in that agent's environment. Without it, komando recognises only the four agents above, and its seatbelts for AI agents (secrets hidden in output, a person allows --yes) apply only to an agent it recognises.

Then ask in your own words: "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 list, test, status
Keep a list of servers and how to log in host, group, key, secret, login
Bring in what you already have, or move to another computer import, export
Run commands on one or many servers exec, script, job (long tasks), shell (people only)
Read, edit and copy files; copy whole folders fs, upload, download, cp, sync
Check health (36 ready-made checks, plus your own) and certificates facts, recipe, cert
Manage services, logs, Docker, software, users, schedules; restart servers svc, logs, docker, pkg, user, cron, reboot
Test the network, reach private servers net, tunnel, --via
Reach things behind VPNs, several at once (WireGuard, OpenVPN, Tailscale, AnyConnect, L2TP/IPsec, IKEv2, Cisco IPsec, GlobalProtect, Fortinet, Pulse, F5, ...) vpn
Keep a list of databases, caches, queues, storage, clusters and registries conn
Query, back up and restore databases (PostgreSQL, MySQL/MariaDB; SQLite: query and back up; SQL Server, Oracle, ClickHouse, Snowflake, BigQuery and MongoDB: query) db
Read and change caches (Redis, Valkey, memcached) cache
Message queues (Kafka, RabbitMQ, NATS JetStream, Amazon SQS, Google Cloud Pub/Sub): list, peek, lag, send queue
Files in S3, Google Cloud and Azure buckets, on WebDAV/FTPS/SFTP/FTP servers and Windows (SMB) shares storage, upload, download, sync
Kubernetes and Docker Swarm: status, logs, apply, restart, scale cluster
Container registries: tags, image details, copy, clean up registry
History, safety rules and a health check of your setup audit, policy, doctor
What is still running; settings status, prompt, config
Help for AI agents guide, schema

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

Safety, in one minute

  • Commands like rm -rf /, reboot, DROP TABLE or FLUSHALL are blocked unless a person allows them.
  • Protected servers and conns refuse changes without --yes. Looking is still allowed (mark read-only 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, without changing anything.
  • File edits change exactly the text you name, never leave a half-written file, and can keep a backup.
  • If a server's identity (host key) changes, komando refuses to connect.
  • When an AI agent asks for --yes, --allow-dangerous or --reveal, komando shows you a window to allow it once.
  • Everything is recorded: komando audit, and komando audit verify checks that nobody edited the record.

More: Safety and Security.

Something wrong?

Every error has a code and a hint with the next step. komando doctor checks komando's folder, vault, keys and servers. The common errors and their fixes are in Troubleshooting.

Update, tab completion, uninstall

Update
komando update --dry-run   # is there a newer version?
komando update             # install it

komando update downloads the newest release, checks it against the release's checksums (as the install line does) and replaces the komando program. Your servers, secrets and history in ~/.komando stay as they are. Then run komando guide install again, so your AI agents get the new skill.

  • komando is in a folder only root may change, such as /usr/local/bin? Run sudo komando update.
  • Go back to an older version with komando update v0.6.0. It asks first: an older version may lack safety checks the newer one has.

komando 0.6.0 and older have no update command: run the install line again. Did you install it with sudo? Then update with sudo too: curl -fsSL https://raw.githubusercontent.com/sgnd/komando/main/install.sh | sudo sh. Without it, the installer cannot write there and puts the new version in ~/.local/bin, and your terminal may keep running the old one. komando version shows which one runs.

Tab completion

Press Tab to complete commands, flags and the names of your servers, conns, groups and tags. Turn it on once (then open a new terminal):

echo 'source <(komando completion zsh)' >> ~/.zshrc     # zsh (macOS)
echo 'source <(komando completion bash)' >> ~/.bashrc   # bash (Linux)

For fish and PowerShell, see komando completion --help.

Uninstall
  1. Stop what komando still runs: komando status lists it; komando vpn down --all and komando tunnel stop --all stop it.
  2. Take the skill and the guard out of your AI agents: komando guide uninstall (add --project in a folder where you ran guide install --project).
  3. Keep a copy of ~/.komando if you may need your servers or secrets again (see Move to another computer), then delete the folder. Did you move the vault key into the system keychain (komando secret keychain)? Run komando secret keychain --off --yes first if you keep the copy; otherwise remove the item named komando vault ... from the keychain (macOS: the Keychain Access app).
  4. Delete the program: rm "$(command -v komando)" (with sudo when it is in /usr/local/bin), and the export PATH=... line the installer asked you to add, if you added one.

Key terms

Word Meaning
Server A computer (usually in the cloud) that runs your apps.
Host komando's word for a server in its list. You add one with Add in the menu, or with komando host add.
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.
Conn komando's word for anything you connect to that isn't a server: a database, cache, queue, storage bucket, cluster or registry.
Target What a command works on: one name, a group (@web), a tag, or all.
Flag An option added to a command, like --yes or --dry-run.
AI agent An AI that can run commands by itself to finish a task.

Every other word is in the glossary.

Contributing

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

License

komando is free and open source under the GNU Affero General Public License v3.0 (AGPL-3.0). You can use it for any purpose, at home or at work. If you change komando and give it to others, or let them use it over a network, you must share the source code of your version under the same license.

Want to build komando into a closed-source product, or does your company not allow AGPL software? A commercial license is available.

Contributors sign a short Contributor License Agreement once.

Versions up to v0.2.0 were released under the MIT License and stay under it.

© Sugeng Agung Suganda

Directories

Path Synopsis
cmd
komando command
Command komando manages servers, databases, queues, storage, clusters and VPNs, for people and AI agents.
Command komando manages servers, databases, queues, storage, clusters and VPNs, for people and AI agents.
internal
browserx
Package browserx shows a sign-in page in a browser window and reads the address the sign-in ends on.
Package browserx shows a sign-in page in a browser window and reads the address the sign-in ends on.
cachex
Package cachex talks to Redis-compatible caches (Redis, Valkey, KeyDB, Dragonfly) and memcached, and classifies their commands by risk.
Package cachex talks to Redis-compatible caches (Redis, Valkey, KeyDB, Dragonfly) and memcached, 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, queues, 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, queues, object storage) and the risk levels its safety checks work with.
ipsec
Package ipsec holds komando's own IPsec clients: IKEv1 (for L2TP/IPsec and Cisco-style IPsec with XAUTH) and IKEv2, with ESP carried in UDP (RFC 3948), so they run as an ordinary program without admin rights and without changing the computer's network: komando always tells the server it is behind NAT, so ESP never needs a raw socket.
Package ipsec holds komando's own IPsec clients: IKEv1 (for L2TP/IPsec and Cisco-style IPsec with XAUTH) and IKEv2, with ESP carried in UDP (RFC 3948), so they run as an ordinary program without admin rights and without changing the computer's network: komando always tells the server it is behind NAT, so ESP never needs a raw socket.
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.
l2tp
Package l2tp is komando's own L2TP client (RFC 2661): one tunnel with one session carrying PPP, which logs in and brings up IPv4.
Package l2tp is komando's own L2TP client (RFC 2661): one tunnel with one session carrying PPP, which logs in and brings up IPv4.
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.
ppp
Package ppp is a minimal PPP peer for the VPNs that carry PPP (L2TP): LCP (RFC 1661), IPCP with DNS (RFC 1332, RFC 1877) and the logins the server asks for: CHAP-MD5 (RFC 1994), MS-CHAPv2 (RFC 2759, with the server's proof checked) and, only when the VPN allows it, PAP (RFC 1334), which sends the password itself.
Package ppp is a minimal PPP peer for the VPNs that carry PPP (L2TP): LCP (RFC 1661), IPCP with DNS (RFC 1332, RFC 1877) and the logins the server asks for: CHAP-MD5 (RFC 1994), MS-CHAPv2 (RFC 2759, with the server's proof checked) and, only when the VPN allows it, PAP (RFC 1334), which sends the password itself.
proxyx
Package proxyx sends komando's HTTPS clients through the company proxy that the environment names (HTTPS_PROXY, HTTP_PROXY, NO_PROXY), as curl, kubectl and docker do.
Package proxyx sends komando's HTTPS clients through the company proxy that the environment names (HTTPS_PROXY, HTTP_PROXY, NO_PROXY), as curl, kubectl and docker do.
proxyx/proxytest
Package proxytest is a small HTTP CONNECT proxy for tests.
Package proxytest is a small HTTP CONNECT proxy for tests.
queuex
Package queuex talks to message queues for `komando queue`: Apache Kafka (and what speaks its protocol: Redpanda, MSK, Confluent Cloud) through franz-go, and the engines that register themselves from its subfolders (RabbitMQ, NATS JetStream, Amazon SQS, Google Cloud Pub/Sub).
Package queuex talks to message queues for `komando queue`: Apache Kafka (and what speaks its protocol: Redpanda, MSK, Confluent Cloud) through franz-go, and the engines that register themselves from its subfolders (RabbitMQ, NATS JetStream, Amazon SQS, Google Cloud Pub/Sub).
queuex/nats
Package nats is the NATS JetStream engine of `komando queue`, through github.com/nats-io/nats.go.
Package nats is the NATS JetStream engine of `komando queue`, through github.com/nats-io/nats.go.
queuex/pubsub
Package pubsub is the Google Cloud Pub/Sub engine of `komando queue`.
Package pubsub is the Google Cloud Pub/Sub engine of `komando queue`.
queuex/rabbitmq
Package rabbitmq is the RabbitMQ engine of `komando queue` (AMQP 0-9-1, through github.com/rabbitmq/amqp091-go).
Package rabbitmq is the RabbitMQ engine of `komando queue` (AMQP 0-9-1, through github.com/rabbitmq/amqp091-go).
queuex/sqs
Package sqs is the Amazon SQS engine of `komando queue`.
Package sqs is the Amazon SQS engine of `komando queue`.
registry
Package registry talks to container registries (Docker Hub, GHCR, GitLab, Harbor, ECR, ACR, Artifact Registry, 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, ACR, Artifact Registry, 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), Google Cloud Storage, Azure Blob, FTP/FTPS, SFTP, WebDAV and SMB shares.
Package storex gives `komando storage` one interface over S3-compatible object storage (AWS S3, MinIO, R2, Wasabi, Spaces, B2), Google Cloud Storage, Azure Blob, FTP/FTPS, SFTP, WebDAV and SMB shares.
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.
winrm
Package winrm is komando's own WinRM client: it runs one command on a Windows server through WS-Management (the Windows Remote Shell protocol, MS-WSMV), over HTTPS or HTTP, with NTLM or Basic login.
Package winrm is komando's own WinRM client: it runs one command on a Windows server through WS-Management (the Windows Remote Shell protocol, MS-WSMV), over HTTPS or HTTP, with NTLM or Basic login.
test
e2e/bigquery command
Command bigquery is a stand-in for BigQuery's REST API and Google's token endpoint in the end-to-end lab: no Google project is at hand, and the free emulator cannot do dry runs.
Command bigquery is a stand-in for BigQuery's REST API and Google's token endpoint in the end-to-end lab: no Google project is at hand, and the free emulator cannot do dry runs.
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/snowflake command
Command snowflake is a stand-in for Snowflake's SQL API in the end-to-end lab: no Snowflake account or emulator is free to run there.
Command snowflake is a stand-in for Snowflake's SQL API in the end-to-end lab: no Snowflake account or emulator is free to run there.
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