﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>Source: https://datafa.st/docs/cli-config
Markdown source: https://datafa.st/docs/cli-config.md
Description: View and manage CLI configuration including the default website and token using the DataFast CLI.

# CLI — Config

View and manage the local CLI config stored at `~/.config/datafast/config.json`.

## Show current config

Displays the active token, site key, API base URL, default website, and where the config file lives:

```sh
datafast config show
```

## Set a default website

Save a website ID so you don't have to pass `--website` on every analytics command:

```sh
datafast config set-website <websiteId>
```

## Remove the default website

```sh
datafast config clear-website
```

## whoami

Quick shorthand to print your account details:

```sh
datafast whoami
```

## Config via environment variables

Environment variables always take priority over the config file:

| Variable | Description |
|---|---|
| `DATAFAST_TOKEN` | Admin token (`dft_` prefix) |
| `DATAFAST_SITE_KEY` | Analytics-only site key (`df_` prefix) |
| `DATAFAST_API_BASE` | API base URL (def