susan
All setups
susan talks to the dashboard (the nexus-dashboard service; see the glossary) over its HTTP API. It submits a run (one execution of a workflow, a YAML file of steps that an AI agent follows) and attaches it to an item (a unit of work of the dashboard, on which the run posts its questions), lists runs, reads the state of one run, follows it until it ends, cancels it, totals the tokens a project used per model, and checks the stack of a folder before any commit. The dashboard passes reads, follow-ups, cancellations and stack dry runs on to the operator (the nexus-operator service that starts runs and holds their queue): susan never reaches the operator directly. It works the same way in the workstation and homelab setups.
The source is in cmd/susan/ of the repository. From a clone, go build ./cmd/susan builds the binary.
Human-readable output and error messages are written in French. JSON output uses stable English keys and codes, in snake_case (item_created, queue_position).
Synopsis
susan submit --project P --workflow W [--item I] [--input name=value]...
susan list [--project P] [--state S]
susan get RUN
susan watch RUN
susan cancel RUN
susan usage --project P [--since 24h|DATE] [--until DATE]
susan stack check --project P [--dir D]
susan solo login [--endpoint URL] [--project NAME]
susan help | --help | -h
Every command accepts --output text (default) or --output json. Options can come before or after the run identifier: susan get RUN --output json and susan get --output json RUN are equivalent.
| Command | Dashboard route |
|---|---|
submit | POST /api/runs |
list | GET /api/operator/v1/runs |
get | GET /api/operator/v1/runs/{id} |
watch | GET /api/operator/v1/runs/{id}/events |
cancel | POST /api/operator/v1/runs/{id}/cancel |
usage | GET /api/operator/v1/usage |
stack check | POST /api/operator/v1/stacks/check |
solo login | none: the command reads the token through Docker |
The /api/operator/v1/... routes form the relay: the dashboard passes them on to the operator and returns its answer as is.
Connection to the dashboard
| Key | Variable | Key of susan/config.json |
|---|---|---|
| Address of the dashboard | SUSAN_ENDPOINT | endpoint |
| Client token | SUSAN_TOKEN | token |
The client token is the token susan presents to the dashboard, as Authorization: Bearer <token> on every request. It is distinct from the API token of the operator, which only the dashboard holds.
- Each key is read from the environment first.
susan/config.json, in the user configuration directory, is read only when one of the two variables is missing. The address and the token can come from different sources. - The user configuration directory is
$XDG_CONFIG_HOME, by default~/.config, on Linux, and~/Library/Application Supporton macOS. - A missing file leaves the missing keys empty. A file that cannot be read or holds invalid JSON ends the command with
config_invalid. - When the token in use comes from the file, the file must have mode
0600. Any permission for the group or others ends the command withconfig_insecure, before any request:chmod 600 ~/.config/susan/config.jsonfixes the mode. - Without an address, or without a token, the command ends with
config_missing, before any request. - The token is never passed as a command-line argument.
The address is an https:// URL with a host name. http:// is accepted only on the loopback (localhost, 127.0.0.0/8, ::1). An address with a user name, a password, a query string or a fragment ends the command with config_invalid. A path is kept: with https://dashboard.example.test/base, requests go to https://dashboard.example.test/base/api/....
susan honours the HTTPS_PROXY, HTTP_PROXY and NO_PROXY variables. It waits 30 seconds at most for the headers of a response and sets no overall timeout, so watch can follow a long run.
Client token on the cluster
On a homelab cluster, the client token is the token key of the nexus-dashboard-client-token Secret, in the namespace of the release. nexusctl, the kubectl wrapper for the cluster, reads it:
nexusctl get secret nexus-dashboard-client-token -n <namespace of the release> -o jsonpath='{.data.token}' | base64 -d
Put the value in SUSAN_TOKEN, or in the token key of a susan/config.json with mode 0600, with the address of the dashboard Ingress in SUSAN_ENDPOINT or the endpoint key.
solo login
susan solo login [--endpoint URL] [--project NAME]
Writes the configuration of susan for the Solo edition, the dashboard and operator that Docker Compose runs on your workstation (the workstation setup). The command reads the client token in the dashboard container of the Compose project, without sending a request to the dashboard and without reading a Compose file: it works from any directory.
| Option | Default | Description |
|---|---|---|
--endpoint URL | http://127.0.0.1:8090 | Address of the dashboard written to the configuration. A port changed at install time (SUSAN_PORT) goes here. |
--project NAME | susan | Compose project of the Solo edition. The development stack of the repository (compose.yaml) is named nexus-local. |
--output text|json | text | Output format. |
docker pslooks for arunningcontainer of thedashboardservice in the Compose project.docker exec <id> cat /keys/client-tokenreads the client token in that container.- The command creates
susan/config.jsonin the user configuration directory: directory with mode0700, temporary file with mode0600in that directory, then a rename. An existingconfig.jsonis replaced as a whole.
The text output says where the configuration is written. With --output json, it reads {"login": {"endpoint": "...", "config": "<path>"}}. The token never appears in the output.
susan solo login --project nexus-local
submit
susan submit --project P --workflow W [--item I] [--input name=value]...
| Option | Required | Description |
|---|---|---|
--project P | Yes | Project of the run (a set of repositories and runs; see the glossary). |
--workflow W | Yes | Name of the workflow to run. |
--item I | No | Item to attach the run to. |
--input name=value | No | Input of the workflow. Repeat the option for each input. A name given twice ends the command with usage. |
--output text|json | No | Output format. |
Sends a single POST /api/runs to the dashboard, with the project, the workflow, the inputs, the item of --item and the name of the system user (requester, which the dashboard records as the creator of the item without authenticating it). Without --item, the dashboard finds the item of the project that carries the change of the change input, or creates one; without a change input, each run creates its own item.
The output shows the run as the operator knows it after the request, then a line Item : <item>, followed by (créé) when the dashboard has just created the item. A run of a project at its limit is in state queued, with its position in the queue. With --output json, the output reads {"run": {...}, "item": "<item>", "item_created": true|false}. The output lists input names, never their values.
susan submit --project my-app --workflow factory/ask --input change=release
list
susan list [--project P] [--state S]
| Option | Description |
|---|---|
--project P | Lists the runs of one project only. |
--state S | Lists the runs in one state: queued, starting, running, completed, failed, cancelled or lost. |
--output text|json | Output format. |
The text output has one line per run: identifier, state, project, workflow. A queued run shows (position N), a finished run its exit code. Without any run, the output is Aucun run. The JSON output is an object {"runs": [...]}, with an empty list when no run matches.
susan list --project my-app --state running
get
susan get RUN
Prints the state of one run: the same line as list, then its token usage (total, then input, output and cache when the source gives the breakdown). With --output json, prints the run object: id, project, workflow, state, queue_position, exit_code, inputs (names only), created_at, started_at, finished_at and usage (total and breakdown). Dates are in RFC 3339, in UTC.
susan get 7f3c2a --output json
watch
susan watch RUN
Follows the events of a run and prints one line per event until the run reaches a terminal state: completed, failed, cancelled or lost. A text line holds the date in UTC, the run identifier, the state, the current step when there is one, and the exit code when there is one. With --output json, each event is a JSON object on its own line (NDJSON) with the keys at, run_id, state, step and exit_code.
| Run ends as | Exit code |
|---|---|
completed | 0 |
failed, cancelled or lost | 1, with no further message: the last event already gives the state |
If the event stream breaks before a terminal state (proxy, Traefik read timeout on the cluster, restart of the dashboard), or if you interrupt the command with Ctrl+C, susan exits with code 2 and the unreachable error, or operator_unreachable when the dashboard answered with that code. The run keeps going on the operator: run susan watch RUN again to resume following it.
susan watch 7f3c2a && echo "run completed"
cancel
susan cancel RUN
Cancels a queued or running run and prints the run as the operator knows it after the request. Cancelling a run that has already ended exits with code 2 and the code run_terminal.
susan cancel 7f3c2a
usage
susan usage --project P [--since 24h|DATE] [--until DATE]
| Option | Required | Description |
|---|---|---|
--project P | Yes | Project to total. |
--since | No | Start of the period: an RFC 3339 date (2026-10-14T09:00:00Z) or a Go duration (24h, 90m) counted back from --until, or from now when --until is absent. |
--until | No | End of the period, an RFC 3339 date. |
--output text|json | No | Output format. |
Without --since and --until, susan sends no bounds and the operator applies its own period. The text output starts with the project and the period, then gives one line per model: model, number of runs, tokens. When the source gives a total only, the breakdown reads répartition inconnue in text and "unknown" in JSON; susan does not compute a breakdown of its own.
susan usage --project my-app --since 24h --output json
stack check
susan stack check --project P [--dir D]
| Option | Required | Description |
|---|---|---|
--project P | Yes | Project whose rules the operator applies. |
--dir D | No | Folder of the project, by default the current folder. |
--output text|json | No | Output format. |
Runs a dry run of the stack (the Compose services started next to the agent): through the relay of the dashboard, the operator converts it with the converter of its engine and checks the work image, without creating a run or storing anything. susan reads the runtime section of D/.awf/factory.json, then the files of runtime.files and runtime.include. A name that leaves the folder (.., absolute path) or a symbolic link to the outside exits with the code stack_config_invalid, without reading the file. An invalid local stack fails before susan reads its configuration or contacts the dashboard.
The text output starts with Stack acceptée or Stack refusée, then the line Vérifié sur le dossier local ; le run lira le commit de la forge., then one line per finding: severity, service (- for a finding that targets no service), feature and reason, separated by two spaces, then the detail in parentheses when there is one.
Stack refusée
Vérifié sur le dossier local ; le run lira le commit de la forge.
error worker privileged privileged mode is not granted to the pod; remove it from the stack
warning api ports.published the port is not published outside the pod; reach it by the name of the service, inside the pod (8080:80)
With --output json, the output is a stack_check object, {"verdict": "accepted"|"refused", "warnings": [...]}, equal to the answer of the operator, without the reminder line; warnings is [] without findings. Each finding has severity (warning or error), feature, reason, and service and detail when they apply.
| Verdict | Exit code |
|---|---|
accepted | 0 |
refused (at least one error finding) | 1 |
A rejected request (project_unknown, input_invalid, stack_invalid, stack_unsupported) exits with code 2. The message comes from susan, never from the operator: for stack_invalid without detail, it says that Compose cannot load the files of the stack and gives the docker compose -f <file> config command, with one -f per Compose file of the stack, to run in the folder to see the error.
The dry run reads the working copy, while a run reads the commit on the forge. It checks neither the agent credentials of the project nor the images of the services: an accepted stack can still fail when you request a run.
susan stack check --project my-app --dir ../my-app
Client token rotation
The client token is shared by every workstation. Anyone who reads it (file of susan, keys volume of the Solo edition, nexus-dashboard-client-token Secret) can start, read and cancel runs through the relay. To replace it on the Solo edition, in its directory (by default ~/.susan):
docker compose run --rm --no-deps keys 'rm -f /keys/client-token'deletes the file from thekeysvolume.docker compose up -druns thekeysservice again, which creates the file anew.docker compose restart dashboardmakes the dashboard read the token again.- Run
susan solo loginon every workstation.
On a homelab cluster:
- Delete the
nexus-dashboard-client-tokenSecret. - Upgrade the release with
nexushelm upgrade: the chart draws a new token. - Restart the dashboard.
- Hand out the new token, read as in Client token on the cluster.
Dashboard routes without a token
The client token protects only POST /api/runs and the relay. The routes that the web interface of the dashboard calls stay unauthenticated, POST /api/items and POST /api/items/{id}/runs included: a host that reaches the dashboard can create an item and start a run through these routes without a token. The Solo edition listens on 127.0.0.1 only; on the cluster, the dashboard Ingress is reachable from the homelab network only.
Errors
A failed command writes to standard error. In text, it writes two lines: what happened, then what to do. With --output json, it writes one JSON line, {"error": {"code": "...", "title": "...", "hint": "..."}}. --output json applies to errors as well, including a wrong command line. No error contains a stack trace, an input value or the token.
All these errors end the command with exit code 2.
code | Case |
|---|---|
usage | Unknown command or option, missing argument, missing required option, wrong --output, --since or --until value. |
config_missing | No address, or an address without a token. |
config_invalid | susan/config.json that cannot be read or is not JSON; an address that is not a valid URL; user configuration directory not found (neither XDG_CONFIG_HOME nor HOME). |
config_insecure | The token in use comes from susan/config.json, which the group or others can access. |
insecure_endpoint | http:// address outside the loopback. |
unreachable | The dashboard does not answer, sends an answer susan cannot read, or the watch stream breaks. |
operator_unreachable | The dashboard answers, but the operator behind it does not. |
unauthorized | Client token missing or rejected by the dashboard. |
operator_unauthorized | The operator rejects the API token of the dashboard. |
project_unknown | The operator does not serve this project. |
input_invalid | The workflow rejected an input. |
run_unknown | No run has this identifier. |
run_terminal | Cancellation of a run that has already ended. |
item_unknown | The item of --item does not exist. |
item_ambiguous | Several items of the project carry the change of the command; the message lists them. |
item_mismatch | The item of --item belongs to another project or carries another change than the command. |
run_not_started | The operator did not start the run, or the started run could not be attached to its item. |
solo_docker_missing | The docker command is not found. |
solo_not_running | No dashboard container of the named Compose project is running. |
solo_token_missing | The keys volume of the Solo edition has no client token. |
stack_invalid | stack check: the operator rejects the files of the stack, or Compose cannot load them. |
stack_unsupported | stack check: the operator behind the dashboard does not run stacks. |
stack_config_invalid | stack check: .awf/factory.json missing or not JSON, runtime section missing, work image without Compose files, folder or file that cannot be read, listed file missing, name or symbolic link that leaves the folder. The dashboard is not contacted. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | The command succeeded. For watch, the run ended as completed. For stack check, the stack is accepted. For get, list and cancel, whatever the state shown. help also exits with 0. |
| 1 | watch: the run ended as failed, cancelled or lost. stack check: the stack is refused. |
| 2 | Invalid input, dashboard missing or unreachable, or rejected request: every error of the previous section. |
| 3 | Reserved for a run waiting for an answer; no command returns it. |
| 4 | Reserved for a run still in progress; no command returns it. |
These values stay stable from one version to the next.
Files and environment variables
| Name | Role |
|---|---|
SUSAN_ENDPOINT | Address of the dashboard. Takes precedence over the configuration file. |
SUSAN_TOKEN | Client token of the dashboard. Takes precedence over the configuration file. |
$XDG_CONFIG_HOME/susan/config.json | Configuration file, keys endpoint and token, mode 0600. By default ~/.config/susan/config.json; susan solo login writes it. |
HTTPS_PROXY, HTTP_PROXY, NO_PROXY | HTTP proxy used to reach the dashboard. |