Skip to main content

CLI

The installed instavm CLI is the fastest way to authenticate, inspect VMs, deploy simple apps, and manage shares from a terminal.

Install

pip install instavm
instavm --help
python -m instavm.cli --help

Configuration order

The CLI resolves settings in this order:

  1. Per-command flags like --api-key, --base-url, and --ssh-host
  2. Environment variables
  3. Stored defaults in ~/.instavm/config.json

The CLI recognizes:

  • INSTAVM_API_KEY
  • INSTAVM_BASE_URL
  • INSTAVM_SSH_HOST

Store and inspect auth

instavm auth set-key
instavm auth status
instavm whoami

For non-interactive shells:

printf '%s' "$INSTAVM_API_KEY" | instavm auth set-key

instavm auth status shows the active profile, redacted key source, base URL, and SSH host.

Remove stored auth

instavm auth logout

If INSTAVM_API_KEY is still set in the environment, it remains active even after logout.

Useful first commands

instavm ls
instavm deploy --plan
instavm cookbook list
instavm share create vm_abc123 3000 --public

Use -j on leaf commands when you want machine-readable output.

Next steps