komando

module
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 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.

You may use one tool for servers, another for databases, another for storage and another for clusters. Each has its own logins, its own commands and its own way to break things. komando puts them behind one command that you and an AI agent (Claude Code, Codex, Cursor, Gemini CLI, your own bot) can both use safely:

  • One list of everything you manage.
  • Passwords stay in an encrypted vault. An AI agent never sees them.
  • It reads unless you say otherwise. Dangerous commands stop, and production can be protected.
  • Readable text for you, JSON for an agent.
  • A record of everything that was done, and by whom.
  • One file to install, with its own SSH, database and VPN clients built in.

Install

On macOS or Linux, open a terminal and paste:

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

On Windows, download komando_windows_amd64.zip from Releases and put komando.exe in a folder on your PATH.

Check that it works:

komando version

Other ways to install, how to update, tab completion and how to remove komando: Install, update, remove.

Your first five minutes

You need a server's address and the user you log in as. komando logs in like ssh: with your SSH key, a key file or a password.

1. See what komando does
komando

At your terminal it lists the commands by what they work on:

komando: one safe command line for servers, databases, caches, queues, storage, clusters and VPNs

Nothing added yet: komando host add  or  komando import ssh-config

START        host add · conn add · import ssh-config · list · test TARGET · guide install
SERVERS      exec  logs  facts  fs  svc  job  docker  pkg  cron  user  reboot  shell
DATA         db  cache  queue  storage
...

Already have servers in ~/.ssh/config? komando import ssh-config brings them in.

2. Add a server
komando host add

Typed alone, it asks one question per line: a name, the address, the user, how you log in, and whether the server is production. Enter takes the default in brackets, ? explains the question. Then it shows the full command it made, and asks before it runs:

$ komando host add web1 ubuntu@203.0.113.10 --protected
Run it? [y/N, d = --dry-run first]: y

Next time you can type that line yourself. A production server is protected: komando asks you before every change there.

3. Test it and look around
komando test web1                 # can komando reach it and log in?
komando facts web1                # what is this server?
komando logs web1 --unit nginx    # read a service's logs
komando exec web1 -- uptime       # run any command (words for the server go after --)

Leave out an argument and komando asks for it, with a numbered list of your servers.

4. Give it to your AI agent
komando guide install

This teaches Claude Code, Codex, Cursor and Gemini CLI to use komando, for every project on this computer. Restart the agent, then ask in your own words: "Why is web1 slow?" For any other agent, see AGENTS.md.

When an agent wants to change something that needs your yes, komando shows you a window to allow it once. The agent never sees your passwords.

What it can do

Task Commands
See and check everything at once list, test, status
Keep your 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, job, shell
Read, edit and copy files fs, upload, download, cp, sync
Check health and certificates facts, recipe, cert
Services, logs, Docker, packages, users, schedules, restarts svc, logs, docker, pkg, user, cron, reboot
Test the network, reach private servers net, tunnel, --via
Reach things behind a VPN vpn
Databases: query, back up, restore db
Caches (Redis, Valkey, memcached) cache
Message queues (Kafka, RabbitMQ, NATS, SQS, Pub/Sub) queue
Files in buckets and on file servers storage
Kubernetes and Docker Swarm cluster
Container registries registry
History, your own rules, a check of your setup audit, policy, doctor

Every task, step by step: the feature guide. Help for one command: komando <command> --help.

Safety in one minute

  • Commands like rm -rf /, reboot or DROP TABLE stop until a person allows them.
  • On a protected server or conn, komando asks you before any change. An agent or a script needs --yes, which only you can approve.
  • Database queries and cache commands only read unless you add --write.
  • --dry-run shows what would happen and changes nothing.
  • If a server's identity (host key) changes, komando will not connect.
  • Everything is recorded: komando audit.

More: Safety and Security.

What komando sends

Nothing on its own. komando has no usage statistics, no crash reports and no update check in the background. It connects only where you send it: the servers, databases, caches, queues, storage, clusters, registries and VPNs you added, the password manager or cloud you named in a password reference, and AWS when you run komando login aws. komando update asks GitHub for the newest release only when you run it.

Something wrong?

Every error has a code and a hint with the next step. komando doctor checks your setup. Common errors and fixes: Troubleshooting.

Contributing

Bug reports, ideas and pull requests are welcome: see CONTRIBUTING.md. Security problems: SECURITY.md. The rules komando follows: docs/design/principles.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/code-layout.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/code-layout.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.
engine
Package engine holds what one komando call is: who makes it and the state of its approvals.
Package engine holds what one komando call is: who makes it and the state of its approvals.
flock
Package flock takes and releases an exclusive lock on an open file, so komando processes running at the same time wait for each other.
Package flock takes and releases an exclusive lock on an open file, so komando processes running at the same time wait for each other.
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/features/vpn.md).
Package netx opens the networks komando reaches targets through (docs/features/vpn.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.
releasesig
Package releasesig signs a komando release and checks that signature.
Package releasesig signs a komando release and checks that signature.
sealdb
Package sealdb is komando's local store: one SQLite file whose records are sealed rows (package sealrow).
Package sealdb is komando's local store: one SQLite file whose records are sealed rows (package sealrow).
sealfile
Package sealfile is the sealed file of `komando export --sealed` and `komando export --for-phone`: one format, opened with a passphrase or with the private key of a phone.
Package sealfile is the sealed file of `komando export --sealed` and `komando export --for-phone`: one format, opened with a passphrase or with the private key of a phone.
sealrow
Package sealrow seals one record of komando's local store.
Package sealrow seals one record of komando's local store.
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 keeps komando state (inventory, conns, keys, snippets, jobs, tunnels, settings) in the sealed store under $KOMANDO_HOME (default ~/.komando).
Package store keeps komando state (inventory, conns, keys, snippets, jobs, tunnels, settings) in the sealed store 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.
tmpclean
Package tmpclean keeps the temporary files and folders this komando run made (a download before its rename, a sign-in browser profile, a database CA copy), so a hard stop still removes them.
Package tmpclean keeps the temporary files and folders this komando run made (a download before its rename, a sign-in browser profile, a database CA copy), so a hard stop still removes them.
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.
scripts
releasesig command
releasesig makes komando's release signing key and signs a release's checksums.txt with it (see internal/releasesig).
releasesig makes komando's release signing key and signs a release's checksums.txt with it (see internal/releasesig).
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