Skip to content
Docs/Configure your workspace

CLI profiles and local settings

A profile stores a workspace API URL and your preferred environment. Profiles make it easier to switch between workspace installations without editing application code. Credentials are stored separately from profiles.

On this pageSet up a profileUse environment variablesUnderstand local and hosted selectionLocal files and loggingCredentials and organization selection

Set up a profile

Shell
dagy config

The interactive menu creates, edits, deletes, and selects profiles. Enter the API URL supplied for your workspace, choose a default profile, and optionally select an environment and table-output style. Then sign in:

Shell
dagy login --profile work
dagy env use develop --profile work
dagy env current --profile work

dagy login saves credentials but does not create an API profile. Set up a profile or DAGY_API_URL before deploying. whoami shows saved identity information; it does not check token validity with the server.

To override a profile for one command:

Shell
dagy flows list --profile work
dagy -e staging deployments list --profile work

Use environment variables

For a shell or application process:

Shell
export DAGY_API_URL="https://api.dagy.io/app"
export DAGY_ENVIRONMENT="develop"

Use your workspace's actual base URL if it differs. DAGY_API_URL includes any path prefix required by that installation. For the hosted default, API paths such as /runs are appended to /app.

SettingResolution, from highest to lowest priority
API URLExplicit SDK override where supported, DAGY_API_URL, active profile's api_url
ProfileA command's --profile, DAGY_PROFILE, configured default, first available profile
EnvironmentSupported command/SDK override, DAGY_ENVIRONMENT, profile's environment, develop
Login web appDAGY_APP_URL, profile's app_url, https://dagy.io

A requested profile name that does not exist can fall back to the first configured profile. Confirm the selected API URL and environment before deployment. Global -e precedes the subcommand; some commands, including run, backfill, and schedules create, also accept their own --environment option. Use the leaf command's option for those commands.

DAGY_API_URL overrides all named profiles. Unset it when you intend --profile to select a different URL. SDK Flow.run() does not apply an environment selector to its hosted request; use a deployment run request with an explicit environment when environment selection matters.

The SDK does not automatically load .env files. Export settings in your shell or load them explicitly in your application's configuration layer.

Understand local and hosted selection

OperationWith a configured API URLWithout one
flow.run_local()LocalLocal
flow.run()Hosted trigger by flow nameLocal
flow.deploy()Hosted deploymentLocal execution
dagy run TARGETTARGET is a deployment nameTARGET is file.py:flow_function
dagy runs listHosted listingLocal listing
dagy runs list --localLocal listingLocal listing
dagy runs show / dagy logsLocal files onlyLocal files only

There is no dagy run --local option. Call .run_local() from Python to guarantee local execution after configuring a hosted workspace.

Local files and logging

VariableDefaultPurpose
DAGY_LOCAL_DIR~/.dagyLocal run history, logs, artifacts, profiles, and saved credentials
DAGY_LOCAL_ARTIFACT_MAX_BYTES5242880 (5 MiB)Maximum size of each local output artifact
DAGY_LOCAL_VERBOSEfalseEnables verbose local logging for 1, true, yes, or on
DAGY_PROFILEConfigured defaultDefault CLI profile
DAGY_APP_URLHosted web appBrowser sign-in destination for a custom workspace installation

For project-isolated local runs:

Shell
export DAGY_LOCAL_DIR="$PWD/.dagy"

Add .dagy/ to your project's .gitignore. Changing the local directory also changes which profiles and credentials the CLI reads. Build artifacts default to ~/.dagy/builds independently; use build_artifact(..., output_dir="dist") or dagy build --output-dir dist to control build output.

The local runner retains the last 20 runs by default. Customize with flow.run_local(cleanup_keep_last=50). Artifact serialization and size errors can leave a successful task without a persisted output; inspect warnings before relying on reuse of that output.

Credentials and organization selection

CLI credentials are shared by profiles within the same DAGY_LOCAL_DIR; a profile does not create a separate credential vault. Signing into another organization replaces the saved CLI identity. The SDK sends the organization ID saved during login with its requests.

The CLI attempts to restrict profile and credential files to owner-only access. Keep these files out of source control and backups that are shared with others. For automation, follow the API-key guide and keep keys in your CI secret store. The SDK has no DAGY_API_KEY setting; do not assume setting an arbitrary environment variable changes its authentication headers.

Use dagy logout to delete local credentials and request best-effort server revocation when an API URL is configured. Log in again if a token expires or access changes.