Back to docs
Configuration

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

FieldRequiredDescription
api_urlYesThe Dagy REST API base URL for this environment
app_urlNoThe Dagy web app URL (used for dagy login). Defaults to https://dagy.io
table_formatNoTabulate format for CLI table output. Defaults to heavy_grid
last_updatedAutoISO 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:

  1. Explicit --profile <name> flag on the command
  2. DAGY_PROFILE environment variable
  3. default_profile field in config.yaml
  4. First profile alphabetically (fallback)

API URL resolution

When a command needs the API URL, the CLI resolves it in this order:

  1. DAGY_API_URL environment variable (always wins)
  2. api_url field in the resolved profile
  3. None (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:// or https:// 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.yaml is corrupt or unparseable, it is backed up to a timestamped config.bak-<YYYYMMDDHHMMSS>.yaml and the wizard starts fresh.
  • If default_profile references a profile that doesn't exist, the CLI automatically falls back to the first available profile.
  • The last_updated timestamp is recorded per profile whenever it is created or modified.
  • Config and credentials files are stored with 0600 permissions (owner read/write only).

Environment variable overrides

VariableOverrides
DAGY_API_URLapi_url in the active profile
DAGY_APP_URLapp_url in the active profile
DAGY_PROFILEdefault_profile in config.yaml
DAGY_LOCAL_DIRLocation of ~/.dagy/ base directory

See also