config
Inspect the CLI's current configuration and understand the layers it reads from.
The CLI's configuration comes from three layers, in order of precedence (lowest wins when unset; highest wins when set):
- Built-in defaults — e.g.
api.url = http://localhost:8000,api.timeout = 30. - Environment variables — with a
DATAGEN_API_prefix for API settings and aCLI_prefix for everything else. - Credentials file —
~/.config/datagen/credentials.json, written bydatagen auth login. Supplies the bearer token and active organization.
There are no dedicated datagen config set / datagen config get commands today — configuration is driven by environment variables and the auth-managed credentials file, not by in-place CLI mutation.
config show
Print the CLI's effective configuration.
datagen config showFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--format | text|json | text | Output format. |
Example
$ datagen config show
api_url: https://api.datagen.example
token_prefix: dg_live_...
timeout: 30
version: 0.3.2The token is shown only as an 8-character prefix. Use datagen auth status to confirm who the token belongs to.
Environment variables
The variables the CLI reads, with their defaults:
| Variable | Default | Meaning |
|---|---|---|
DATAGEN_API_URL | http://localhost:8000 | Base URL for the API. Override to point at staging or production. |
DATAGEN_API_TOKEN | from credentials file | Bearer token. Only set this if you want to override the stored credential — normally datagen auth login manages it. |
DATAGEN_API_TIMEOUT | 30 | Request timeout, in seconds. |
Any .env file in the current directory is also loaded, so project-scoped overrides work without exporting variables globally.
Related
- auth — manages the credentials file.
- CLI overview — command tree, global flags, output formats.