"Best analytics tool I've used in 14 years"

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:

VariableDescription
DATAFAST_TOKENAdmin token (dft_ prefix)
DATAFAST_SITE_KEYAnalytics-only site key (df_ prefix)
DATAFAST_API_BASEAPI 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

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown