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

# Subtotal CLI

> Call the Subtotal API from your terminal.

The Subtotal CLI calls the [Subtotal API](https://docs.subtotal.com/docs/subtotal-api.md) from your terminal, signed in with your Subtotal account.

```sh theme={null}
uv tool install subtotal-cli   # or: pipx install subtotal-cli (Python 3.10+)
subtotal login                 # sign in with your browser and pick a team
subtotal                       # interactive mode
subtotal --help                # one command per API operation
```

## Commands

```sh theme={null}
subtotal get-account
subtotal get-purchase <purchase_id>
subtotal get-connections --status active | jq -r '.connections[].connection_id'
```

Each [API reference](https://docs.subtotal.com/docs/api-reference/introduction.md) operation is a command; `subtotal <command> --help` shows its
options. Output is JSON. `subtotal logout` signs out.

> [!NOTE]
>
> No headless sign-in yet: for CI, use an [API key](https://docs.subtotal.com/docs/subtotal-api.md#authentication).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.