DF_USERNAME

Username for control-plane authentication. Default: admin@deltaforge.local.

Category: environment-variables

Syntax

DF_USERNAME=<USER>

Description

## Overview `DF_USERNAME` supplies the identity used when the CLI logs in to the control plane. It is read at startup and fed into the authentication flow alongside `DF_PASSWORD`. On its own it does not suppress the interactive prompt; only `DF_PASSWORD` (or `--password`) marks credentials as explicit. ## Behavior - Read by `std::env::var("DF_USERNAME")` at CLI startup via `CliConfig::from_env`. - Default when unset and no profile is loaded: `admin@deltaforge.local`. - Overridden at runtime by `--username`. Overrides `username` in the active profile. - Accepted in email form (`user@tenant`) or plain local form depending on the control plane's auth backend. ## Resolution - `--username` flag (highest) - `DF_USERNAME` - `username` in the active profile of `~/.deltaforge/config.toml` - Built-in default `admin@deltaforge.local` (lowest)

Examples

# Service account for a scripted run
DF_USERNAME=svc@deltaforge.local DF_PASSWORD=... delta-forge-cli auth
# Export for a shell session used by automation
export DF_USERNAME=ci-runner@deltaforge.local
# Read from a password store alongside the password
export DF_USERNAME=$(pass show deltaforge/prod/username)
export DF_PASSWORD=$(pass show deltaforge/prod/password)
delta-forge-cli run nightly.sql
# GitHub Actions workflow step
- name: Apply migrations
  env:
    DF_CONTROL_URL: ${{ secrets.DF_CONTROL_URL }}
    DF_USERNAME: ${{ secrets.DF_USERNAME }}
    DF_PASSWORD: ${{ secrets.DF_PASSWORD }}
  run: delta-forge-cli run migrations/

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →