komando

module
v0.3.1 Latest Latest
Warning

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

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

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:

  • One list for everything you manage: servers, databases, caches, storage, clusters, registries and VPNs.
  • Passwords stay locked in an encrypted vault (or your own password manager). The AI never sees them.
  • Clear answers: readable text for you, structured data (JSON) for the AI.
  • Seatbelts: read-only unless you say otherwise, dangerous commands are blocked, production can be protected.
  • A full history of everything that was done, and by whom.
  • Nothing else to install: one file, with its own SSH, database and VPN clients built in.
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

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: 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.

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

# 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 instead of a key? Store it once, then komando test web1 again. You type the password, 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"). Looking around is still allowed:

komando host edit web1 --protected
Databases and caches

Add them the same way, 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 servers and databases somewhere? komando import brings them in from ~/.ssh/config, .pgpass, my.cnf, .env, kubeconfig, Docker, FileZilla, rclone and DBeaver. 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. Run it again after you update komando.

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 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 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, storage, clusters and registries conn
Query, back up and restore databases (PostgreSQL, MySQL, SQLite) db
Read and change caches (Redis, Valkey) cache
Files in S3, MinIO, R2 and on FTPS/SFTP servers 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.

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 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, 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 issues: 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 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.
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: PAP (RFC 1334), CHAP-MD5 (RFC 1994) and MS-CHAPv2 (RFC 2759, with the server's proof checked).
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: PAP (RFC 1334), CHAP-MD5 (RFC 1994) and MS-CHAPv2 (RFC 2759, with the server's proof checked).
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