Authentication & configuration
This page explains how dimescheduler finds your credentials and how to point the CLI at the right environment. The CLI 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.
So you can keep sensible 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), verifies it with a probe call against the chosen environment, and only then writes it to the config file. A rejected key is never saved.
The command has two flags of its own: --api-key skips the prompt (handy when the key is piped in from a secret manager), and --environment records which environment the key belongs to, so a sandbox key lands in the profile together with environment: sandbox:
dimescheduler --profile sandbox auth login --environment sandbox
Other commands in the same family:
dimescheduler auth status # show the active profile and environment, and whether the key is valid
dimescheduler auth logout # remove the key from the config file
Non-interactive (CI, scripts)
In CI you usually don't want to write to a config file. Set the environment variable 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
Keep multiple sets of credentials in the same file and switch between them. A typical setup pairs a default production key with a sandboxSandboxThe separate Dime.Scheduler environment where upcoming features arrive before the production release. It has its own API host, sandbox.api.dimescheduler.com, so API clients target it explicitly. 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:
| Value | Base URL |
|---|---|
production | https://api.dimescheduler.com |
sandbox | https://sandbox.api.dimescheduler.com |
Where to get an API key
Generate one in Dime.Scheduler before you authenticate:
See API keys for the full guide.