CLI Reference

The mt binary communicates with mentat-server over HTTP. Default server address: http://127.0.0.1:4646.

global options
mt [--server <URL>] <command>

Options:
  --server <SERVER>  Mentat server address [default: http://127.0.0.1:4646]
  -h, --help         Print help

Commands

mt run <file.yaml>

Submit a job from a YAML service definition file.

mt run dune-stack.yaml
mt run --server http://10.0.0.1:4646 production.yaml

mt status [job-id]

Show job status. Without arguments, lists all jobs. With a job ID, shows details.

mt status
mt status abc123-def456

mt deploy <service> --image <tag>

Deploy a new image for a service using its configured strategy. Optionally override strategy.

mt deploy spacing-guild --image registry.dune/spacing-guild:v2
mt deploy streamforge --image streamforge:v2 --strategy canary

mt scale <service> <count>

Scale a service to a target replica count.

mt scale spacing-guild 5
mt scale jarvis 3

mt rollback <service>

Rollback a service to the previous image version.

mt rollback jarvis

mt canary promote <service>

Promote a canary deployment to full rollout.

mt canary promote streamforge

mt canary abort <service>

Abort a canary deployment and revert to the previous image.

mt canary abort streamforge

mt nodes

List all registered cluster nodes with resources and status.

mt nodes

mt logs <service>

Stream logs from a service. Use -f to follow.

mt logs spacing-guild
mt logs spacing-guild -f

Common Workflows

Initial deployment

# Start server and agent
mentat-server --bind 0.0.0.0:4646
mentat-agent --kvm --server http://localhost:4646

# Deploy everything
mt run dune-stack.yaml

Safe production update

# Canary first
mt deploy streamforge --image streamforge:v2 --strategy canary

# Check metrics, then promote or abort
mt canary promote streamforge
# or: mt canary abort streamforge

Emergency rollback

mt rollback jarvis