## tools operations

Operations are direct subcommands of `stripe tools`. Each operation accepts named flags for its parameters.

Use `stripe tools` to see all available operations. Use `stripe tools <operation> --help` to view parameter details for a specific operation.

Use `stripe tools search <query>` to find operations by keyword or description.

> All operations support making live requests with the `--live` flag.

**Command:** `stripe tools`

### Arguments

- `<operation>`
  The operation to run, for example `get_brand_settings` or `update_brand_settings`. Run `stripe tools` to see all available operations.

### Flags

- `--param=value`
  Named flags for operation parameters. Each parameter becomes a flag with a hyphenated name (for example, `--primary-color` for the `primary_color` API parameter).

- `--body <json>`
  Pass parameters as a JSON object instead of named flags. Named flags override values in `--body`.

- `--json`
  Output the API response as structured JSON.

- `--live`
  Make a live request (by default, runs in test mode).

### Examples

**List available operations**

```sh
stripe tools
```

```
Usage: stripe tools <command> [options]

Search and execute Stripe API operations from the command line.
Run `stripe tools <command> --help` for parameter details.
Run `stripe tools search <query>` to find commands by keyword or description.

Commands:
  get_brand_settings       Lists all branding settings.
  update_brand_settings    Updates branding settings.
  search <query>           Search operations by keyword or description

Options:
  --color        Turn on/off color output (on, off, auto)  [string]
  --log-level    Log level (debug, info, trace, warn, error)  [default: "info"]
  --version      Show plugin version
  --help         Show this help message
```

**View parameters for an operation**

```sh
stripe tools get_brand_settings --help
```

```
Lists all merchant branding settings for hosted surfaces and receipts.

Usage:
  stripe tools get_brand_settings [--param=value] [flags]

Required Parameters:
      (none)

Optional Parameters:
      --expand <string>
          Specifies which fields in the response should be expanded.
      --use-default-styles true|false
          If true, returns Stripe's default branding styles if unset on
          merchant instead of nil. Defaults to true.

Flags:
      --body <string>   JSON parameters (escape hatch)
      --json            Output structured JSON
      --live            Use live-mode API key
```

**Run a read operation**

```sh
stripe tools get_brand_settings --live --json
```

**Update with named flags**

```sh
stripe tools update_brand_settings \
    --live \
    --primary-color "rgb(82, 95, 127)" \
    --contrast-color "rgb(80, 93, 124)" \
    --font-color "rgb(0, 0, 0)" \
    --checkout-background-color "rgb(255, 255, 255)" \
    --checkout-use-brand-colors false \
    --use-logo-instead-of-icon false
```

**Update with JSON body (scripting)**

```sh
stripe tools update_brand_settings \
    --live \
    --body '{"primary_color":"rgb(82,95,127)","contrast_color":"rgb(80,93,124)","font_color":"rgb(0,0,0)","checkout_background_color":"rgb(255,255,255)","checkout_use_brand_colors":false,"use_logo_instead_of_icon":false}'
```
