# Current CLI reference

`current` is the command line interface for the Current API. Commands are
generated from the API's OpenAPI schema, so every API operation is available.

## Setup

```bash
pip install current-cli
current login you@example.com                          # magic-link sign in, stores the token
current config set default_workspace <workspace-uuid>  # used when --workspace is omitted
```

The CLI speaks to `https://api.current.orinlabs.ai` by default. For another
server (for example local development), set
`current config set base_url http://localhost:8000`.

The auth token is stored in `~/.config/current-cli/config.json` and sent as
`Authorization: Token <token>`. `CURRENT_API_URL` overrides the base URL.

## Conventions

- Path parameters are positional arguments, shown below as `<name>`.
- Query parameters are `--options`.
- Request bodies are JSON, passed with `--data`: inline (`--data '{"name": "x"}'`),
  from a file (`--data @body.json`), or from stdin (`--data -`).
- Responses print as JSON on stdout. API errors print to stderr and exit 1.
- `--schema <path-or-url>` (or `CURRENT_SCHEMA`) rebuilds the commands from a
  different schema, for example `<base-url>/api/schema/` for a live server.
- Every command supports `--help`.

## Commands

### current accounts auth logout create

Invalidate the current user's auth token.

POST /api/accounts/auth/logout/

### current accounts auth magic-link create

Request a magic sign-in link. Creates the user if they don't exist.

POST /api/accounts/auth/magic-link/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current accounts auth me retrieve

Current user with workspace memberships.

GET /api/accounts/auth/me/

### current accounts auth verify create

Exchange a magic-link token for an auth token.

POST /api/accounts/auth/verify/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current config get <key>

Print one configuration value.

### current config list

Show all configuration values.

### current config set <key> <value>

Set one configuration value.

### current config unset <key>

Remove one configuration value.

### current docs

Print a markdown reference of every command, for LLMs and humans.

### current inbox retrieve

Fetch (and lazily provision) the workspace's forwarding inbox.

GET /api/inbox/inbox/

Options:
- `--workspace` - Workspace UUID

### current integrations connections authorize create

Start an OAuth flow: returns the provider authorize URL to redirect to.

POST /api/integrations/connections/authorize/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current integrations connections channels list <id>

List public Slack channels — verifies a Slack connection works.

GET /api/integrations/connections/{id}/channels/

### current integrations connections destroy <id>

Workspace OAuth connections. Created only via the OAuth callback;
any member can list, only admins can authorize or disconnect.

DELETE /api/integrations/connections/{id}/

### current integrations connections list

Workspace OAuth connections. Created only via the OAuth callback;
any member can list, only admins can authorize or disconnect.

GET /api/integrations/connections/

Options:
- `--workspace` - Filter by workspace UUID

### current integrations connections providers list

All known providers and whether OAuth credentials are configured.

GET /api/integrations/connections/providers/

### current login <email>

Sign in with a magic link and store the auth token.

### current logout

Invalidate the auth token on the server and forget it locally.

### current observations create

The workspace observation stream. List/retrieve for members; create is
quick-capture (source=user). No update or delete — content is immutable
and annotations belong to agents.

POST /api/observations/observations/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current observations list

The workspace observation stream. List/retrieve for members; create is
quick-capture (source=user). No update or delete — content is immutable
and annotations belong to agents.

GET /api/observations/observations/

Options:
- `--ids` - Comma-separated observation UUIDs
- `--status` - Filter by status (pending/ingested)
- `--workspace` - Filter by workspace UUID

### current observations retrieve <id>

The workspace observation stream. List/retrieve for members; create is
quick-capture (source=user). No update or delete — content is immutable
and annotations belong to agents.

GET /api/observations/observations/{id}/

### current projects create

Projects across the caller's workspaces. Any member can create and edit.

POST /api/projects/projects/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current projects destroy <id>

Projects across the caller's workspaces. Any member can create and edit.

DELETE /api/projects/projects/{id}/

### current projects feed retrieve <id>

The project's field-value write history, newest first.

GET /api/projects/projects/{id}/feed/

Options:
- `--cursor` - Keyset cursor from a previous page
- `--limit` - Max writes per page (default 25)

### current projects field-definitions create

Workspace-level custom field definitions. Only admins can mutate.

POST /api/projects/field-definitions/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current projects field-definitions destroy <id>

Workspace-level custom field definitions. Only admins can mutate.

DELETE /api/projects/field-definitions/{id}/

### current projects field-definitions list

Workspace-level custom field definitions. Only admins can mutate.

GET /api/projects/field-definitions/

Options:
- `--workspace` - Filter by workspace UUID

### current projects field-definitions partial-update <id>

Workspace-level custom field definitions. Only admins can mutate.

PATCH /api/projects/field-definitions/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current projects field-definitions retrieve <id>

Workspace-level custom field definitions. Only admins can mutate.

GET /api/projects/field-definitions/{id}/

### current projects field-definitions update <id>

Workspace-level custom field definitions. Only admins can mutate.

PUT /api/projects/field-definitions/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current projects list

Projects across the caller's workspaces. Any member can create and edit.

GET /api/projects/projects/

Options:
- `--workspace` - Filter by workspace UUID

### current projects partial-update <id>

Projects across the caller's workspaces. Any member can create and edit.

PATCH /api/projects/projects/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current projects retrieve <id>

Projects across the caller's workspaces. Any member can create and edit.

GET /api/projects/projects/{id}/

### current projects revert create <id>

Append a write restoring the value that preceded the given write.

POST /api/projects/projects/{id}/revert/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current projects update <id>

Projects across the caller's workspaces. Any member can create and edit.

PUT /api/projects/projects/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current tasks create

The caller's personal todos. Incomplete tasks sort before completed ones.

POST /api/tasks/tasks/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current tasks destroy <id>

The caller's personal todos. Incomplete tasks sort before completed ones.

DELETE /api/tasks/tasks/{id}/

### current tasks list

The caller's personal todos. Incomplete tasks sort before completed ones.

GET /api/tasks/tasks/

### current tasks partial-update <id>

The caller's personal todos. Incomplete tasks sort before completed ones.

PATCH /api/tasks/tasks/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current tasks retrieve <id>

The caller's personal todos. Incomplete tasks sort before completed ones.

GET /api/tasks/tasks/{id}/

### current tasks update <id>

The caller's personal todos. Incomplete tasks sort before completed ones.

PUT /api/tasks/tasks/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current vendors create

Vendors across the caller's workspaces. Any member can create and edit.

POST /api/vendors/vendors/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current vendors destroy <id>

Vendors across the caller's workspaces. Any member can create and edit.

DELETE /api/vendors/vendors/{id}/

### current vendors list

Vendors across the caller's workspaces. Any member can create and edit.

GET /api/vendors/vendors/

Options:
- `--project` - Filter by linked project UUID
- `--workspace` - Filter by workspace UUID

### current vendors partial-update <id>

Vendors across the caller's workspaces. Any member can create and edit.

PATCH /api/vendors/vendors/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current vendors retrieve <id>

Vendors across the caller's workspaces. Any member can create and edit.

GET /api/vendors/vendors/{id}/

### current vendors update <id>

Vendors across the caller's workspaces. Any member can create and edit.

PUT /api/vendors/vendors/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current whoami

Show the current user and workspace memberships.

### current workflows create

Workflows across the caller's workspaces. Any member can create and edit.

POST /api/workflows/workflows/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows definitions apply create

Upsert a rendered workflow definition into a workspace and seed its
record types (from the definition's ``emits[]`` plus the built-ins).
Existing workspace schemas are never overwritten.

POST /api/workflows/definitions/apply/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows destroy <id>

Workflows across the caller's workspaces. Any member can create and edit.

DELETE /api/workflows/workflows/{id}/

### current workflows list

Workflows across the caller's workspaces. Any member can create and edit.

GET /api/workflows/workflows/

Options:
- `--workspace` - Filter by workspace UUID

### current workflows partial-update <id>

Workflows across the caller's workspaces. Any member can create and edit.

PATCH /api/workflows/workflows/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows proposals decision create <record_id>

Approve or reject an agent_proposal record. Creates an
approval_decision record and re-dispatches the run if it was parked on
the gate. One decision per proposal — 409 on the second.

POST /api/workflows/proposals/{record_id}/decision/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows records list

Append-only records across the caller's workspaces. Records are
created by runs through the machine endpoint; there is no update or
delete.

GET /api/workflows/records/

Options:
- `--project` - Filter by project UUID
- `--record-type` - Filter by record type key
- `--run` - Filter by run UUID
- `--workspace` - Filter by workspace UUID

### current workflows records retrieve <id>

Append-only records across the caller's workspaces. Records are
created by runs through the machine endpoint; there is no update or
delete.

GET /api/workflows/records/{id}/

### current workflows retrieve <id>

Workflows across the caller's workspaces. Any member can create and edit.

GET /api/workflows/workflows/{id}/

### current workflows runs create

Run history for workflows in the caller's workspaces, with step
transitions inline. POST creates a run of a WorkflowDefinition and
dispatches it (or queues it behind the per-project write queue).

POST /api/workflows/runs/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows runs definition retrieve <run_id>

Machine endpoint: the harness fetches its work order — the rendered
definition plus the journal state it needs to resume (step states and
gate decisions).

GET /api/workflows/runs/{run_id}/definition/

### current workflows runs list

Run history for workflows in the caller's workspaces, with step
transitions inline. POST creates a run of a WorkflowDefinition and
dispatches it (or queues it behind the per-project write queue).

GET /api/workflows/runs/

Options:
- `--definition` - Filter by definition UUID
- `--project` - Filter by project UUID
- `--workflow` - Filter by workflow UUID

### current workflows runs records create <run_id>

Machine endpoint: the harness emits typed records, validated against
the workspace RecordType schema. Append-only — there is no update or
delete.

POST /api/workflows/runs/{run_id}/records/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows runs retrieve <id>

Run history for workflows in the caller's workspaces, with step
transitions inline. POST creates a run of a WorkflowDefinition and
dispatches it (or queues it behind the per-project write queue).

GET /api/workflows/runs/{id}/

### current workflows runs transitions create <run_id>

Machine endpoint: the harness journals step state changes. Idempotent —
a duplicate (step_id, status, attempt) returns the existing row with 200.

POST /api/workflows/runs/{run_id}/transitions/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workflows update <id>

Workflows across the caller's workspaces. Any member can create and edit.

PUT /api/workflows/workflows/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workspaces create

Workspaces the current user belongs to. Creating one makes you its admin.

POST /api/workspaces/workspaces/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workspaces destroy <id>

Workspaces the current user belongs to. Creating one makes you its admin.

DELETE /api/workspaces/workspaces/{id}/

### current workspaces invites accept create <id>

Accept an invite as the authenticated user. The user must have signed in
(via magic link) with the invited email.

POST /api/workspaces/invites/{id}/accept/

### current workspaces invites create <workspace_id>

Pending invites for a workspace, nested under /workspaces/{workspace_id}/.

POST /api/workspaces/workspaces/{workspace_id}/invites/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workspaces invites destroy <workspace_id> <id>

Pending invites for a workspace, nested under /workspaces/{workspace_id}/.

DELETE /api/workspaces/workspaces/{workspace_id}/invites/{id}/

### current workspaces invites list <workspace_id>

Pending invites for a workspace, nested under /workspaces/{workspace_id}/.

GET /api/workspaces/workspaces/{workspace_id}/invites/

### current workspaces invites retrieve <id>

Invite details for the accept page. The invite id (from the emailed
link) is the capability to view it.

GET /api/workspaces/invites/{id}/

### current workspaces list

Workspaces the current user belongs to. Creating one makes you its admin.

GET /api/workspaces/workspaces/

### current workspaces members destroy <workspace_id> <id>

Memberships of a workspace, nested under /workspaces/{workspace_id}/.

DELETE /api/workspaces/workspaces/{workspace_id}/members/{id}/

### current workspaces members list <workspace_id>

Memberships of a workspace, nested under /workspaces/{workspace_id}/.

GET /api/workspaces/workspaces/{workspace_id}/members/

### current workspaces members partial-update <workspace_id> <id>

Memberships of a workspace, nested under /workspaces/{workspace_id}/.

PATCH /api/workspaces/workspaces/{workspace_id}/members/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workspaces members retrieve <workspace_id> <id>

Memberships of a workspace, nested under /workspaces/{workspace_id}/.

GET /api/workspaces/workspaces/{workspace_id}/members/{id}/

### current workspaces members update <workspace_id> <id>

Memberships of a workspace, nested under /workspaces/{workspace_id}/.

PUT /api/workspaces/workspaces/{workspace_id}/members/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workspaces partial-update <id>

Workspaces the current user belongs to. Creating one makes you its admin.

PATCH /api/workspaces/workspaces/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.

### current workspaces retrieve <id>

Workspaces the current user belongs to. Creating one makes you its admin.

GET /api/workspaces/workspaces/{id}/

### current workspaces update <id>

Workspaces the current user belongs to. Creating one makes you its admin.

PUT /api/workspaces/workspaces/{id}/

Options:
- `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
