Daniel Roy Greenfeld: TIL: Loading .env files with uv run
We don't need python-dotenv, useuv runwith--env-file, and your env vars from.envget loaded.
For example, if we've got a FastAPI or Air project we can run it locally with env vars like:
You can specific different env files for different environments, like.env.dev,.env.prod, etc.
All credit goes toAudrey Roy Greenfeldfor pointingthis out to me.
https://daniel.feldroy.com/posts/til-2025-09-env-files-with-uv-run