zomg is the main client for Zomg. It talks to zomg-api over HTTP and WebSocket, so every command here maps to a documented API route. Use the CLI for day-to-day work, and reach for the API when you want to drive Zomg from your own tooling.

Install

curl -fsSL https://zomg.ai | sh
This installs zomg to ~/.local/bin. Once connected to an instance, keep the CLI current with the version its API serves:
zomg upgrade

Select a target

The CLI needs a base URL and a bearer token to reach the API. Both come from the selected runtime target, so most commands take no connection flags:
zomg use dev.example.com
zomg auth signin
zomg list
zomg use zomg.ai discovers the instance’s API, saves it as a runtime target, and makes it the default; zomg use <name> switches between configured targets. Use zomg target list to inspect targets, zomg target add <name> --api-url <url> to add one by hand, and zomg target remove <name> to delete one. Use zomg config get current when a script only needs the selected runtime target name. Use ZOMG_TARGET=<name> or the global --target <name> flag to target a different instance for a single command. ZOMG_PROFILE and --profile also select the runtime target name. See target selection and profiles for the full resolution order.

Global flags

These flags work on runtime commands that talk to zomg-api.
FlagDescription
--target <name>Target a specific runtime target instead of the selected default.
--profile <name>Select a runtime target with the same name.
--url <url>Override the API base URL.
--token <token>Override the bearer token.
--ip <ip>Override the connection IP, keeping the Host header for TLS/SNI.
--secure / --insecureForce-enable or disable TLS verification.
-h, --helpPrint help. Add --help (not -h) for the long form with examples.

Box refs

Most commands target a box by its ref. The common forms:
FormMeaning
nameBox name in the resolved project.
project:nameExplicit project (canonical, colon).
project.nameSame, dot sugar.
.The current box (from ZOMG_PROJECT + BOX_NAME).
-An ephemeral box (auto-created, auto-deleted).
See reference resolution for project resolution and every ref form.

Command groups

Boxes

Create, list, update, stop, resume, delete, publish, and inject.

Exec and console

Run commands, attach terminals, tail logs, and wait on ports.

Files

Copy files into and out of a box filesystem.

Services

Run long-lived services and publish them at stable names.

Packs

Install zpacks, create instances, and inspect outputs, edges, and events.

Data, snapshots, and bases

Manage data volumes, root checkpoints, and base templates.

Auth and access

Sign in, manage auth policy, GitHub grants, and deployment users.

Config and housekeeping

Manage targets and local config, check health, and upgrade.

Packs

A zpack is a service declared as data. zomg install uploads a pack and zomg pack list/show/update/rebuild/remove manages the registry. Once a pack is installed, zomg <pack> <verb> dispatches dynamically — zomg pg create db1, zomg pg connect db1. The read-side surfaces are zomg outputs (values computed on read), zomg uses (connect edges / blast radius), zomg events (attributed verb history), and zomg env refresh (re-resolve a consumer’s injected env). See the Packs reference.