> ## 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`                     |
| `currency`    | ISO 4217 code money values are converted to. Without it the server converts to `USD` — set this if your store sells in another currency. See [Reporting currency](/concepts/reporting-currency). | `GBP`                     |

## Examples

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

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": {
      "apiKey": "upstack_...",
      "pixelId": "...",
      "defaults": { "timezone": "America/New_York", "output": "table" }
    }
  }
}
```

How each default applies per command:

| Key           | [`query`](/cli/query), [`query-cohort`](/cli/query-cohort), [`query-channel-details`](/cli/query-channel-details) | [`query-attribution`](/cli/query-attribution) | [`saved run`](/cli/saved-queries) |
| ------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | --------------------------------- |
| `granularity` | Applied                                                                                                           | — (no granularity flag)                       | —                                 |
| `timezone`    | Applied                                                                                                           | Applied                                       | — (use `run` override flags)      |
| `currency`    | Applied                                                                                                           | Applied                                       | — (use `run` override flags)      |
| `output`      | Applied                                                                                                           | Applied                                       | Applied                           |
