docs
// Tools

erectl platform ops

Nine command groups that bring the CLI to parity with the dashboard: maintenance windows, project membership, settings, usage rollups, exports, health, workspaces, chats, and scheduled tasks. Every verb resolves the active deployment; override with --context when you need to cross deployments.

Overview

Every subcommand resolves the active deployment via config use and issues bearer-authenticated requests against the InferenceRouter. No browser required.

All platform commands read the active deployment for base URL and API key (the project id is derived from base_url). Override any single invocation with --context, --base-url, or --api-key.

CommandVerbsRouter pathRequired scope
maintenance6/v1/management/maintenance/*management
project8/v1/management/project/*management
settings3/v1/settings/*management
usage4/v1/usage/*inference
exports5/v1/exports/*management
health2/v1/health/dashboardmanagement
workspaces19/v1/workspaces/*inference
chats14/v1/chats/*inference
scheduled-tasks13/v1/scheduled-tasks/*inference to read, workspace to change

Scope mismatch: calling a management-scoped route with an API key that only carries inference scope returns a 403 with error.code = scope_insufficient. Issue a management-scope key via erectl keys create --scope management before running these commands.

maintenance

// 6 verbs list schedule update cancel complete purge

Schedule, update, cancel, complete, and purge maintenance windows for the active project. Severity values: info, warning, critical.

Subcommands

bash
erectl maintenance list # List all windows erectl maintenance list --status scheduled # Filter by status erectl maintenance schedule \ # Schedule a new window --title "Patching worker-7" \ --description "Routine kernel update" \ --starts-at 2026-05-01T02:00:00Z \ --ends-at 2026-05-01T04:00:00Z \ --severity warning erectl maintenance update <id> --ends-at ... # Patch a window erectl maintenance cancel <id> # Cancel a scheduled window erectl maintenance complete <id> # Mark a window complete erectl maintenance purge <id> # Hard-delete a cancelled window

When to use each

  • cancel, window has not started yet and needs to be called off.
  • complete, window finished naturally; closes the notification period.
  • purge, window was cancelled and you want it out of the list. Requires window status to be cancelled.

project

// 7 verbs across 2 groups members: list add update remove · invitations: list resend revoke

Manage project team members and invitations. Project role alone decides who may approve a call. See approvals for deciding calls.

members

bash
erectl project members list # List members erectl project members add --email user@example.com \ # Invite a member --role member erectl project members update <id> --role owner # Change role erectl project members remove <id> # Remove a member

invitations

bash
erectl project invitations list # List open invitations erectl project invitations list --include-expired # Add expired ones to resend or revoke erectl project invitations resend <id> # Resend the email erectl project invitations revoke <id> # Revoke an unaccepted invitation

settings

// 3 verbs get update delete

Read, update, or delete project-level settings. Excludes 2FA (stays browser-only by design).

bash
erectl settings get # Show the active project's settings erectl settings update \ # Patch one or more fields --name "Platform Ops" \ --description "Owns router + inference infrastructure" erectl settings delete --confirm "Platform Ops" # Delete permanently (typed confirmation)

Typed confirmation: --confirm takes the project's authoritative name as its value. The server re-reads the name and rejects mismatched values with 400 confirmation_mismatch. Deletion is permanent: the project is queued for deletion (202 Accepted), and its data and stored files are removed and cannot be restored. Only an owner can delete a project (403 not_owner); a default project is refused with 409 default_project_cannot_delete, and a project with an active subscription or unspent purchased credits with 409 billing_active, so delete that one from Project Settings in the browser, which cancels and refunds first.

usage

// 4 verbs events logs endpoints uptime

Query usage events, request logs, per-endpoint rollups, and uptime snapshots.

bash
erectl usage events # Latest usage events erectl usage events --since 2026-04-01T00:00:00Z --until 2026-04-30T23:59:59Z erectl usage logs # Request-level logs erectl usage logs --q /v1/chat/completions --limit 100 erectl usage endpoints # Per-endpoint rollups erectl usage uptime # Uptime / SLO summary

Common options

OptionDescriptionSubcommands
--since <ts>ISO 8601 lower boundevents, logs, endpoints
--until <ts>ISO 8601 upper boundevents, logs, endpoints
--limit <n>Max rows returned (router clamps to 500)events, logs
--q <substring>Case-sensitive substring match on the request pathlogs

exports

// 5 verbs create status download cancel + types logs metrics usage executions

Create, monitor, download, and cancel data exports.

bash
erectl exports create --type logs \ --since 2026-04-01T00:00:00Z --until 2026-04-30T23:59:59Z erectl exports create --type metrics \ --since 2026-04-24T00:00:00Z --until 2026-04-30T23:59:59Z --format jsonl erectl exports create --type usage \ --since 2026-04-01T00:00:00Z --until 2026-04-30T23:59:59Z erectl exports create --type executions # The last 24 hours of tool runs erectl exports status <id> # Check export status erectl exports download <id> --output-file out.json # Download completed export erectl exports cancel <id> # Cancel a queued or running export

Bounds: logs, metrics and usage need both --since and --until, checked before anything is sent. executions takes either or neither: a missing --since means 24 hours ago and a missing --until means now. Recognised --type values are logs, metrics, usage, and executions. Valid --format values are json (default), csv, and jsonl.

Lifecycle: create returns 202 Accepted with the export job id. logs, metrics and usage start pending and are generated in the background; poll erectl exports status <id> until status=completed, then download with erectl exports download <id> --output-file <path>. The file is in the requested --format (csv, json or jsonl) and can be downloaded for 24 hours by default; status shows its Download URL while it can.

Execution exports: erectl exports create --type executions completes on the create call, so download works at once. The file is always NDJSON (application/x-ndjson), whatever --format says.

health

// 2 verbs dashboard services

Summary views onto router, Erebine Inference Microservice (EIM) and EEM health for the active project.

bash
erectl health dashboard # Overall project health erectl health services # Per-service breakdown

Both subcommands call the per-project GET /v1/health/dashboard route and render a project-filtered summary; services reformats the same payload into a per-service breakdown. Platform-wide status belongs on the public /status page and is not exposed here.

For EEM execution health (waiting calls, failures in the last hour) and the EEM and workspace topology, use erectl ops health and erectl ops topology; see Operations.

workspaces

// 19 verbs across 8 groups crud+search: list create show update delete search · declare · bindings: eems bind-eem unbind-eem pause-eem resume-eem · auto-approval: auto-approvals grant-auto-approval revoke-auto-approval · members · visibility · files: list · revalidate-intelligence

Workspace CRUD, semantic search, EEM bindings, standing auto-approval grants, membership, visibility, and file listing. Every verb except create, list and declare takes the workspace's ws_ id, which erectl workspaces list prints.

CRUD + search

bash
erectl workspaces list # List workspaces (50 by default) erectl workspaces list --kind operational # Only operational workspaces erectl workspaces list --kind chat --limit 200 # Chat workspaces, up to 200 erectl workspaces create --name "ops" \ # Create an operational workspace --kind operational --type kubernetes \ --description "Operational scratchpad" erectl workspaces show <id> # Detailed view erectl workspaces update <id> --name "ops-v2" # Rename erectl workspaces update <id> \ # Set generative routing --inference-routing-mode semantic erectl workspaces delete <id> # Delete a workspace erectl workspaces search <id> \ # Semantic search --query "kernel panic on worker-7" \ --k 20 # Top-K result count

Operational types, scope and credentials

bash
erectl workspaces create --name homelab \ # Two types, one credential each --kind operational --type kubernetes,openstack \ --scope '{"namespaces":["prod"]}' \ --credential kubernetes=homelab-kubeconfig \ --credential openstack=homelab-appcred erectl workspaces update <id> \ # Replace the scope --scope '{"namespaces":["prod","staging"]}' erectl workspaces update <id> --type linux # Replace the types erectl workspaces update <id> \ # Set one credential, keep the others --credential kubernetes=prod-kubeconfig erectl workspaces update <id> --credential openstack= # Remove one credential

These apply to operational workspaces only. --type takes a comma-separated list of workspace types (code, kubernetes, container, linux, openstack, iac); on update it replaces the stored list. Each --credential family=file binds one file in the workspace's credentials directory on the EEM host to one credential family: kubernetes (a kubeconfig), openstack (a clouds.yaml) or git_token, the families whose tools read the file. Repeat it for each family. On update it sets that family and keeps the others, and family= removes one. erectl checks both before it sends anything and names the accepted values when one is wrong. --scope takes the whole scope as JSON and replaces the stored one. An operational workspace's name is kebab-case, at most 48 characters, because an EEM declares it by that name. erectl workspaces show prints the types, scope and credentials, and erectl workspaces list marks a stored type Erebine does not describe with (unknown) so you can replace it. An EEM enforces the copy in its own workspaces.yaml, so refresh it with erectl workspaces declare after a change.

Generative routing

--inference-routing-mode records how a workspace picks the model for a generative turn. It takes semantic (route each turn through the Semantic Router), concrete (deterministic auto-selection), or default (clear the choice and follow the workspace's cohort default). erectl workspaces show always prints the row, reading default when no explicit choice has been recorded -- that is a real state, not a missing value.

Choosing semantic, or clearing back to default, also drops the workspace's pinned inference endpoint. A pin outranks the routing mode wherever the two meet, so leaving one behind would store a choice that could never take effect.

This is the recorded choice, not the resolved answer for a given turn. A chat- or workspace-level pin, the project's semantic-router switch, and the project's endpoint mix can all still outrank it. See How a turn is routed.

Intelligence reconciliation

bash
erectl workspaces update <id> \ # Toggle the periodic pass --intelligence-reconciliation true|false erectl workspaces revalidate-intelligence <id> # Queue one pass now

A pass over what the workspace has recorded -- memories, decisions, milestones, and relations. The trigger is asynchronous and rate limited to one accepted call per workspace per hour, shared with the dashboard's equivalent control. This is not the self-evolution loop, which refines prompt text on its own schedule. Both are covered in erectl evolution.

files

bash
erectl workspaces files list <id> # List workspace files

Bindings

A binding attaches an EEM to an operational workspace. EEMs are named by their UUID, which erectl eems prints.

bash
# <ws_id> is the ws_ id of prod-k8s, from erectl workspaces list --kind operational erectl workspaces eems <ws_id> # List the EEMs bound to prod-k8s erectl workspaces bind-eem <ws_id> \ # Bind an EEM 3f9c1d2b-8a04-4c1e-9b6f-0d2e7a1c5b90 erectl workspaces pause-eem <ws_id> \ # Stop dispatching, keep the binding 3f9c1d2b-8a04-4c1e-9b6f-0d2e7a1c5b90 --reason "node upgrade" erectl workspaces resume-eem <ws_id> \ # Resume dispatching 3f9c1d2b-8a04-4c1e-9b6f-0d2e7a1c5b90 erectl workspaces unbind-eem <ws_id> \ # Remove the binding 3f9c1d2b-8a04-4c1e-9b6f-0d2e7a1c5b90

The --reason on pause-eem is shown to anyone who hits the pause. workspaces eems prints each bound EEM's UUID, name, state (active or paused) and pause reason. Under -o json it prints {"data": [{"agent_id", "paused", "paused_reason"}]}, and each binding change prints the router's answer: workspace_id, agent_id and bound or paused.

Auto-approval

A standing grant auto-approves calls in one tool domain up to a risk ceiling, read or write (the default).

bash
erectl workspaces auto-approvals <ws_id> # List standing grants erectl workspaces grant-auto-approval <ws_id> \ # Auto-approve reads only --domain kubernetes --max-risk read erectl workspaces revoke-auto-approval <ws_id> \ # Revoke the grant --domain kubernetes

Under -o json, auto-approvals prints {"data": [{"domain", "max_risk", "created_at"}]}, a grant prints workspace_id, domain and max_risk, and a revoke prints workspace_id, domain and granted.

Members

bash
erectl workspaces members list <ws_id> # List select_users members erectl workspaces members add <ws_id> \ # Add by email (repeatable) --email oncall@example.com erectl workspaces members add <ws_id> --user-id <uuid> # Add by user UUID (repeatable) erectl workspaces members remove <ws_id> --user-id <uuid> # Remove one user erectl workspaces visibility get <ws_id> # Show the visibility scope erectl workspaces visibility set <ws_id> --to select_users # team, select_users, or private

Declaring workspaces for an EEM

An EEM cannot learn which workspaces it serves, so it reads them from a file on its host, and a declaration binds on the workspace NAME alone. declare writes that file from your project's own rows, which is what stops a typo binding nothing.

bash
erectl workspaces declare --workspace prod-k8s \ # Declare, or refresh --workspace erebine-repo erectl workspaces declare --workspace prod-k8s --stdout # Preview, write nothing sudo erectl workspaces declare --stdout # Preview every workspace this EEM serves erectl workspaces declare --workspace prod-k8s \ # Take the project's scope --reseed-scope erectl workspaces declare --workspace bastion \ # Name the tool domains --domains linux,shell erectl workspaces declare --workspace dev-code \ # Opt in to autonomous trust --allow-autonomous erectl workspaces declare --remove old-cluster # Stop declaring one erectl workspaces declare --workspace prod-k8s \ # Somewhere else --file /etc/erebine/workspaces.yaml

The command reports what it added, replaced, removed and left alone. With --stdout the document alone goes to standard output and that report to standard error, so --stdout > workspaces.yaml writes a valid file. A refresh keeps the scope already in the file: narrowing is local work, and a code workspace's repo_roots names paths on the EEM's own host that the project has no copy of. --reseed-scope is the explicit opt-in to take the project's copy instead.

A declaration's domains lists the tool domains the workspace admits, and an empty list admits every domain's tools. A new declaration takes the domains its types serve, and a refresh keeps the list in the file. --domains, a comma-separated list, sets the list on every --workspace named instead, and a name no EEM tool declares is refused. A workspace whose type Erebine does not describe has no domains to take, so declare refuses it, writing nothing, until --domains names them.

--allow-autonomous is this host's half of autonomous trust: it writes allow_autonomous: true on every --workspace named, and --no-allow-autonomous removes it. No call is approved without a person until the project's owner also turns autonomous trust on for the workspace (erectl approvals policies autonomous on), and irreversible calls and database calls always wait for a person. A refresh keeps the value in the file, and the project can never set it.

Without --file the document goes to the EEM's config directory on this host. Writing it rewrites the document through a YAML parser, so comments and blank lines do not survive. See EEM Configuration Files for the shape and the per-type scope reference.

On an EEM's host, run as root, declare reads your project as that EEM and is shown only the workspaces it serves (bound to it, or declared by it alone); bind the EEM to a new workspace from its EEM screen first. There, --stdout with no --workspace prints the file for every workspace the EEM serves and writes nothing; writing still takes a name. The file keeps its owner, group and mode, and a credential file a declaration names that is missing on the host is named in the notes.

A file written before workspaces took several types names one type and one credentials_ref per workspace. The EEM refuses it and logs the declare command that writes it again, naming every workspace it declares; declare writes the file fresh for the workspaces you name and lists any it drops. A name that is not kebab-case is refused before anything is written; rename the workspace first with erectl workspaces update <id> --name <name>.

Use erectl uploads for file uploads and the workspace revalidation commands. The workspaces files list command shown here provides a read-only inventory.

chats

// 15 verbs across 8 groups crud: list create show update delete move · branches · messages · memories · context · members · visibility · execution link: exec-workspace link-exec-workspace unlink-exec-workspace

Chat ecosystem commands covering CRUD, branches, messages, memories, per-chat context retrieval, membership, visibility, and the operational workspace a chat's tools execute in.

CRUD

bash
erectl chats list # List chats (scoped by the active API key) erectl chats list --limit 50 # Cap row count erectl chats list --all # Follow every page instead of the first erectl chats list --include-archived # Include archived chats erectl chats list --title triage # Title contains this text (case-insensitive) erectl chats list --workspace <name|ws_id> # Only chats in this workspace, of any kind erectl chats create --title "Triage" \ # Create a chat [--system-prompt "..."] [--model-id <model>] [--visibility team|private] erectl chats show <id> # Detailed view erectl chats update <id> --title "New title" erectl chats update <id> --model-id <model> # Change the chat's model ("" to clear) erectl chats update <id> --archive # Archive (--unarchive reverses it) erectl chats delete <id> # Delete a chat erectl chats move <chat> <workspace> # Move a chat, with its memories, files and artifacts [--drop-exec-workspace]

move takes a workspace of any kind. Into an operational workspace (owners and operators) the chat runs its tools there. Into a chat workspace it keeps running them where they run now unless --drop-exec-workspace is given. Only the chat's creator or a project owner can move it.

The list table includes an Executes in column naming the operational workspace each chat's tools execute in.

--model-id takes the name or id of a model one of the project's endpoints serves, or _semantic for the semantic router. The chat keeps the model's name, so the web, desktop and iOS chats open on that model; a value no endpoint serves is refused with model_not_found.

branches

bash
erectl chats branches list <id> # List branches erectl chats branches fork <id> \ # Fork a branch --from-message-id <msg-id> --title "hypothesis-b"

messages

bash
erectl chats messages list <id> # List messages on the default branch erectl chats messages list <id> --branch <bid> --limit 50

memories

bash
erectl chats memories list <id> # List chat memories

context

bash
erectl chats context <id>

context takes only the positional chat id and returns the semantic-search bundle used by pre-dispatch retrieval. On deployments where workspace retrieval is not enabled, the command returns an empty bundle ({"items": [], "reranker_latency_ms": 0}) so scripted callers can handle both configurations uniformly.

members and visibility

bash
erectl chats members list <id> # List select_users members erectl chats members add <id> --email oncall@example.com # Add by email (repeatable) erectl chats members remove <id> --user-id <uuid> # Remove one user erectl chats visibility get <id> # Show the visibility scope erectl chats visibility set <id> --to private # team, select_users, or private

Execution link

A chat's tools execute in the operational workspace it is linked to. These verbs take the chat's title or chat_ id and the workspace's name or ws_ id: an exact, case-insensitive match or a unique prefix. An ambiguous name is refused.

bash
erectl chats link-exec-workspace "Release triage" prod-k8s # Link the chat to prod-k8s erectl chats exec-workspace "Release triage" # Show where its tools execute erectl chats unlink-exec-workspace "Release triage" # Clear the link

link-exec-workspace --allow-members lets project members drive execution in the chat. --include-archived also matches archived chats by title. The full walkthrough is Connect a chat to a workspace.

scheduled-tasks

// 13 verbs list show tools estimate create update delete pause resume run · runs: list show cancel

A scheduled task is a research topic or a prompt that runs on a schedule, unattended, as the project. Each run is a turn in the task's own chat, and a stored background response any OpenAI SDK can read. Runs are at least an hour apart. Scheduled Tasks has the schedule rules, the cron dialect, the tools, the caps and the API.

Create and confirm

bash
erectl scheduled-tasks create --workspace Research --model qwen3-32b \ --name "Solid-state battery news" \ --topic "Solid-state battery announcements from the last week, with sources." \ --cron "0 9 * * MON" --timezone Europe/London Every Monday at 09:00, Europe/London Next: Mon 16 Nov 2026 09:00 GMT, Mon 23 Nov 2026 09:00 GMT, Mon 30 Nov 2026 09:00 GMT Tools: Web search, Fetch pages, Inspect sites, Image search, Time, Weather, Calculator Caps: 500000 tokens a run (suggested), 2500000 a month (suggested) Cost: about $<typical> a run, at most $<max>; about $<typical> a month, at most $<max> The typical figures are defaults until the task has three completed runs. Results: a new private chat in Research Schedule it? (y/N) y stask_8Hq2kL0pVt4Zr9XcN3mB7aWd active next Mon 16 Nov 2026 09:00 GMT

create, and an update that changes the schedule, tools, model or caps, show the estimate and ask first. --yes skips the question; without a terminal and without --yes nothing is sent and the command exits 1. Caps left out are the suggested caps. erectl scheduled-tasks estimate takes the same flags and prices a task without creating it.

Task flags

FlagMeaning
--name TEXTThe task's name; its chat takes the same name
--workspace <name|ws_id>The chat workspace it runs in (create and estimate)
--model SLUGThe endpoint its runs use
--topic TEXT [--depth auto|deep]A research task
--prompt TEXTA prompt task
--at YYYY-MM-DDTHH:MMRun once, at a local time
--every N --unit hours|days|weeks [--start-at ...]Run on an interval
--cron EXPRFive fields; the minute is a single number
--timezone IANAThe schedule's time zone; default this machine's
--tool NAME (repeatable), --no-toolsThe MCP tools a run may call; tools lists them
--max-tokens-per-run N, --max-tokens-per-month NThe caps
--visibility private|teamThe task's chat (create and estimate)
--notify / --no-notify, --webhook / --no-webhookHow runs are announced
--file PATHA JSON request body; flags given override its fields

Manage

bash
erectl scheduled-tasks list [--workspace <name|ws_id>] [--state active|paused|failed|completed] [--all] erectl scheduled-tasks show <stask_id> # The topic or prompt in full erectl scheduled-tasks tools [--workspace <name|ws_id>] # Tools a task may use erectl scheduled-tasks update <stask_id> --cron "0 7 * * MON-FRI" erectl scheduled-tasks pause <stask_id> # A run in progress continues erectl scheduled-tasks resume <stask_id> erectl scheduled-tasks delete <stask_id> # Its run records go; the chat keeps its turns

Runs

bash
erectl scheduled-tasks run <stask_id> --wait # Run now and wait for the outcome srun_4Rt6Yu8Io0Pa2Sd4Fg6Hj8Kl completed 205813 tokens $<cost> chat_Kp7wE2rY9tU4iO6pA1sD3fG8 erectl scheduled-tasks runs list <stask_id> [--status failed] [--all] erectl scheduled-tasks runs show <stask_id> <srun_id> erectl scheduled-tasks runs cancel <stask_id> <srun_id>

run --wait checks the run every 5 seconds and prints it once it ends, with where its result is: the task's chat, or its background response. It exits 1 when the run ends failed, cancelled or skipped, or when --wait-timeout (default 3600 seconds) passes first. runs cancel stops a queued run at once and a running one at its next model round.

Unattended tools: a run may call only read and research tools: web tools or workspace tools, not both, plus the calculator. A personal API key schedules only the tools it could call itself. On a router without scheduled tasks every verb answers Scheduled tasks are not available on this router and exits 1.

Examples

Schedule an outage window

bash
erectl maintenance schedule \ --title "Router restart for config rollout" \ --description "Rolling restart across us-east" \ --starts-at 2026-05-02T06:00:00Z \ --ends-at 2026-05-02T06:30:00Z \ --severity info \ --affected-services router,frontend

Onboard a new team member

bash
erectl project members add --email new-hire@example.com --role member erectl project invitations list # Confirm the invite is pending # ... they accept the email ... erectl project members list # Confirm they appear

Audit usage for the last 30 days

bash
SINCE=2026-04-20T00:00:00Z UNTIL=2026-05-20T00:00:00Z erectl usage endpoints --since "$SINCE" --until "$UNTIL" erectl usage uptime erectl exports create --type usage --since "$SINCE" --until "$UNTIL"

Set up a workspace + triage chat

bash
WS_ID=$(erectl workspaces create --name "incident-2026-04-14" --kind chat -o json | jq -r .id) CHAT_ID=$(erectl chats create --title "Triage" -o json | jq -r .id) erectl chats context "$CHAT_ID" erectl workspaces search "$WS_ID" --query "known degradation patterns" --k 20