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

# Commands

> How to use your generated CLI's commands and flags

Your generated CLI organizes commands around your API's resources and actions.

## Command structure

```bash theme={null}
your-cli <resource> <action> [flags]
```

For example, if your API has a `users` resource:

```bash theme={null}
your-cli users list
your-cli users get --id user_123
your-cli users create --name "Jane" --email "jane@example.com"
your-cli users delete --id user_123
```

## Global flags

These flags are available on every command:

| Flag         | Description                              |
| ------------ | ---------------------------------------- |
| `--api-key`  | API key for authentication               |
| `--base-url` | Override the default API base URL        |
| `--output`   | Output format: `table`, `json`, or `raw` |
| `--json`     | Shorthand for `--output json`            |
| `--raw`      | Shorthand for `--output raw`             |

## Getting help

Every command has built-in help:

```bash theme={null}
# See all available resources
your-cli --help

# See actions for a specific resource
your-cli users --help

# See flags for a specific action
your-cli users create --help
```

## Example workflow

```bash theme={null}
# Set your API key once
your-cli configure --api-key sk-your-key-here

# List resources
your-cli users list

# Get a specific resource as JSON
your-cli users get --id user_123 --json

# Create a new resource
your-cli users create --name "Jane" --email "jane@example.com"
```
