Drift CLIOperate Drift with explicit commands

Environment reference

Use these variables for automation and credential injection.

VariablePurpose
DRIFT_CONFIGExplicit configuration file path.
DRIFT_PROFILESelected configuration profile.
DRIFT_ENDPOINTDrift base URL override.
DRIFT_OUTPUThuman or json.
DRIFT_API_KEYBearer key for authenticated commands.

An authenticated command resolves its credential in this order:

  1. standard input when --key-stdin is present;
  2. DRIFT_API_KEY;
  3. the variable named by the selected profile's credential_env.

Empty variables are errors rather than silent fallbacks. status requires no credential.