<@ULVA73B9P> prefect config set option sets the en...
# ask-marvin
r
@Marvin prefect config set option sets the environment variable in the host? i,.e outside virtual env?
m
thought for 133.2 seconds
Short answer: no.
prefect 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:
Copy code
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