> ## Documentation Index
> Fetch the complete documentation index at: https://docs.receiptor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Commands

> Command reference for API key auth, workspace context, and capability execution.

## Authenticate

```bash theme={null}
receiptor auth sk_...
receiptor auth --status
```

## Workspace context commands

```bash theme={null}
receiptor workspace --status
receiptor workspace list
receiptor workspace use org_...
receiptor workspace clear
```

`workspace list` calls `GET /v1/workspaces`.

Capability execution uses selected workspace by setting `X-Receiptor-Org-Id`.

Workspace context also controls org-level defaults such as preferred currency. CLI capability execution resolves currency from the active workspace first, then falls back to the user profile.

## List capabilities

```bash theme={null}
receiptor list
```

Calls `GET /v1/capabilities` and prints capability metadata.

## Execute capability with flags

```bash theme={null}
receiptor documents search --query "uber" --limit 5 --outputMode compact
```

## Execute using JSON input

```bash theme={null}
receiptor documents search '{"query":"uber","limit":5}'
```

## Execute using stdin

```bash theme={null}
echo '{"merchant":"Uber","changes":{"category":"Transport"},"dryRun":true}' | receiptor documents bulk-edit
```

## Approval commands

```bash theme={null}
receiptor approval get 01J...
receiptor approval approve 01J...
receiptor approval reject 01J... --message "Not yet"
```

When a gated capability is called in execute mode, the CLI prints the `approval_required` payload instead of failing. You can then resolve that request with the `approval` commands above.

## Show input schema help

```bash theme={null}
receiptor documents search --help
```

This fetches discovery output and prints selected capability `inputSchema`.
