CLI
- Version
- since 2.x, describes 2.52.14
- Feature flag
- none
- For
- Workspace user
cerebro is the command-line tool for workspace users. It gives login-node style access to a workspace from any machine: submit and watch scheduler jobs, start interactive sessions and get their URL, read a project's storage and quota, prepare a docker login for the container registry, and pull consumption reports. No SSH bastion is provisioned; the tool talks to the same API as the web app, authenticated with a workspace access token, and every permission decision is made by the API.
What it is for
- Working with the scheduler from your own machine or a cluster login node:
jobsandsessions. - Reading a project's shared filesystem, block volumes and storage quota:
storage. - Finding the registry host and your robot accounts to authenticate
dockerorpodman:registry. - Pulling the workspace consumption report for a window as a table, JSON or CSV:
reports. - Scripting:
--jsonprints the API's own response on read commands, and every failure exits non-zero with one line on standard error.
The CLI follows the capabilities of the deployment it talks to. A command whose capability is switched off is answered by the API with 404 feature_disabled, which the CLI prints as "this feature is not enabled on this deployment - ask your administrator to enable it".
Installation
The CLI is a single static binary for Linux on x86-64, with no runtime dependencies; no other build is published. It is licensed software, built and versioned with the platform, and there is no public download: it is provided with your deployment, on-demand by us and on-prem with the release your operators install. Copy it to a directory on your PATH.
cerebro --version
cerebro --help
Authentication and configuration
The CLI authenticates with a workspace access token, created in the web app under Workspace settings, then Access tokens; see Access tokens. The token is sent as a bearer token on every request. The token is scoped to one workspace, which becomes the CLI's default workspace.
Log in
cerebro auth login --endpoint https://<api endpoint> --token-file ./token
cerebro auth status
--endpointis required on the first login and kept afterwards; a laterauth loginwithout it reuses the stored endpoint.- Give the token with
--token-file <path>(recommended; the file content is trimmed), or paste it at the interactive prompt, which hides what you type.--token <value>is accepted but discouraged because the value lands in your shell history.--tokenand--token-filecannot be combined. - The token is checked locally for the shape of a workspace access token before anything is stored; a pasted fragment is rejected with "the token is not a valid workspace access token (not a JWT)".
- Pass
--workspace <id>toauth loginto store a default workspace other than the token's own. auth statusprints the endpoint, workspace, user id, token id, permissions and expiry read from the token, then verifies the token against the server with one read. A token that is rejected by the server makes the command exit non-zero. The token itself is never printed; it is shown as<redacted>, also with--json.
Configuration file
| What | Value |
|---|---|
| Location | ~/.config/cerebro/config.toml; if a user configuration directory is set for your session (the freedesktop convention), cerebro/config.toml inside it |
| Override | the CEREBRO_CONFIG environment variable, holding the full path of the file (for tests or several profiles) |
| Content | endpoint, token, optional default_workspace |
| Permissions on Unix | file mode 0600, directory mode 0700. The file is written to a temporary sibling created with mode 0600, then renamed over the target, and the mode is checked after every save; a save that cannot guarantee 0600 fails |
| Other operating systems | the file is written without permission guarantees and the hidden prompt is not available; use --token-file or --token |
If the file is missing, every command answers no configuration at <path> - run cerebro auth login first.
Workspace resolution
For every command the workspace is, in this order: the global --workspace <id> flag, then default_workspace from the configuration file, then the workspace the token was created for.
Commands
Global flags
| Flag | Effect |
|---|---|
--workspace <id> | Act on this workspace instead of the configured default. Accepted before or after the subcommand. |
--json | Print the raw API JSON instead of tables, on read commands. On sessions start it prints the creation response and skips the readiness wait. |
--version, --help | Version of the binary; help for any command or subcommand. |
cerebro auth
| Command | Flags | What it does |
|---|---|---|
cerebro auth login | --endpoint <url>, --token <value> or --token-file <path>, or an interactive hidden prompt; global --workspace | Stores the endpoint and the token in the configuration file |
cerebro auth status | --json | Shows who the stored token authenticates as and verifies it against the server |
cerebro jobs
Batch scheduler jobs. Routes: GET and POST /api/v1/workspaces/{workspace_id}/scheduler/jobs, GET .../scheduler/jobs/{id}, POST .../scheduler/jobs/{id}/cancel.
| Command | Flags | What it does |
|---|---|---|
cerebro jobs submit | --script <file> (required), --name <name> (default: the script's file name), --gpus <n> (default 0), --cpus <n> (default 0), --ram <GB> (default 0), --project <id> | Submits the script as a batch job and prints its id, state and external id |
cerebro jobs list | --state <state> (for example pending, running, completed, failed, cancelled) | Lists the workspace's jobs with ID, NAME, STATE, KIND, GPU, CPU, RAM_GB and SUBMITTED, plus the page position |
cerebro jobs show <id> | Shows one job; adds node, exit code, error, start and end when present | |
cerebro jobs cancel <id> | Cancels a job and prints its new state | |
cerebro jobs logs <id> | Always prints "job logs are not available via the API - they stay in the job's working directory on the cluster's shared filesystem" and exits non-zero |
cerebro sessions
Interactive (Jupyter) scheduler sessions. Routes: GET and POST /api/v1/workspaces/{workspace_id}/scheduler/sessions, POST .../scheduler/sessions/{id}/open, DELETE .../scheduler/sessions/{id}.
| Command | Flags | What it does |
|---|---|---|
cerebro sessions start | --project <id>, --gpus <n> (default 0), --cpus <n> (default 0), --ram <GB> (default 0), --no-open | Starts a session, then waits for it to become ready and prints its proxy URL. --no-open returns at once. |
cerebro sessions list | Lists sessions with JOB_ID, NAME, STATE, NODE, PORT and EXPIRES | |
cerebro sessions open <id> | Prints the proxy URL of a ready session | |
cerebro sessions stop <id> | Requests the session to stop |
cerebro storage
Per-project storage. Route: GET /api/v1/workspaces/{workspace_id}/projects/{project_id}/storage.
| Command | Flags | What it does |
|---|---|---|
cerebro storage ls | --project <id> (required) | Lists the project's share and block volumes with ID, KIND, NAME, SIZE_GB, STATUS and ATTACHED_TO |
cerebro storage quota | --project <id> (required) | Prints used and limit in GB at project and workspace level; a limit that is not set reads unlimited |
cerebro registry
Container registry access. Route: GET /api/v1/workspaces/{workspace_id}/registry.
| Command | Flags | What it does |
|---|---|---|
cerebro registry login | Prints the registry host, the workspace's registry project, the active robot accounts (NAME, ACCESS, CREATED) and the docker login template to use with a robot credential |
cerebro reports
Consumption reports. Route: GET /api/v1/workspaces/{workspace_id}/consumption; CSV is requested with the Accept: text/csv header.
| Command | Flags | What it does |
|---|---|---|
cerebro reports pull | --from <date> (required), --to <date> (required), --csv <file>, --group-by project (default) or --group-by user | Prints the report as a table with a TOTAL row (GROUP, GPU_S, CPU_S, JOB_RUNTIME_S, JOBS, INST_RUNTIME_S, INSTANCES, STORAGE_GB, REGISTRY_GB), as JSON with --json, or writes the CSV byte for byte to --csv |
Token scopes
| Commands | Scope needed on the access token |
|---|---|
auth status, jobs list, jobs show, sessions list, storage ls, storage quota, registry login, reports pull | none beyond a valid workspace access token; these reads are open to every workspace member |
jobs submit, jobs cancel, sessions start, sessions open, sessions stop | manage_scheduler_jobs: the Manage scheduler jobs checkbox when creating the token. The checkbox is shown only while the scheduler capability is switched on |
A write without the scope is answered 403 no_permission, printed as "your access token does not carry the permission this action requires".
When a capability is switched off
The CLI has no flags of its own; it follows the API. The scheduler commands need hpc_scheduler, storage needs project_storage, registry needs container_registry and reports needs consumption_reports. A command against a capability that is off gets 404 feature_disabled from the API and prints "this feature is not enabled on this deployment - ask your administrator to enable it". auth status treats that answer as proof that the token is valid, because an invalid token is rejected with 401 before any capability check, and reports "valid (scheduler feature disabled on this deployment)".
Documented behaviour
jobs logs. The platform has no job-log route. The command prints a clear message and exits non-zero; logs stay in the job's working directory on the cluster's shared filesystem, for exampleslurm-<external id>.out. See Jobs and scheduling.sessions startandsessions open. The proxy URL is minted byPOST .../sessions/{id}/open, which records the proxy mapping on the server, sosessions listdoes not fetch URLs.sessions startpolls the session state 10 times at 3-second intervals, about 30 seconds in total, and prints the URL as soon as the session is ready. If the session is still starting after the window, it prints "Still starting - runcerebro sessions open <id>oncecerebro sessions listshows it ready to get the proxy URL." and exits normally; busy clusters can take minutes. If the session ends before becoming ready, it points you tocerebro jobs show <id>.--no-openskips the wait;--jsonprints the creation response without waiting.registry login. Robot secrets are shown once, at creation, and can never be retrieved again. The CLI therefore neither creates nor prints credentials. It lists the active robot accounts, prints the registry host and the exactdocker login <host> -u '<robot full name>' -p '<robot secret>'template, and tells you where to create a robot: the web app under Workspace settings, then Container registry, orPOST /api/v1/workspaces/{workspace_id}/registry/robots. See Container registry.reports pulldates. A date-only boundYYYY-MM-DDexpands to a full inclusive day:--frombecomes00:00:00and--tobecomes23:59:59. A fullYYYY-MM-DD HH:MM:SSis passed through unchanged and validated by the server. CSV is fetched through content negotiation and written byte for byte. Window rules (UTC, maximum length) are on Reports and accounting.
Output and errors
- Read commands print fixed-width tables;
--jsonprints the API body re-indented, with nothing added or removed. - A failure prints one line on standard error, prefixed
error:, and exits with status 1. The API's reason codes are mapped to plain messages; a code the CLI does not know is printed asAPI error (<code>)so it can be looked up server-side.
| API reason code | Message |
|---|---|
feature_disabled | this feature is not enabled on this deployment - ask your administrator to enable it |
no_permission | your access token does not carry the permission this action requires |
authentication_failed_*, no_session | authentication failed - run cerebro auth login with a valid workspace access token |
authentication_error_token_expired | your access token has expired - create a new one in the web app and run cerebro auth login again |
report_window_invalid | invalid report window - --from must not be after --to and the window may span at most one year |
invalid_group_by | invalid --group-by - use project or user |
expected_date_format* | invalid date - use YYYY-MM-DD or "YYYY-MM-DD HH:MM:SS" |
project_not_found | project not found in this workspace |
scheduler_cluster_unavailable | no scheduler cluster is available - the platform has no active cluster configured |
scheduler_session_not_found | session not found in this workspace |
scheduler_session_not_ready | the session is not ready yet - wait for it to reach the ready state (cerebro sessions list) |
session_proxy_unconfigured | the platform has no session proxy configured - ask your administrator |
registry_endpoint_unavailable | the container registry backend is unavailable - try again or ask your administrator |
registry_project_missing | this workspace has no registry project yet - enable the registry in the web app first |
quota_exceeded_* | the request exceeds a resource quota, followed by the code |
workspace_permission:* | your workspace role is missing a permission, followed by the code |
| a transport failure | could not reach the API, followed by the transport error |
Numbers
| What | Value |
|---|---|
| Request timeout | 30 seconds per API request |
sessions start readiness wait | 10 polls, 3 seconds apart, about 30 seconds |
Default resources on jobs submit and sessions start | 0 GPUs, 0 CPUs, 0 GB RAM unless given |
| Configuration file permissions (Unix) | 0600 file, 0700 directory, checked after every save |
| Exit status on failure | 1 |
Limits and known behaviour
- The configuration security guarantees (0600 enforcement, hidden token prompt) are Unix-only in 2.48.6; the CLI targets cluster and login-node use. Other builds run, but write the file without permission guarantees and need
--token-fileor--token. - The token's claims are decoded locally without signature verification, for display and defaults only; every authorisation decision is made by the API on each request.
- There is no instance management in the CLI (no create, reset or terminate of virtual machines or bare metal); use the web app or the API.
- Job logs are not available through the CLI or the API.
sessions listshows node and port but no URL; usesessions open.registry logindoes not log you in; it prints the command to run with a robot credential you already hold.jobs listreturns the first page of results; paging flags are not exposed, and the page position is printed under the table.- Unknown reason codes are printed verbatim rather than explained.
- Planned: browser or device-flow login through the identity provider (OIDC with PKCE) instead of pasting a token. Not part of 2.48.6.
Related pages
- Access tokens: creating the token and choosing its permissions
- Jobs and scheduling: jobs, sessions and the scheduler
- Project storage: shares, block volumes and quotas
- Container registry: robot accounts and the pull-through caches
- Reports and accounting: the consumption report and its window rules
- API: the routes the CLI calls