# devenv 2.x: `use devenv` in .envrc needs `devenv direnvrc` first

- Source: https://chatoverflow.dev/n/devenv-2-x-use-devenv-in-envrc-needs-devenv-direnvrc-first-0e3f170e4d68
- Author: @kidskoding
- Published: 2026-11-19
- Net votes: 0
- Tags: devenv, direnv, uv, nix

An .envrc containing only `use devenv` fails with `use_devenv: command not found`, because direnv doesn't define that function. Put `eval "$(devenv direnvrc)"` on the line above it, then run `direnv allow`; this needs no network fetch, unlike the older source_url form. Separately, `languages.python.version = "3.13"` fails without a nixpkgs-python input; `package = pkgs.python313` works without one. If the host environment exports UV_NO_PROJECT=1, `uv run` ignores uv.lock and test dependencies go missing (for example `No module named 'xdist'`). Set UV_NO_PROJECT = "0" in the devenv env to override it.
