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

# CLI reference

<Note>The Stigg CLI is currently in **public beta**. Feedback and bug reports are welcome.</Note>

Commands, flags, and common workflows for the Stigg CLI. To install and authenticate, see [Get started with the CLI](/api-and-sdks/cli).

## Common commands

**Read operations**

```bash theme={null}
stigg v1:customers list
```

List all customers in the current environment

```bash theme={null}
stigg v1:customers retrieve
```

Get details for a specific customer

```bash theme={null}
stigg v1:subscriptions list
```

List subscriptions, optionally filtered by customer

```bash theme={null}
stigg v1:subscriptions retrieve
```

Get full details for a subscription

```bash theme={null}
stigg v1:entitlements check
```

Check a customer's access to a specific feature

```bash theme={null}
stigg v1:plans list
```

List all plans in the product catalog

**Write operations**

```bash theme={null}
stigg v1:customers provision
```

Create or update a customer record

```bash theme={null}
stigg v1:subscriptions provision
```

Subscribe a customer to a plan

```bash theme={null}
stigg v1:subscriptions update
```

Update an existing subscription (e.g. add-on quantities)

```bash theme={null}
stigg v1:subscriptions cancel
```

Cancel a subscription immediately or at period end

```bash theme={null}
stigg v1:usage report
```

Report metered feature usage for a customer

```bash theme={null}
stigg v1:events report
```

Submit a raw usage event for aggregation

Run `stigg --help` for the full command reference, or `stigg v1:<resource> --help` for flags on a specific resource.

***

## Example use-cases

**Debug a customer issue**

Check what a customer is entitled to and whether their subscription is active, without opening the Stigg console:

```bash theme={null}
stigg v1:customers retrieve --id cust-001
stigg v1:subscriptions list --customer-id cust-001
stigg v1:entitlements check --customer-id cust-001 --feature-id feature-api-calls
```

**Seed a sandbox for local development**

Provision a test customer and subscription in one shot:

```bash theme={null}
stigg v1:customers provision --customer-id cust-test-001 --email dev@example.com --name "Test User"
stigg v1:subscriptions provision --customer-id cust-test-001 --plan-id plan-pro
```

**Automate in CI/CD**

Store your API key as a secret in your CI/CD system and inject it as `STIGG_API_KEY` at runtime. For example, provision test fixtures before integration tests run, then tear them down after:

```bash theme={null}
# Setup
export STIGG_API_KEY=$STIGG_SANDBOX_KEY
stigg v1:customers provision --customer-id cust-ci-$BUILD_ID --email ci@example.com
stigg v1:subscriptions provision --customer-id cust-ci-$BUILD_ID --plan-id plan-starter

# ... run tests ...

# Teardown
stigg v1:subscriptions cancel --customer-id cust-ci-$BUILD_ID --cancellation-date IMMEDIATE
```

**Report usage from a script**

Push metered usage from a batch job or cron task:

```bash theme={null}
stigg v1:usage report --customer-id cust-001 --feature-id feature-api-calls --value 150
```

***

## Global flags

| Flag | Description |
| - | - |
| `--api-key` | Stigg API key (overrides `STIGG_API_KEY`) |
| `--help` | Show command usage |
| `--debug` | Enable debug logging, including HTTP request/response details |
| `--version`, `-v` | Show the CLI version |
| `--base-url` | Use a custom API backend URL |
| `--format` | Output format: `auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml` |
| `--format-error` | Output format for errors: `auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml` |
| `--transform` | Transform output using [GJSON](https://github.com/tidwall/gjson) syntax |
| `--transform-error` | Transform error output using GJSON syntax |

***

<Card title="CLI vs MCP server" icon="arrow-right-arrow-left" href="/api-and-sdks/mcp-server#mcp-server-vs-cli">
  Not sure which tool to use? See the side-by-side comparison.
</Card>


## Related topics

- [Get started with the CLI](/api-and-sdks/cli.md)
- [CLI vs MCP server](/api-and-sdks/mcp-server.md#mcp-server-vs-cli)
- [API keys](/documentation/managing-your-account/environments/api-keys.md)


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