CLI reference
Configure OpenMetal profiles and automate production workloads from a terminal or CI.
Install
npm install --global @openmetal/cli
openmetal --helpGlobal options
Place global options before the subcommand.
openmetal --json --no-input --profile ci sandbox list--jsonemits stable JSON.--no-inputfails instead of prompting.--yesconfirms destructive operations.--profile,--api-url,--organization, and--projectoverride stored context.
Prefer environment variables to secret command arguments in automation.
export OPENMETAL_API_URL="https://api.openmetal.sh"
export OPENMETAL_PROJECT_ID="prj_your_project"
export OPENMETAL_API_KEY="metal_sk_your_key"Command groups
Account and project management:
openmetal org list
openmetal project list
openmetal api-key list
openmetal provider-credential list
openmetal member list
openmetal invitation create --email user@example.com
openmetal billing showCompute and runtime:
openmetal sandbox list
openmetal operation get <operation-id>
openmetal process get <sandbox-id> <process-id>
openmetal file list <sandbox-id> /workspace
openmetal endpoint list <sandbox-id>
openmetal events listWebhook management and organization usage analytics are currently available through the OpenMetal dashboard, REST API, and TypeScript SDK rather than dedicated CLI commands.
Profiles
Use profiles to separate environments and projects. Production uses the hosted OpenMetal API:
openmetal config use-profile production
openmetal --profile production config set \
--api-url https://api.openmetal.sh
openmetal doctorConfiguration precedence starts with command flags, then OPENMETAL_* variables, legacy METAL_* aliases, profile values, and compiled defaults.
Automation pattern
mutation="$(
openmetal --json --no-input sandbox create \
--environment metal/node \
--environment-version latest \
--vcpu 2 \
--memory-mb 4096 \
--runtime-timeout 1800 \
--async
)"
# Extract and persist both IDs before waiting.
openmetal operation wait <operation-id> --timeout 180Do not expose one time keys
API key creation prints the plaintext key once, including JSON mode. Run it in a trusted terminal, not an agent transcript or CI log.
See the CLI quickstart for a complete first run.