Datagen Factory

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):

  1. Built-in defaults — e.g. api.url = http://localhost:8000, api.timeout = 30.
  2. Environment variables — with a DATAGEN_API_ prefix for API settings and a CLI_ prefix for everything else.
  3. Credentials file~/.config/datagen/credentials.json, written by datagen 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 show

Flags

FlagTypeDefaultDescription
--formattext|jsontextOutput format.

Example

$ datagen config show
api_url: https://api.datagen.example
token_prefix: dg_live_...
timeout: 30
version: 0.3.2

The 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:

VariableDefaultMeaning
DATAGEN_API_URLhttp://localhost:8000Base URL for the API. Override to point at staging or production.
DATAGEN_API_TOKENfrom credentials fileBearer token. Only set this if you want to override the stored credential — normally datagen auth login manages it.
DATAGEN_API_TIMEOUT30Request timeout, in seconds.

Any .env file in the current directory is also loaded, so project-scoped overrides work without exporting variables globally.

  • auth — manages the credentials file.
  • CLI overview — command tree, global flags, output formats.