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:
datafast config show
Set a default website
Save a website ID so you don't have to pass
--website on every analytics command:datafast config set-website <websiteId>
Remove the default website
datafast config clear-website
whoami
Quick shorthand to print your account details:
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 (default: https://datafa.st) |
# Run a single command against a local dev server
DATAFAST_API_BASE=http://localhost:3000 DATAFAST_TOKEN=dft_xxx datafast whoami