Authentication & configuration
dimescheduler resolves credentials from this chain, highest precedence first:
- Command-line flags (
--api-key,--environment,--profile,--config). - Environment variables (
DIMESCHEDULER_API_KEY,DIMESCHEDULER_ENVIRONMENT,DIMESCHEDULER_OUTPUT,DIMESCHEDULER_PROFILE,DIMESCHEDULER_CONFIG). - The active profile in the config file.
- Compiled-in defaults.
That means you can ship sane defaults in a config file and override them per call without editing the file.
Interactive login
$ dimescheduler auth login
API key: ********
Logged in. Config saved to ~/.config/dimescheduler/config.yaml
auth login reads the key from stdin (so it never lands in shell history), writes it to the config file, and verifies it with a probe call against the chosen environment.
Other commands in the same family:
dimescheduler auth status # show the active profile and environment
dimescheduler auth logout # remove the key from the config file
Non-interactive (CI, scripts)
In CI you don't want to write to a config file. Set the env var instead:
export DIMESCHEDULER_API_KEY=...
export DIMESCHEDULER_ENVIRONMENT=production # optional
dimescheduler resources list
Or pass --api-key per call.
A key on the command line lands in shell history and process listings. Read it from a secret manager and pipe it in.
Configuration
The config file lives at:
| OS | Path |
|---|---|
| Linux | $XDG_CONFIG_HOME/dimescheduler/config.yaml or ~/.config/dimescheduler/config.yaml |
| macOS | ~/.config/dimescheduler/config.yaml |
| Windows | %APPDATA%\dimescheduler\config.yaml |
Override the location with --config <path> or DIMESCHEDULER_CONFIG.
A minimal file:
api_key: prod-key
environment: production
Profiles
You can keep multiple sets of credentials in the same file and switch between them. A typical setup with a default production key and a sandbox profile:
api_key: prod-key
environment: production
profiles:
sandbox:
api_key: sandbox-key
environment: sandbox
test:
api_key: test-key
environment: test
Switch profiles per call:
dimescheduler --profile sandbox resources list
Or persist the switch:
dimescheduler config set profile sandbox
Inspecting and editing the config
dimescheduler config list # print the resolved config
dimescheduler config get api_key # print one value
dimescheduler config set environment sandbox
dimescheduler config path # print the path to the config file
Environment switch
The --environment flag (or DIMESCHEDULER_ENVIRONMENT) accepts a short name or a full URL:
| Value | Base URL |
|---|---|
production | https://api.dimescheduler.com |
sandbox | https://sandbox.api.dimescheduler.com |
test | https://test.api.dimescheduler.com |
https://… | Any URL - useful for pointing at the local mock server. |
Where to get an API key
Generate one in Dime.Scheduler before you authenticate:
See API keys for the full guide.