create
Create a box from a base image or by cloning another box| Argument / option | Description |
|---|---|
<NAME> | Name. |
-b, --base <BASE> | Base image to create from [default: box-base] |
-f, --fork <FORK> | Create by cloning another box filesystem (cannot combine with —base) |
-t, --tag <TAGS> | Tag as key=value (repeatable); used for filtering with 4kr list -t |
-d, --data <DATA> | Attach a persistent data volume as NAME=/mount/path[:ro|:rw] (repeatable) |
-e, --env <ENV> | Environment variable as KEY=VALUE (repeatable) |
--cpu <CPU> | CPU cores (e.g. “2” or “500m”) |
--memory <MEMORY> | Memory limit (e.g. “2G”, “512M”) |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
list
List boxes in a project| Argument / option | Description |
|---|---|
-a, --all | List boxes across all projects |
-q, --quiet | Print only box names (useful for scripting) |
-t, --tag <TAGS> | Filter by tag as key=value (repeatable, AND logic) |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
show
Show box details| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
-f, --force | Force the operation. |
update
Update a box’s environment variables, resources, or tags| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
<SETTINGS> | Settings as KEY=VALUE (env vars, or PORT/CPU/MEMORY for resources) (repeatable) |
--env <ENV> | Environment variable as KEY=VALUE (repeatable) |
-t, --tag <TAGS> | Update tags as key=value (repeatable, replaces existing tags) |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
publish
Publish a box at a public hostname| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
<SUBDOMAIN> | Subdomain to publish at (.); use @ for apex domain |
--host <HOST> | Publish at an explicit hostname |
--domain <DOMAIN> | Override default publish domain |
-f, --force | Force takeover if subdomain is already published elsewhere |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
unpublish
Remove a box publish| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
<SUBDOMAIN> | Subdomain to unpublish; use @ for apex domain |
--host <HOST> | Unpublish an explicit hostname |
--domain <DOMAIN> | Override default publish domain |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
delete
Delete one or more boxes| Argument / option | Description |
|---|---|
<BOXES> | Box names to delete (repeatable) |
-f, --force | Force delete without confirmation |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
stop
Stop a running box; its filesystem is preserved| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
-f, --force | Force the operation. |
resume
Resume a stopped box| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
-p, --project <PROJECT> | Target project. |
-j, --json | Print the JSON response. |
-f, --force | Force the operation. |
inject
Copy local credentials (SSH key, Codex auth, gitconfig) into a box| Argument / option | Description |
|---|---|
<FORK> | Box ref. |
--codex-auth <CODEX_AUTH> | Path to Codex auth.json (default: ~/.codex/auth.json) |
--codex-toml <CODEX_TOML> | Path to codex.toml (default: ~/.codex/config.toml) |
--ssh-key <SSH_KEY> | Path to SSH private key (default: ~/.ssh/id_ed25519, id_rsa, id_ecdsa) |
-p, --project <PROJECT> | Target project. |