Skip to content

Configuration

dinio keeps connection settings in profiles — a name, a URL and an API key. Use one profile per account or environment, and pick one per command with --profile.

Terminal window
dinio profile set-key prod # store the key (hidden prompt or stdin)
dinio profile set prod --core-url https://api-dinio.bitelex.com
dinio profile set prod --email me@example.com # optional, the user the personal key belongs to
dinio profile list
dinio profile show prod
dinio profile use prod # make it the default
dinio profile rm old
Command
profile set NAME [--core-url URL] [--email E | --clear-email] Create or update a profile. Without --core-url the default https://api-dinio.bitelex.com is used.
profile set-key NAME Store the API key. Read hidden from the terminal, or from the first line of stdin. Warns about a key without the du_/dz_ prefix, which Dinio would reject.
profile list All profiles; the default is marked *.
profile show [NAME] One profile (default: the active one), with the key masked as …a1b2.
profile use NAME Make NAME the default profile.
profile rm NAME Delete a profile and its key.

The first profile you create becomes the default. Without any profile, the CLI uses one called default.

The key is never accepted as an argument to profile set-key, so it never lands in your shell history. To store it from a secret manager, pipe it in:

Terminal window
pass show dinio/prod | dinio profile set-key prod
File Holds
config.toml Profiles: URL, email, the default profile. Safe to share.
credentials.toml API keys per profile. Created with mode 0600.

Both live in the config directory: ~/.config/dinio on Linux, the platform’s config directory on macOS and Windows (dinio profile show prints it). DINIO_CONFIG_DIR overrides it.

config.toml
default_profile = "prod"
[profiles.prod]
url = "https://api-dinio.bitelex.com"
email = "me@example.com"

Settings are resolved in this order, first match wins:

  1. the flag: --profile, --url, --api-key
  2. the environment: DINIO_PROFILE, DINIO_API_URL, DINIO_API_KEY
  3. the profile from config.toml / credentials.toml
  4. the default URL

In CI, set DINIO_API_KEY (and DINIO_API_URL if needed) as secrets and skip profiles entirely:

Terminal window
DINIO_API_KEY=$ZONE_KEY dinio record add example.com _acme-challenge TXT "$TOKEN" --ttl 60

These work with every command, before or after it:

Option
--profile NAME Use this profile.
--url URL Use this API URL for this call.
--api-key KEY Use this key for this call.
-o, --output table|json Output format, see Output.
-y, --yes Don’t ask for confirmation on destructive commands.
Terminal window
dinio auth status
dinio --profile staging auth status

Shows the profile, the URL, whether Dinio is reachable, and whether the key works and which kind it is (personal or zone). Its exit code is the outcome — 0 when the key works, 3 when it is missing or rejected, 7 when Dinio is unreachable — so it doubles as a check in scripts.