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

# Configuration defaults

> Set per-profile defaults so you don't repeat common flags on every query.

Set per-profile defaults so you don't repeat common flags. Defaults are merged into every query: **file values \< defaults \< CLI flags**.

## Usage

```bash theme={null}
upstack config set <key> <value>
upstack config get [key]
upstack config unset <key>
```

## Supported keys

| Key           | Description                                      | Example                   |
| ------------- | ------------------------------------------------ | ------------------------- |
| `timezone`    | IANA timezone applied to query date ranges.      | `America/New_York`        |
| `output`      | Default output format.                           | `json`, `table`, or `csv` |
| `granularity` | Default granularity for query / cohort commands. | `day`                     |

## Examples

```bash theme={null}
upstack config set timezone America/New_York
upstack config set output table

upstack config get               # print all defaults for the active profile
upstack config get granularity   # print one key

upstack config unset granularity
```

Defaults are stored under the active profile in `~/.upstackrc`:

```json theme={null}
{
  "profiles": {
    "default": {
      "baseUrl": "...",
      "apiKey": "upstack_...",
      "pixelId": "...",
      "defaults": { "timezone": "America/New_York", "output": "table" }
    }
  }
}
```
