# CLI

> Every cere command and flag in cere 0.1.7, with configuration, output, exit codes and one example each.

Source: https://docs.compute.dev.ddcdragon.com/reference/cli/

Reference lists everything: every command, class, endpoint and cluster endpoint. This page covers the `cere` CLI, version 0.1.7.

```sh
pip install cere
```

> Until `cere` is on PyPI, install it from the GitHub release instead (members of the Cerebellum-Network organization, with `gh` signed in): `gh release download cli/v0.1.7 -R Cerebellum-Network/ddc-node -p 'cere-*.whl' -D cere-wheels && pip install --no-index --find-links cere-wheels cere`

The package brings the `cere` command and the [Python SDK](https://docs.compute.dev.ddcdragon.com/reference/python-sdk/), for macOS and Linux with Python 3.9 or later. The [Quickstart](https://docs.compute.dev.ddcdragon.com/quickstart/) takes you from install to a running sandbox.

| Command | Does |
|---|---|
| [`cere login`](#cere-login) | Sign in through the browser, or save an access token, and optionally an S3 credential. |
| [`cere logout`](#cere-logout) | Forget the saved token and S3 credential. |
| [`cere whoami`](#cere-whoami) | Show the bucket and expiry of the token in use. |
| [`cere version`](#cere-version) | Print the CLI's version. |
| [`cere sandbox create`](#cere-sandbox-create) | Create a sandbox and wait until it runs. |
| [`cere sandbox list`](#cere-sandbox-list) | List the bucket's sandboxes. |
| [`cere sandbox get`](#cere-sandbox-get) | Show a sandbox. |
| [`cere sandbox exec`](#cere-sandbox-exec) | Run a command in a sandbox. |
| [`cere sandbox put`](#cere-sandbox-put) | Copy a local file into a sandbox. |
| [`cere sandbox get-file`](#cere-sandbox-get-file) | Copy a file out of a sandbox. |
| [`cere sandbox logs`](#cere-sandbox-logs) | Stream the output of a sandbox's main process. |
| [`cere sandbox usage`](#cere-sandbox-usage) | Show what a sandbox has used so far. |
| [`cere sandbox egress list`](#cere-sandbox-egress-list) | List a sandbox's egress rules. |
| [`cere sandbox egress allow`](#cere-sandbox-egress-allow) | Add egress rules to a running sandbox. |
| [`cere sandbox egress remove`](#cere-sandbox-egress-remove) | Remove a host's egress rules from a running sandbox. |
| [`cere sandbox egress set`](#cere-sandbox-egress-set) | Replace all of a running sandbox's egress rules. |
| [`cere sandbox terminate`](#cere-sandbox-terminate) | Terminate a sandbox, optionally keeping files. |
| [`cere secret set`](#cere-secret-set) | Store a secret for the hosts it may be sent to. |
| [`cere secret list`](#cere-secret-list) | List the bucket's secrets, never their values. |
| [`cere secret delete`](#cere-secret-delete) | Delete a secret. |
| [`cere egress log`](#cere-egress-log) | The egress proxy's log of the bucket's sandboxes. |
| [`cere usage`](#cere-usage) | The bucket's usage records. |
| [`cere agent run`](#cere-agent-run) | Run an agent on an input in a new sandbox. |
| [`cere agent runs`](#cere-agent-runs) | List agent runs and their results. |
| [`cere agent list`](#cere-agent-list) | List the agent definitions in the bucket. |
| [`cere agent show`](#cere-agent-show) | Print an agent definition from the bucket. |
| [`cere agent push`](#cere-agent-push) | Validate a definition and store it in the bucket. |
| [`cere agent pull`](#cere-agent-pull) | Copy a definition from the bucket to a local file. |
| [`cere agent delete`](#cere-agent-delete) | Delete a definition from the bucket. |
| [`cere completion`](#cere-completion) | Generate a shell completion script. |

`cere sb` is short for `cere sandbox`. `cere help <command>` and `cere <command> --help` print a command's help.

## Configuration

### Login file

`cere login` saves the login to `$HOME/.config/cere/config.json` (mode 0600). With `XDG_CONFIG_HOME` set, the file is `$XDG_CONFIG_HOME/cere/config.json`; with `CERE_CONFIG` set, it is that path. The Python SDK reads the same file with the same rules, so one `cere login` serves both.

### Environment variables

The environment overrides the file.

| Variable | Meaning |
|---|---|
| `CERE_TOKEN` | An access token (Developer Console > Access tokens) used instead of the saved login. |
| `CERE_API_URL` | The API's URL, instead of the saved one. Default `https://agent-gateway.compute.dev.ddcdragon.com` (devnet). |
| `CERE_CONSOLE_URL` | The Developer Console `cere login` signs in through. Default: the API URL's domain, `agent-gateway.<domain>` → `developer.<domain>`. |
| `CERE_CONFIG` | The login file's path. |
| `XDG_CONFIG_HOME` | The login file is `$XDG_CONFIG_HOME/cere/config.json` (when `CERE_CONFIG` is not set). |
| `CERE_S3_ACCESS_KEY_ID`, `CERE_S3_SECRET_ACCESS_KEY`, `CERE_S3_BUCKET` | The S3 credential and the bucket's S3 name, for agent definitions in the bucket. |
| `CERE_S3_ENDPOINT`, `CERE_S3_REGION` | The S3 gateway's URL (default `https://ddc-s3-gateway.compute.dev.ddcdragon.com`) and region. |

[Clusters and endpoints](https://docs.compute.dev.ddcdragon.com/reference/clusters/#point-the-cli-at-a-cluster) lists each cluster's URLs and how to point the CLI at one.

### Global flags

Every command takes these.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--json` | bool | off | Print JSON instead of text. |
| `-h`, `--help` | bool | off | Help for the command. |

There is no global flag for the API's URL: `cere login --api-url` saves one with the login, and `CERE_API_URL` overrides it.

## Output and exit codes

- **stdout holds the result, stderr the rest.** `cere sandbox create` prints progress on stderr and only the sandbox ID on stdout, so `ID=$(cere sandbox create ...)` captures the ID. `cere agent run` prints the run's events on stderr and the agent's answer on stdout.
- **`--json`** prints the API's objects instead of tables on `version`, `whoami`, `sandbox create`, `list`, `get`, `exec`, `usage`, `terminate` and the `egress` commands, `secret list`, `egress log`, `usage`, `agent run`, `agent runs` and `agent list`. `sandbox exec --json` waits for the command and prints its result once.
- **Listings** (`sandbox list`, `egress log`, `usage`, `agent runs`) show the newest 100 items. `--limit N` changes that, `--all` lists every one; a cut listing says so on stderr: `(the newest 3 sandboxes; there are more: raise --limit, or --all for every one)`.
- **Durations** (`--timeout`, `--idle-timeout`, `--wait-timeout`) take seconds (`600`) or a duration (`10m`, `1h30m`). **`--since`** takes a duration back from now (`30m`, `24h`; there is no `d` unit) or an RFC 3339 time (`2026-11-25T00:00:00Z`).
- **Errors** print one line on stderr, `error: <message>`. An error from the API reads `error: <status> <code>: <message>`, with the code from the API's [error codes](https://docs.compute.dev.ddcdragon.com/reference/http-api/#errors).

| Exit code | When |
|---|---|
| `0` | The command succeeded. |
| `1` | The command failed (the `error:` line says why), or `cere agent run` finished with the agent's error. |
| the command's code | `cere sandbox exec` exits with the exit code of the command it ran. |
| `124` | `cere sandbox exec`: the command did not finish within `--timeout` and was stopped. |

```console
$ cere sandbox get sb-00000000000000000000000000
error: 404 not_found: sandbox not found
$ echo $?
1
```

## Egress rule syntax

`cere sandbox create --allow`, `cere agent run --allow` and the `cere sandbox egress` commands take egress rules as one string:

```
host[:METHODS[:path_prefix[:credential]]]
```

| Part | Meaning |
|---|---|
| `host` | An exact host name, or `*.example.com` for any name under `example.com` (not `example.com` itself). |
| `METHODS` | Comma-separated HTTP methods, or `*` for every method. Default `GET`. Lower case is upper-cased. |
| `path_prefix` | Optional; starts with `/`. `/repos/org/app` admits `/repos/org/app` and `/repos/org/app/...`, not `/repos/org/app-private`; a prefix ending in `/` admits whatever starts with it. |
| `credential` | Optional; the name of a secret ([`cere secret set`](#cere-secret-set)) the egress proxy adds to the requests this rule allows. The secret must be bound to the rule's host. |

| Rule | Allows |
|---|---|
| `pypi.org` | `GET` on pypi.org |
| `pypi.org:GET:/pypi/` | `GET` under `/pypi/` on pypi.org |
| `api.github.com:GET,HEAD::github-readonly` | `GET` and `HEAD` on api.github.com, with the secret `github-readonly` added |

[Egress and credentials](https://docs.compute.dev.ddcdragon.com/concepts/egress-and-credentials/) explains how the rules apply.

## Sandboxes

`cere sandbox` creates, uses and terminates sandboxes. [Sandboxes](https://docs.compute.dev.ddcdragon.com/guides/sandboxes/) walks through them.

### cere sandbox create

```
cere sandbox create --image IMAGE [flags] [-- command...]
```

Create a gVisor sandbox and wait until it is running; print its ID. The command after `--` is the sandbox's main process and defaults to `sleep infinity`, so the sandbox waits for `exec` calls. The sandbox reaches only the hosts `--allow` lists, through the egress proxy.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--image` | string | required | Image from a public registry. |
| `--cpu` | float | `1` | CPUs. |
| `--memory` | int | `1024` | Memory in MiB, at least 128. |
| `--pids` | int | `2048` | Process limit. |
| `--timeout` | string | `600` | Seconds (or a duration) until the sandbox is terminated. |
| `--idle-timeout` | string | off | Terminate after this long with no exec or file call. |
| `--allow` | string, repeatable | none | Egress rule, `host[:METHODS[:path_prefix[:credential]]]` ([syntax](#egress-rule-syntax)). |
| `--env` | string, repeatable | none | Environment variable `K=V`, not secret. |
| `--label` | string, repeatable | none | Label `key=value`. |
| `--workdir` | string | `/workspace` | Working directory. |
| `-q`, `--quiet` | bool | off | Print only the sandbox ID. |
| `--wait-timeout` | string | `10m` | How long to wait for the sandbox to start, image pull included. |

```console
$ cere sandbox create --image python:3.12-slim --timeout 600 --label app=docs
sb-01m89qnajrgns835647xg42nwq placed on node 9f97fd7fc247; starting python:3.12-slim ...
running on node 9f97fd7fc247 (started in 192 ms)
sb-01m89qnajrgns835647xg42nwq
```

`-q` prints only the ID, for scripts:

```console
$ ID=$(cere sandbox create --image python:3.12-slim --timeout 600 --allow pypi.org:GET:/simple/ -q)
$ echo $ID
sb-01m89qp3rg2sya3bgs0mn5khfp
```

### cere sandbox list

```
cere sandbox list [flags]
```

List the bucket's sandboxes, newest first.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--status` | string | all | Only this status: `starting`, `running`, `terminated`, `failed` or `unknown`. |
| `--label` | string, repeatable | none | Only sandboxes with this label `key=value`; all must match. |
| `--limit` | int | `100` | At most this many, newest first. |
| `--all` | bool | off | Every one, however many. |

```console
$ cere sandbox list --label app=docs
ID                             STATUS   IMAGE             NODE          CREATED  CPU-S  EXIT  LABELS
sb-01m89qnajrgns835647xg42nwq  running  python:3.12-slim  9f97fd7fc247  1s ago   0.00   -     app=docs
```

### cere sandbox get

```
cere sandbox get ID
```

Show a sandbox: its status, resources, egress rules, labels, times, exit reason, retained files, and its usage, live while it runs. No flags.

```console
$ cere sandbox get $ID
id         sb-01m89qnajrgns835647xg42nwq
status     running
bucket     <bucket-id>
node       9f97fd7fc247038ffa7944d5fa8fbd23e85c9002360a1bfcda58683faffec8cc
image      python:3.12-slim
command    sleep infinity
resources  cpu 1, memory 1024 MiB, pids 2048
timeout    600s (idle 0s)
egress     -
env keys   -
labels     app=docs
created    2026-11-25T16:12:15Z
started    2026-11-25T16:12:16Z
startup    192 ms
ended      -
exit       -
retained   -
billed     1.0 vCPU × 10.2 s = 10.2 CPU-s (measured 2.3), 1.0 GiB × 10.2 s = 10.2 GiB-s (measured 0.2)
usage      wall 10.2s, cpu 2.29s, memory peak 71 MiB, 0.22 GiB-s, net out 6.1 KiB in 7.8 KiB, disk peak 8.6 MiB
```

### cere sandbox exec

```
cere sandbox exec ID [flags] -- command...
```

Run a command in a sandbox, streaming its stdout and stderr; exit with its exit code.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--timeout` | string | `600` | Seconds (or a duration) before the command is stopped; at most 3600 (`1h`). |
| `--workdir` | string | the sandbox's | Working directory. |
| `--env` | string, repeatable | none | Environment variable `K=V` for this command. |
| `-i`, `--stdin` | bool | off | Send this program's stdin to the command. |

```console
$ cere sandbox exec $ID -- python -c "print('hello from a sandbox')"
hello from a sandbox
$ cere sandbox exec $ID -- sh -c 'echo to stderr >&2; exit 3'; echo $?
to stderr
3
$ echo 'print(6*7)' | cere sandbox exec $ID --stdin -- python -
42
$ cere sandbox exec $ID --timeout 2 -- sleep 10; echo $?
cere: the command did not finish within 2 s and was stopped
124
```

### cere sandbox put

```
cere sandbox put ID LOCAL REMOTE
```

Copy a local file into a sandbox; `-` as `LOCAL` reads stdin. Parent directories are created; a file is at most 16 MiB. No flags.

```console
$ echo "hello" > notes.txt
$ cere sandbox put $ID notes.txt /workspace/notes.txt
wrote notes.txt (6 B) to sb-01m89qnajrgns835647xg42nwq:/workspace/notes.txt
```

### cere sandbox get-file

```
cere sandbox get-file ID REMOTE [LOCAL]
```

Copy a file out of a sandbox, to stdout without `LOCAL`. After the sandbox has ended, only files kept with [`terminate --retain`](#cere-sandbox-terminate) are readable. No flags.

```console
$ cere sandbox get-file $ID /workspace/notes.txt
hello
$ cere sandbox get-file $ID /workspace/notes.txt copy.txt
wrote sb-01m89qnajrgns835647xg42nwq:/workspace/notes.txt (6 B) to copy.txt
```

### cere sandbox logs

```
cere sandbox logs ID
```

Stream the output of the sandbox's main process (the command given to `create`) until it ends. No flags.

```console
$ ID=$(cere sandbox create --image python:3.12-slim --timeout 120 -q -- sh -c 'echo ready; sleep 3; echo done')
$ cere sandbox logs $ID
ready
done
```

### cere sandbox usage

```
cere sandbox usage ID
```

Show what a sandbox has used so far: billed CPU and memory, and measured wall time, CPU, memory, network, disk and GPU. No flags. [Resources and billing](https://docs.compute.dev.ddcdragon.com/concepts/resources-and-billing/) explains billed and measured.

```console
$ cere sandbox usage $ID
billed cpu     1.0 vCPU × 9.9 s = 9.9 CPU-s (measured 2.3)
billed memory  1.0 GiB × 9.9 s = 9.9 GiB-s (measured 0.2)
wall           9.9 s
cpu            2.286 CPU-s
memory         peak 71 MiB, 0.207 GiB-s
network        out 6.1 KiB, in 7.8 KiB
disk           peak 8.6 MiB
gpu            0.0 s
```

### cere sandbox egress list

```
cere sandbox egress list ID
```

List a sandbox's egress rules. No flags.

```console
$ cere sandbox egress list $ID
HOST                    METHODS  PATH      CREDENTIAL
files.pythonhosted.org  GET      -         -
pypi.org                GET      /simple/  -
```

### cere sandbox egress allow

```
cere sandbox egress allow ID RULE...
```

Add egress rules to a running sandbox. A rule for the same host, path prefix and credential as one the sandbox has adds its methods to that rule; any other rule is put first. The egress proxy applies the change from the sandbox's next request, also inside a connection already open, and writes it to the [egress log](#cere-egress-log). No flags.

The sandbox from the `-q` example above may call `pypi.org` under `/simple/`; `pip` also needs `files.pythonhosted.org`:

```console
$ cere sandbox egress allow $ID files.pythonhosted.org
HOST                    METHODS  PATH      CREDENTIAL
files.pythonhosted.org  GET      -         -
pypi.org                GET      /simple/  -
The rules apply from the sandbox's next request.
$ cere sandbox exec $ID -- pip download --no-deps -q -d /tmp/pkgs six
...
$ cere sandbox exec $ID -- ls /tmp/pkgs
six-1.17.0-py2.py3-none-any.whl
$ cere sandbox egress allow $ID pypi.org:HEAD:/simple/
HOST                    METHODS   PATH      CREDENTIAL
files.pythonhosted.org  GET       -         -
pypi.org                GET,HEAD  /simple/  -
The rules apply from the sandbox's next request.
```

### cere sandbox egress remove

```
cere sandbox egress remove ID HOST [flags]
```

Remove a host's egress rules from a running sandbox, or only some methods of them.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--method` | string, repeatable | all | Remove only this method from the host's rules; a rule left with none goes. |

```console
$ cere sandbox egress remove $ID pypi.org --method HEAD
HOST                    METHODS  PATH      CREDENTIAL
files.pythonhosted.org  GET      -         -
pypi.org                GET      /simple/  -
The rules apply from the sandbox's next request.
$ cere sandbox egress remove $ID files.pythonhosted.org
HOST      METHODS  PATH      CREDENTIAL
pypi.org  GET      /simple/  -
The rules apply from the sandbox's next request.
```

### cere sandbox egress set

```
cere sandbox egress set ID (RULE... | --none)
```

Replace all of a running sandbox's egress rules.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--none` | bool | off | Remove every rule: the sandbox reaches no host. |

```console
$ cere sandbox egress set $ID --none
HOST  METHODS  PATH  CREDENTIAL
No rules: the sandbox reaches no host.
The rules apply from the sandbox's next request.
$ cere sandbox exec $ID -- pip download --no-deps -q -d /tmp/pkgs2 six
...
ERROR: No matching distribution found for six
```

:::caution
`allow` and `remove` read the rules and then replace them, so a change made elsewhere between the two calls is overwritten.
:::

### cere sandbox terminate

```
cere sandbox terminate ID [flags]
```

Terminate a sandbox and print its final usage. Terminating an ended sandbox changes nothing.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--retain` | string, repeatable | none | Files to keep readable after termination, comma-separated (each up to 16 MiB). |
| `--reason` | string | none | Recorded as `terminated by API: <reason>` (at most 120 characters). |

```console
$ cere sandbox terminate $ID --retain /workspace/notes.txt
sb-01m89qnajrgns835647xg42nwq terminated: terminated by API
billed 1.0 vCPU × 10.6 s = 10.6 CPU-s (measured 2.3), 1.0 GiB × 10.6 s = 10.6 GiB-s (measured 0.2)
usage: wall 10.6s, cpu 2.32s, memory peak 71 MiB, 0.23 GiB-s, net out 6.1 KiB in 7.8 KiB, disk peak 8.6 MiB
retained: /workspace/notes.txt
$ cere sandbox get-file $ID /workspace/notes.txt
hello
```

## Secrets

`cere secret` stores the credentials the egress proxy adds to sandboxes' requests. Secrets are encrypted, scoped to the token's bucket and write-only: a value goes in and is never printed. An egress rule names a secret, and the proxy adds it as a header to the requests that rule allows, only on the hosts the secret is bound to. [Egress and secrets](https://docs.compute.dev.ddcdragon.com/guides/egress-and-secrets/) walks through them.

### cere secret set

```
cere secret set NAME (--from-login | --header HEADER --host HOST... (--value-stdin | --value-file F | --bearer-stdin | --bearer-file F))
```

Store, or replace, a secret. The value is read from stdin, a file or your login, never from an argument. `NAME` is lower-case letters, digits and `-`, at most 63 characters; the value is at most 8 KiB. Storing again replaces the value and the hosts together.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--header` | string | none | The request header the proxy sets, for example `Authorization`. |
| `--host` | string, repeatable | none | A host the value may be sent to: exact, or `*.example.com` for one more label (`a.example.com`, not `a.b.example.com`). A sandbox rule that names the secret for any other host is refused when the sandbox is created. |
| `--value-stdin` | bool | off | Read the header value from stdin. |
| `--value-file` | string | none | Read the header value from a file. |
| `--bearer-stdin` | bool | off | Read a token from stdin; the value is `Bearer <token>`. |
| `--bearer-file` | string | none | Read a token from a file; the value is `Bearer <token>`. |
| `--from-login` | bool | off | Store the token you are logged in with, as `Authorization: Bearer <token>`, bound to this cluster's inference gateway (`inference-gateway.<domain>`; `--host` overrides it). |

Give exactly one value source. `--from-login` stores the model key the example agents use (`cere secret set ddc-inference --from-login`); it stops working when the login expires, so run it again after the next `cere login`. [Inference API](https://docs.compute.dev.ddcdragon.com/guides/inference/) explains the key.

```console
$ openssl rand -hex 16 | cere secret set docs-ref-example --header X-Api-Key --host api.example.com --value-stdin
Stored secret docs-ref-example (header X-Api-Key, 32 bytes), sent only to api.example.com. Name it in an egress rule: --allow api.example.com:<METHODS>:<path>:docs-ref-example
```

### cere secret list

```
cere secret list
```

List the bucket's secrets: names, headers and hosts, never values. No flags.

```console
$ cere secret list
NAME              TYPE    HEADER         HOSTS                                        UPDATED
ddc-inference     header  Authorization  inference-gateway.compute.dev.ddcdragon.com  8h59m ago
docs-ref-example  header  X-Api-Key      api.example.com                              0s ago
github-readonly   header  Authorization  api.github.com                               9h22m ago
```

### cere secret delete

```
cere secret delete NAME
```

Delete a secret. A running sandbox whose rules name it gets `502` on that host. No flags.

```console
$ cere secret delete docs-ref-example
Deleted secret docs-ref-example.
```

## Egress log

### cere egress log

```
cere egress log [flags]
```

Every request the bucket's sandboxes made through the egress proxy, allowed or refused, and every change of their rules, newest first.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--sandbox` | string | all | Only this sandbox. |
| `--since` | string | none | Only entries after this: a duration back, like `1h`, or an RFC 3339 time. |
| `--decision` | string | all | Only this decision: `allowed`, `denied`, `error`, or `policy` (changes of a sandbox's rules). |
| `--denied` | bool | off | Only refused requests (the same as `--decision denied`). |
| `--limit` | int | `100` | At most this many, newest first. |
| `--all` | bool | off | Every one, however many. |

Here a sandbox allowed `GET` under `/pypi/` on pypi.org ran `pip`, which asks under `/simple/`:

```console
$ cere egress log --sandbox $ID
TIME                  SANDBOX                        DECISION  METHOD  HOST                    PATH          STATUS  CREDENTIAL  DOWN  MS  REASON
2026-11-25T16:12:25Z  sb-01m89qnajrgns835647xg42nwq  policy    GET     pypi.org                /pypi/        -       -           0 B   -   rule removed
2026-11-25T16:12:25Z  sb-01m89qnajrgns835647xg42nwq  policy    GET     files.pythonhosted.org  -             -       -           0 B   -   rule removed
2026-11-25T16:12:24Z  sb-01m89qnajrgns835647xg42nwq  denied    GET     pypi.org                /simple/pip/  403     -           0 B   -   GET pypi.org/simple/pip/ is not allowed for this sandbox
2026-11-25T16:12:24Z  sb-01m89qnajrgns835647xg42nwq  denied    GET     pypi.org                /simple/six/  403     -           0 B   -   GET pypi.org/simple/six/ is not allowed for this sandbox
2026-11-25T16:12:21Z  sb-01m89qnajrgns835647xg42nwq  policy    GET     files.pythonhosted.org  -             -       -           0 B   -   rule added
2026-11-25T16:12:21Z  sb-01m89qnajrgns835647xg42nwq  policy    GET     pypi.org                /pypi/        -       -           0 B   -   rule added
```

## Usage records

### cere usage

```
cere usage [flags]
```

The bucket's usage records, newest first: one per sandbox per minute, plus a final one, each signed by the node that ran the sandbox. The last line sums what the listed records billed and measured.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--sandbox` | string | all | Only this sandbox. |
| `--since` | string | none | Only records after this: a duration back, like `1h`, or an RFC 3339 time. |
| `--limit` | int | `100` | At most this many, newest first. |
| `--all` | bool | off | Every record, however many (the total then covers them all). |

On the `reserved` basis a sandbox pays for what it reserved for as long as it runs: billed CPU-s = max(vCPU × wall seconds, measured CPU-s), billed GiB-s = max(GiB × wall seconds, measured GiB-s). `MEASURED` is what the node measured, for right-sizing. `CPU UNITS` and `RAM UNITS` are the billed amounts × 10<sup>11</sup>; `TCA` is the record's one-minute period and `DAC` whether the node has delivered the record. [Usage](https://docs.compute.dev.ddcdragon.com/concepts/usage/) explains the fields.

```console
$ cere usage --sandbox $ID
PERIOD END            SANDBOX                        FINAL  BASIS     RESERVED           BILLED CPU-S  MEASURED CPU-S  BILLED GIB-S  MEASURED GIB-S  MEM PEAK  NET OUT  CPU UNITS      RAM UNITS      TCA       DAC     EXIT
2026-11-25T16:12:26Z  sb-01m89qnajrgns835647xg42nwq  final  reserved  1.0 vCPU, 1.0 GiB  10.611        2.323           10.611        0.229           71 MiB    6.1 KiB  1061083000000  1061083000000  29927052  pushed  terminated by API

1 records: billed 10.611 CPU-s, 10.611 GiB-s (measured 2.323 CPU-s, 0.229 GiB-s)
```

## Agents

An agent is a definition (`cere.agent/v1` JSON) plus an image. A run is a sandbox labelled `cere.kind=agent-run` that the CLI drives: it writes the definition and the input, runs the harness, reads `/workspace/output.json`, and terminates the sandbox, keeping the output and the transcript. [Agents](https://docs.compute.dev.ddcdragon.com/guides/agents/) walks through definitions and runs.

Definitions live in local files, or in your bucket at `cere/agents/<name>.json`. `agent run -f FILE` needs no bucket; `agent list`, `show`, `push`, `pull`, `delete` and `agent run NAME` need an S3 credential from Developer Console > Access tokens, saved with [`cere login --s3-access-key-id`](#cere-login). Without one they stop with:

```console
$ cere agent list
error: no S3 credential for the bucket: create one in Developer Console -> Access tokens, then `cere login --s3-access-key-id <id> --s3-bucket <name> --s3-secret-stdin`
```

A run also needs the secrets its definition names (the model's credential, and any egress rule's): [`cere secret list`](#cere-secret-list) shows what the bucket holds.

### cere agent run

```
cere agent run (NAME | -f FILE) INPUT [flags]
```

Run an agent on an input in a new sandbox, streaming what it does on stderr and printing its answer on stdout. `INPUT` is the input text, or `-` to read it from stdin. The command exits `1` when the agent fails.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `-f`, `--definition` | string | none | Run the definition in this local file instead of one from the bucket. |
| `--file` | string, repeatable | none | Put a local file in the sandbox before the run, `local=remote`. |
| `--allow` | string, repeatable | none | An extra egress rule for this run, `host[:METHODS[:path_prefix[:credential]]]`. |
| `--label` | string, repeatable | none | An extra label `key=value`. The `cere.` prefix is reserved. |
| `--keep` | bool | off | Leave the sandbox running after the run. |

`research.json` is one of the example definitions; [Agents](https://docs.compute.dev.ddcdragon.com/guides/agents/#the-example-agents) says where to get them. The run's events go to stderr, the answer to stdout:

```console
$ cere agent run -f research.json "In two sentences: how does gVisor isolate containers? Cite https://gvisor.dev/docs/"
agent research (claude-code, cerebellumnetwork/ddc-agent-runner:0.1.1)
  . sandbox sb-01m89qz8ac0sr2f4mqrg3adrvn placed on node 30a2eb37a537; starting cerebellumnetwork/ddc-agent-runner:0.1.1
  sandbox sb-01m89qz8ac0sr2f4mqrg3adrvn on node 30a2eb37a537, started in 186 ms
  . running ddc-agent-run /workspace/agent.json /workspace/input.txt
  ...
  > WebFetch https://gvisor.dev/docs/
  < ok (2076 chars) ## gVisor's Isolation Model
  ...
  . harness finished in 35.5s

gVisor runs each container inside a sandbox backed by a Sentry, a userspace "kernel" written in Go that intercepts and services application system calls itself rather than passing them through to the host kernel, ... (gvisor.dev/docs/, read 2026-11-25). ...

run 01m89qz7v8amxaamm6v5wd2m37, sandbox sb-01m89qz8ac0sr2f4mqrg3adrvn: 2 turns, 1 tool call, 38.8 s, model tokens in 5728 out 248
sandbox terminated: terminated by API: agent run succeeded; usage: wall 38.4s, cpu 4.66s, memory peak 239 MiB, 7.84 GiB-s, net out 85.1 KiB in 192.8 KiB, disk peak 0.1 MiB
billed 1.0 vCPU × 38.4 s = 38.4 CPU-s (measured 4.7), 1.0 GiB × 38.4 s = 38.4 GiB-s (measured 7.8)
retained: /workspace/agent.json, /workspace/input.txt, /workspace/output.json, /workspace/output.md, /workspace/transcript.jsonl (cere sandbox get-file sb-01m89qz8ac0sr2f4mqrg3adrvn <path>)
error: null
```

### cere agent runs

```
cere agent runs [flags]
```

List agent runs, newest first, with each run's result: `succeeded`, `failed` (with the agent's error), `stopped`, `running`, `ended` (the sandbox ended without its client recording a result) or `unknown`. A client records the result when it terminates the run's sandbox, so the CLI, the SDK and the Developer Console show the same result for a run any of them started.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--agent` | string | all | Only runs of this agent. |
| `--status` | string | all | Only runs whose sandbox has this status (`running`, `terminated`, `failed`). |
| `--limit` | int | `100` | At most this many, newest first. |
| `--all` | bool | off | Every one, however many. |

```console
$ cere agent runs --limit 3
RUN                         AGENT     HARNESS      RESULT     STARTED    WALL  CPU-S  SANDBOX                        DETAIL
01m88rw0ny41byz10p1k0cat3e  research  claude-code  succeeded  5h02m ago  125s  10.12  sb-01m88rw1amadav638z59jzgmfv
01m88qjpk8dqz129xpr1ejazt3  sre       claude-code  succeeded  5h25m ago  54s   9.45   sb-01m88qjq6jnkxe7zjm340wv5pm
01m88h6ntpqtc7b110z2h2nv0g  sre       claude-code  succeeded  7h16m ago  153s  33.29  sb-01m88h6p9tyv6ts6hm9v0we6xy
(the newest 3 runs; there are more: raise --limit, or --all for every one)
```

### cere agent list

```
cere agent list
```

List the agent definitions in the bucket: name, harness, image and description. Needs an S3 credential. No flags.

```sh
cere agent list
```

### cere agent show

```
cere agent show NAME
```

Print an agent definition from the bucket. Needs an S3 credential. No flags.

```sh
cere agent show research
```

### cere agent push

```
cere agent push -f FILE
```

Validate a definition and store it in the bucket as `cere/agents/<name>.json`, where `<name>` is the definition's `name`. Needs an S3 credential.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `-f`, `--file` | string | required | The definition (`cere.agent/v1` JSON). |

```sh
cere agent push -f research.json
```

### cere agent pull

```
cere agent pull NAME [flags]
```

Copy a definition from the bucket to a local file. Needs an S3 credential.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `-o`, `--output` | string | `NAME.json` | The file to write (`-` for stdout). |

```sh
cere agent pull research -o research.json
```

### cere agent delete

```
cere agent delete NAME
```

Delete a definition from the bucket; its past runs stay. Needs an S3 credential. No flags.

```sh
cere agent delete research
```

## Sign-in and version

### cere login

```
cere login [flags]
```

Sign in and save the login to the [login file](#login-file). By default `cere login` opens the Developer Console in your browser, where you approve the sign-in with your wallet for 1, 7 or 30 days. With `--no-browser` it prints a URL to open on any computer and reads the code that page shows; the same prompt also takes an access token. With `--token-stdin` it reads an access token (Developer Console > Access tokens), for CI. `cere login` can also save an S3 credential for agent definitions in the bucket. Only the CLI signs in; the SDK reads what it saves. [Signing in](https://docs.compute.dev.ddcdragon.com/guides/signing-in/) walks through each way.

| Flag | Type | Default | Meaning |
|---|---|---|---|
| `--api-url` | string | `https://agent-gateway.compute.dev.ddcdragon.com` | The API's URL, saved with the login. |
| `--console-url` | string | `CERE_CONSOLE_URL`, else the API URL's domain (`agent-gateway.<domain>` → `developer.<domain>`) | Developer Console to sign in through. |
| `--days` | int | `7` | How long the sign-in lasts, in days: 1, 7 or 30 (you can change it on the page). |
| `--no-browser` | bool | off | Print the sign-in URL to open on any computer, and paste the code it shows. |
| `--token-stdin` | bool | off | Read an access token from stdin. |
| `--s3-access-key-id` | string | none | S3 access key ID, for agent definitions in the bucket. |
| `--s3-secret-stdin` | bool | off | Read the S3 secret access key from stdin. |
| `--s3-bucket` | string | none | The bucket's S3 name, for agent definitions. |
| `--s3-endpoint` | string | `https://ddc-s3-gateway.compute.dev.ddcdragon.com` | S3 gateway URL. |
| `--s3-region` | string | asked from the gateway | S3 region. |

`--token-stdin` and `--s3-secret-stdin` both read stdin: save the token and the S3 credential with two `cere login` calls. A login saved while `CERE_TOKEN` is set is not used until you unset it; the command says so.

```sh
cere login                                   # in the browser
cere login --no-browser                      # on a machine without one
cere login --token-stdin < token.txt         # an access token, for CI
cere login --s3-access-key-id <id> --s3-bucket <bucket name> --s3-secret-stdin < secret-file
```

### cere logout

```
cere logout
```

Forget the saved token and S3 credential. `CERE_TOKEN`, if set, still applies; the command says so. No flags.

```console
$ cere logout
Logged out; /home/dev/.config/cere/config.json holds no credential.
```

### cere whoami

```
cere whoami
```

Show the API URL, bucket, owner, operations and expiry of the token in use, where it came from, and whether an S3 credential is saved. The token is decoded locally; the API checks it on each call. No flags.

```console
$ cere whoami
api         https://agent-gateway.compute.dev.ddcdragon.com
bucket      <bucket-id>
owner       <owner-key>
operations  COMPUTE
expires     2026-12-24T21:57:01Z (in 29d09h)
levels      1
token from  /home/dev/.config/cere/config.json
s3          not configured (agent definitions from local files only)
```

### cere version

```
cere version
```

Print the CLI's version and commit. No flags.

```console
$ cere version
cere v0.1.7 (commit f13e52523b31f303b45b8f7287999e153ac1a32f)
```

## Shell completion

### cere completion

```
cere completion (bash | zsh | fish | powershell)
```

Print the completion script for a shell; `cere completion <shell> --help` says how to load it for every new session. To load it in the current zsh session:

```sh
source <(cere completion zsh)
```

## Related

- [Next: Python SDK](https://docs.compute.dev.ddcdragon.com/reference/python-sdk/)
- [Quickstart](https://docs.compute.dev.ddcdragon.com/quickstart/)
- [Sandboxes guide](https://docs.compute.dev.ddcdragon.com/guides/sandboxes/)
- [Egress and secrets](https://docs.compute.dev.ddcdragon.com/guides/egress-and-secrets/)
- [Agents guide](https://docs.compute.dev.ddcdragon.com/guides/agents/)
