# 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 contacts add_address create <id>

POST /api/contacts/contacts/{id}/add_address/

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

### current contacts addresses destroy <id> <address_id>

Remove an address. Editing a member contact is admin-only (same
as ``add_address``); removing a *verified* address is admin-only
regardless of contact, since verification is what makes an address
approval-capable — a member must not be able to unilaterally strip
that off their own directory entry.

DELETE /api/contacts/contacts/{id}/addresses/{address_id}/

### current contacts addresses verify create <id> <address_id>

Admin-only: mark an address as platform-verified. Verification is
what makes a membership-linked address approval-capable.

POST /api/contacts/contacts/{id}/addresses/{address_id}/verify/

### current contacts create

POST /api/contacts/contacts/

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

### current contacts destroy <id>

DELETE /api/contacts/contacts/{id}/

### current contacts list

Offset/limit page, ordered by name (the model's own
``Meta.ordering``) so offsets stay stable across pages — a real
workspace directory can hold far more contacts than fit in one
response.

GET /api/contacts/contacts/

Options:
- `--limit` - Max contacts per page (default 25, cap 100)
- `--offset` - Page offset (default 0)
- `--search` - Case-insensitive match against name, company, role, or any address value
- `--workspace` - Filter by workspace UUID

### current contacts partial-update <id>

PATCH /api/contacts/contacts/{id}/

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

### current contacts retrieve <id>

GET /api/contacts/contacts/{id}/

### current contacts update <id>

PUT /api/contacts/contacts/{id}/

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

### current docs

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

### current files delete post

Delete workspace files. The bucket is versioned, so this writes
delete markers — recoverable by an operator, invisible to the portal.

POST /api/files/delete/

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

### current files download-url post

POST {workspace, path} -> {url, path}; subclasses pick the verb.

POST /api/files/download-url/

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

### current files list

GET /api/files/

Options:
- `--prefix` - Narrow to one tree, e.g. company/ or projects/<id>/
- `--workspace` - Workspace UUID

### current files upload-url post

POST {workspace, path} -> {url, path}; subclasses pick the verb.

POST /api/files/upload-url/

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

### 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 connect-api-user create

Connect Salesforce as an API-only user.

These users cannot reach an OAuth consent screen, so there is no
redirect to hand the browser: the credentials arrive here, and one
live login proves them before anything is stored.

POST /api/integrations/connections/connect-api-user/

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

### current integrations connections connect-client-credentials create

Connect Salesforce with a connected app from the customer's org.

A server-to-server grant: the app names a Run As user, so there is no
consent screen and no user credential. The app is not ours and not
server-wide, so its client id and secret are stored per workspace.

POST /api/integrations/connections/connect-client-credentials/

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

### current integrations connections destroy <id>

Workspace integration connections. Created via the OAuth callback, or
via connect-api-user for providers that support credentials; any member
can list, only admins can connect or disconnect.

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

### current integrations connections list

Workspace integration connections. Created via the OAuth callback, or
via connect-api-user for providers that support credentials; any member
can list, only admins can connect 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 integrations connections teams-conversations list <id>

Teams conversations the bot has seen, derived from the
observations ledger (there is no conversation table and the Bot
Connector has no listing API). Personal DMs are excluded — this
powers the approval-routing FYI picker.

GET /api/integrations/connections/{id}/teams-conversations/

### current integrations messaging files manifest post

Hydration manifest for the messaging agent's sandbox.

Same shape as the run manifest above, but workspace-wide: a chat
message can turn out to be about any project, and unlike a workflow
definition the agent declares no inputs, so it gets the company tree
plus every project tree and decides for itself what it needs.

POST, for a read, because the job-token permission class reads the
workspace id out of the request body — the same contract every other
messaging-job endpoint uses.

POST /api/integrations/messaging/files/manifest/

### current integrations messaging history post

What was already said in this conversation, oldest last.

The agent is dispatched with one message and no memory of the last
one, so without this every turn answers out of context — "send it to
the same person" has no referent. Neither provider will give the
history back (see ``integrations.transcript``), so this reads current's
own ledger: the messages people sent the bot, and the replies the bot
sent them.

Unlike the send paths this needs no anti-spoofing guard. It only ever
reads the calling workspace's own observations, so a forged
conversation id reads nothing rather than reaching another tenant.

POST /api/integrations/messaging/history/

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

### current integrations messaging react post

Add an emoji reaction to the message a reply_ref points at.

POST /api/integrations/messaging/react/

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

### current integrations messaging respond post

Send the agent's reply into the conversation a reply_ref points at,
with any workspace files it chose to attach.

Slack shares the files and the text as one message (the text becomes
the upload's ``initial_comment``). Teams cannot: a bot there has to
offer each file through a FileConsentCard the recipient accepts, and
only in a 1:1 chat, so the text posts first and each file follows as
its own offer.

POST /api/integrations/messaging/respond/

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

### current integrations messaging start-workflow post

Run one of the workspace's workflows on demand, because a person asked
for it in chat.

This is not a trigger: no binding fires, and nothing here decides on its
own that a message deserves a workflow — the messaging agent does, the
same way a person clicks "run now" in the portal. The conversation rides
onto the run, so the workflow reports back into the thread that asked.

POST /api/integrations/messaging/start-workflow/

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

### current integrations messaging stream post

Live progress UI for a sandbox agent run; the final reply is NOT part
of it — the agent posts that as a normal message through the respond
endpoint afterwards.

Slack: ``start`` opens a "thinking steps" streaming message in the
thread (plan mode: task cards grouped under one card), ``append``
streams task_update/plan_update chunks into it, ``stop`` settles it.

Teams: ``start`` sends one Adaptive Card (compact status header plus a
toggleable activity section) and returns its activity id as ``ts``;
``append``/``stop`` replace the card in full, rebuilt from the chunks —
the sandbox always sends its complete state, so the relay stays
stateless.

POST /api/integrations/messaging/stream/

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

### current integrations teams app-package get

Download the Teams app package (manifest + icons) as a zip.

The bot is a single-tenant Azure registration in the platform's home
tenant; customer tenants get the bot by uploading this package to their
Teams org catalog — no Azure work on their side. Admin-gated like the
rest of the integration surface.

GET /api/integrations/teams/app-package/

Options:
- `--workspace` - Workspace UUID; the caller must be an admin of it.

### 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. ``project=`` is the project audit log,
newest happening first.

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. ``project=`` is the project audit log,
newest happening first.

GET /api/observations/observations/

Options:
- `--ids` - Comma-separated observation UUIDs
- `--limit` - Number of results to return per page.
- `--offset` - The initial index from which to return the results.
- `--project` - Filter by project UUID
- `--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. ``project=`` is the project audit log,
newest happening first.

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 option_usage retrieve <id>

Count projects whose current value uses each option on this field.

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

### 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 search retrieve

Find projects by their current field values (see state.search_projects).

Compact on purpose: the full project list serializes every field
value of every project — megabytes at production scale — which no
chat agent or picker can consume. A hit carries just enough to
choose a project and fetch its detail.

GET /api/projects/projects/search/

Options:
- `--q` - Case-insensitive regular expression; a plain word searches as a keyword
- `--workspace` - Filter by workspace UUID

### 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 a
disabled binding for each trigger it declares.

A definition that still contains an ``emits[]`` key (the removed
record system's declaration) is accepted and the key ignored.

POST /api/workflows/definitions/apply/

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

### current workflows definitions list

Applied workflow definitions across the caller's workspaces. The
portal reads this to offer definitions when binding a new trigger;
writes go through the apply endpoint.

GET /api/workflows/definitions/

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

### current workflows definitions retrieve <id>

Applied workflow definitions across the caller's workspaces. The
portal reads this to offer definitions when binding a new trigger;
writes go through the apply endpoint.

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

### 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 retrieve <id>

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

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

### current workflows runs archive create <id>

Hide the run from the default Actions list. Only finished (terminal-status)
runs may be archived — archiving a run that's still in flight would hide it
while dispatch keeps working on it.

POST /api/workflows/runs/{id}/archive/

### current workflows runs complete create <run_id>

Machine endpoint: the runner reports the run's terminal outcome —
the sole finalization authority (finalization no longer waits for a
terminal step transition). Idempotent: a run that is already terminal
returns 200 with its current state, unchanged.

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

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

### 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. Runs on the same project execute concurrently.

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 runner fetches its work order — the rendered
definition plus the journal state it needs to resume (step states).

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

### current workflows runs files manifest get <run_id>

GET /api/workflows/runs/{run_id}/files/manifest/

### current workflows runs files promote-urls post <run_id>

POST /api/workflows/runs/{run_id}/files/promote-urls/

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

### 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. Runs on the same project execute concurrently.

GET /api/workflows/runs/

Options:
- `--archived` - Filter by archived state. Defaults to false (hides archived runs).
- `--definition` - Filter by definition UUID
- `--project` - Filter by project UUID
- `--workflow` - Filter by workflow UUID
- `--workspace` - Filter by workspace UUID

### 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. Runs on the same project execute concurrently.

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

### current workflows runs tools invoke create <run_id> <tool_name>

POST /api/workflows/runs/{run_id}/tools/{tool_name}/invoke/

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

### current workflows runs transitions create <run_id>

Machine endpoint: the runner 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 runs unarchive create <id>

Restore an archived run to the default Actions list.

POST /api/workflows/runs/{id}/unarchive/

### 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.
