devenv

Installation
SKILL.md

devenv

Use current official devenv sources, not stale model memory. devenv moves quickly and several option names differ from what older training data suggests.

This skill snapshot is written against devenv 2.1.x (verified on 2.1.2), current on 2026-06-12.

Verify the local version before relying on version-specific behavior: devenv version. If the repo or CI pins a different version, prefer that version's docs.

What devenv is (orientation)

devenv is a Nix-backed tool for declaring a project's whole dev environment in devenv.nix — packages, env vars, language toolchains, background services (databases, etc.), long-running processes, scripts, ordered tasks, git hooks, and tests. devenv.yaml declares inputs (the nixpkgs source and any extra flakes). devenv.lock pins every input to an exact revision. All three are committed. It exposes a simplified module system over Nix — you do not need flakes knowledge, but devenv.nix is a Nix file and must be valid Nix.

Start here

  1. Confirm the version and what already exists. Run devenv version. Look for devenv.nix, devenv.yaml, devenv.lock, .envrc. Read them before editing — match the existing structure and input pinning.
  2. Prefer languages.* and services.* modules over raw packages. Dropping pkgs.python312 into packages skips the integration (env vars, venv wiring, PATH ordering) that the language module sets up. Reach for packages only for plain CLI tools.
  3. Verify option names against the live reference, don't guess. The options surface is large and renames happen (e.g. the git-hooks option is git-hooks.hooks.*, not the older pre-commit.hooks.*; devenv.yaml uses snake_case allow_unfree, not allowUnfree). When unsure, search: devenv search <term> or the options reference (see references/official-sources.md).
  4. After editing, prove it evaluates. A config that looks right but doesn't build is worse than none. Run devenv info (fast, evaluates the whole config) or devenv shell true, and read the Nix error if it fails.
Installs
42
First Seen
Jun 12, 2026