Select a named profile from `~/.deltaforge/config.toml`. Overrides `default_profile`.
--profile <NAME>
## Overview `--profile` selects a `[profiles.<name>]` block from `~/.deltaforge/config.toml` and uses its values as the baseline for this invocation. Profiles carry connection details (`control_url`, `compute_url`) and an optional `username` so that switching between environments, for example local, staging, and production, requires a single flag rather than three env vars. The config file also has a top-level `default_profile` key. When `--profile` is omitted, that default is applied. `--profile` always wins over `default_profile`. ## Behavior - The profile name is matched case-sensitively against `[profiles.<name>]` sections in `~/.deltaforge/config.toml`. - If the named profile does not exist, the CLI falls back to the built-in defaults and continues without loading profile values. - Profile values are treated as the baseline. Env vars (`DF_CONTROL_URL`, `DF_COMPUTE_URL`, `DF_USERNAME`, `DF_PASSWORD`) override the profile, and explicit command-line flags override env vars. - Profiles do not store passwords. The password still comes from `--password`, `DF_PASSWORD`, or the interactive prompt. - `--profile` affects every subcommand, not just REPL launches. `query`, `run`, `auth`, and `health` all honour it. ## Compatibility Resolution order for any config value: command-line flag, environment variable, profile value, built-in default. `--profile` only affects the third tier; earlier tiers still win when they are set.
# Enter the shell using the production profile
delta-forge-cli --profile production
# Run a one-shot query under a named profile
delta-forge-cli --profile staging query SELECT 1
# Short form, combined with a script run
delta-forge-cli -p dev run seed.sql
# Mix profile for connection details with explicit credentials
delta-forge-cli --profile production --username ci@example.com --password $CI_PASS run migrations.sql
# Override the profile's control URL for a single invocation
delta-forge-cli --profile production --control-url https://control-canary.example.com health