service
Run and manage long-lived services in a box| Subcommand | Description |
|---|---|
list | List services for a box |
start | Start a managed service |
status | Get service status |
inspect | Get service inspect details (spec + reproducible commands) |
logs | View service logs |
restart | Restart a managed service |
publish | Publish an existing managed service |
unpublish | Unpublish a managed service |
stop | Stop a managed service |
remove | Remove a managed service: stop it, then delete its spec (the log is kept) |
list
List services for a box| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
start
Start a managed service| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
--port <PORT> | Service port to publish (omit for a portless worker service) |
--cwd <DIR> | Working directory for the service (absolute path inside the box) |
--publish <NAME> | Publish at this name under the Zomg domain |
--public | Skip deployment auth on the published URL; anyone with it can reach it |
-t, --tag <TAGS> | Tag as key=value (repeatable); use box.ui=main for the primary web UI |
--user <USER> | Run the service as this box-local user |
-e, --env <ENV> | Environment as KEY=VALUE (repeatable), exported to the service |
--secret-env <SECRET_ENV> | Secret env as KEY=VALUE (repeatable): exported like —env but the value is redacted in status/inspect hints (reveal via outputs —json) |
--ready <SPEC> | Readiness gate: tcp, tcp:PORT, or http:PATH |
--ready-status <READY_STATUS> | Expected status for an http ready check (default 200) |
--ready-timeout <READY_TIMEOUT> | Ready timeout in seconds (default 60, capped at 240) |
--stop-signal <STOP_SIGNAL> | Signal used to stop the service (default TERM) |
--stop-grace <STOP_GRACE> | Grace seconds before SIGKILL after the stop signal (default 10) |
--restart <RESTART> | Restart policy: always (default), on-failure, or never |
-p, --project <PROJECT> | Target project. |
<CMD> | Command and arguments (use -- separator) (repeatable) |
status
Get service status| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
inspect
Get service inspect details (spec + reproducible commands)| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
logs
View service logs| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-l, --lines <LINES> | Number of lines to show (most recent) Defaults to 100. |
-p, --project <PROJECT> | Target project. |
restart
Restart a managed service| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-p, --project <PROJECT> | Target project. |
publish
Publish an existing managed service| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
--as <NAME> | Name under the Zomg domain |
--port <PORT> | Override published port (default: service port) |
--public | Skip deployment auth; anyone with the URL can reach it |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
unpublish
Unpublish a managed service| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
stop
Stop a managed service| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-p, --project <PROJECT> | Target project. |
remove
Remove a managed service: stop it, then delete its spec (the log is kept)| Argument / option | Description |
|---|---|
<BOX_NAME> | Box ref. |
<NAME> | Name. |
-p, --project <PROJECT> | Target project. |