Ravish Mallya
08/19/2025, 8:45 AMMarvin
08/19/2025, 8:45 AMMarvin
08/19/2025, 8:47 AMprefect config set
does not set OS environment variables.
What it does:
- Writes the setting to your active Prefect profile (a user config file), not to your shell.
- Profiles are user-scoped, typically stored in your home directory (e.g., ~/.prefect/profiles.toml
), so the setting is visible to any virtualenv that runs Prefect as that user.
- OS env vars (e.g., export PREFECT_API_URL=...
) still take precedence over profile values at runtime.
Useful commands:
prefect config set PREFECT_API_URL=<http://127.0.0.1:4200/api>
prefect config view
prefect config unset PREFECT_API_URL
prefect profile ls
prefect profile use <name>
prefect profile inspect
If you truly want host-level environment variables, set them in your shell/profile (e.g., .bashrc
, .zshrc
, system env settings). Prefect won’t do that for you—mercifully.
Docs:
- Settings and profiles