Profiles
Dagy supports profile-based configuration (similar to AWS CLI profiles) to manage multiple environments from a single machine.
Config file
Profiles are stored in:
~/.dagy/config.yaml
You can override this location with the DAGY_LOCAL_DIR environment variable, in which case the config lives at $DAGY_LOCAL_DIR/config.yaml.
Schema
version: 1
default_profile: dev
profiles:
dev:
api_url: https://api.dev.dagy.io
app_url: https://dev.dagy.io
table_format: heavy_grid
last_updated: "2026-03-01T12:00:00Z"
staging:
api_url: https://api.staging.dagy.io
last_updated: "2026-02-01T09:10:00Z"
prod:
api_url: https://api.dagy.io
table_format: plain
last_updated: "2026-01-28T18:45:00Z"
Profile fields
| Field | Required | Description |
|---|---|---|
api_url | Yes | The Dagy REST API base URL for this environment |
app_url | No | The Dagy web app URL (used for dagy login). Defaults to https://dagy.io |
table_format | No | Tabulate format for CLI table output. Defaults to heavy_grid |
last_updated | Auto | ISO 8601 timestamp, set automatically on profile changes |
Creating and editing profiles
Use the interactive wizard:
dagy config
This allows you to create new profiles, edit existing ones (API URL, table format), set a default, or delete profiles.
Profile resolution
When a command needs a profile, the CLI resolves it in this order:
- Explicit
--profile <name>flag on the command DAGY_PROFILEenvironment variabledefault_profilefield inconfig.yaml- First profile alphabetically (fallback)
API URL resolution
When a command needs the API URL, the CLI resolves it in this order:
DAGY_API_URLenvironment variable (always wins)api_urlfield in the resolved profileNone(command runs in local-only mode, or fails if API access is required)
Using profiles with commands
Most commands accept --profile to target a specific environment:
dagy login --profile staging
dagy logout --profile staging
dagy run my-deployment --profile staging
dagy flows list --profile staging
dagy deploy artifact.zip --deployment my-flow --flow-name f --flow-version 1 --profile prod
Table format
Profiles can store a table_format preference that controls how tabular output (e.g., flows list) is rendered. The format is provided by the tabulate library. Common formats include plain, github, grid, heavy_grid, pipe, and orgtbl.
Configure it during dagy config, or set it directly in config.yaml.
If no table format is configured, the CLI defaults to heavy_grid.
Validation rules
- Profile names must match
^[A-Za-z0-9-]+$(alphanumeric with hyphens). - API URLs must include
http://orhttps://and a valid hostname. - If a URL points to
localhost,127.0.0.1, or::1, you will be asked to confirm.
Integrity and recovery
- If
config.yamlis corrupt or unparseable, it is backed up to a timestampedconfig.bak-<YYYYMMDDHHMMSS>.yamland the wizard starts fresh. - If
default_profilereferences a profile that doesn't exist, the CLI automatically falls back to the first available profile. - The
last_updatedtimestamp is recorded per profile whenever it is created or modified. - Config and credentials files are stored with
0600permissions (owner read/write only).
Environment variable overrides
| Variable | Overrides |
|---|---|
DAGY_API_URL | api_url in the active profile |
DAGY_APP_URL | app_url in the active profile |
DAGY_PROFILE | default_profile in config.yaml |
DAGY_LOCAL_DIR | Location of ~/.dagy/ base directory |
See also
- CLI Reference: Complete command documentation
- Configuration Overview: All environment variables and settings