Skip to content

Releases: cachix/devenv

v2.1.2

13 May 20:58

Choose a tag to compare

Bug Fixes

  • Fixed devenv --profile <name> <subcommand> failing when the profile name shadows a subcommand (e.g. devenv --profile test test). The profile value is now consumed before clap's subcommand precedence check (#2821).
  • Fixed Nix syntax errors in devenv.nix being reported as unrelated warnings (e.g. warning: Ignoring the client-specified setting 'system'...) instead of the actual syntax error. Warning-prefixed log entries emitted before the failing operation no longer shadow the real diagnostic (#2820).
  • Fixed the shell hook's "exit on cd-out" feature silently breaking under clean.enabled = true. _DEVENV_HOOK_DIR is now always preserved across env cleaning, so the hook-spawned shell still exits when the user cds out of the project. Also aligned the fish hook's marker check with the posix one (non-empty value, not just "set").
  • Fixed TUI panic ("attempt to read state after owner was dropped") when pressing Esc with content that fits in the viewport. The Esc handler now only scrolls when the ScrollView is actually mounted, matching the existing guard on up/down navigation.
  • Fixed private cachix caches failing with HTTP 401 on nix-cache-info after the v2.1 lazy cachix refactor. apply_store_settings now sets the netrc-file global before adding substituters, so the authenticated probe Nix sends when registering a private substituter picks up the credentials written by the cachix manager.
  • Fixed devenv hook <shell> panicking with failed printing to stdout: Broken pipe (os error 32) when its downstream reader (e.g. source in devenv hook fish | source) closes the pipe before the script is fully flushed.

Improvements

  • Long log lines (structured logs, stack traces, etc.) in the TUI now wrap onto continuation rows instead of being truncated at the terminal width. Applies to both the inline log view (shown for selected/failed activities and devenv up processes) and the expanded log view, matching the default behavior of less and journalctl. Carriage returns are also stripped from captured log lines so pty-induced CRLF endings no longer move the cursor mid-row and erase rendered content (#2818).

v2.1.1

12 May 19:00

Choose a tag to compare

Bug Fixes

  • Fixed gaps in terminal scrollback during heavy output with the auto-reloading shell. Increased the size of the internal VT scrollback buffer and clear it after each flush to the native terminal, so its cap is never reached and lines are no longer dropped mid-stream due to GC (#2810).
  • $SHELL is now set to the target shell before enterShell hooks run, so scripts that branch on $SHELL see the shell the user is actually entering.
  • Fixed zoxide: infinite loop detected in the fish hook when cd is overridden to behave like z (e.g. zoxide init --cmd=cd) (#2801).
  • Fixed devenv --version and devenv -V failing with 'devenv' requires a subcommand but one was not provided. The flags now print the version and exit, matching the behavior of devenv --help (#2791).
  • Fixed devenv hook fish not activating when starting a new fish shell directly inside a project directory. The initial activation now runs on the first fish_prompt event instead of inline during source, so the spawned devenv shell inherits the real terminal as stdin instead of the closed pipe from devenv hook fish | source (#2798).
  • Fixed devenv shell skipping the user's .zshenv when launching zsh, which could mangle prompts and break .zshrc configurations that depend on env vars defined in .zshenv. The user's .zshenv is now sourced before .zshrc during shell init, matching zsh's documented startup order (#2802).
  • Fixed the bash/zsh shell hook (devenv hook bash/zsh) re-launching devenv shell on every prompt redraw after the user interrupted a slow eval with Ctrl-C. The hook now caches $PWD before launching the subshell, so an aborted or failed activation no longer retries until the user cds away and back.

Improvements

  • devenv shell now registers zsh completions from packages in the devenv profile. A generated .zshenv prepends $DEVENV_PROFILE/share/zsh/site-functions to fpath before /etc/zshrc runs, so the system compinit picks up the new directory.
  • Bumped secretspec to v0.10.1. The new bws (Bitwarden Secrets Manager) feature is not enabled because its transitive bitwarden crate conflicts with sqlx 0.8 on libsqlite3-sys and pins typenum to 1.18.
  • Bumped iocraft to 0.8.2 and switched the [patch.crates-io] entry from the cachix/iocraft fork to upstream ccbrown/iocraft main, now that the row-level diff and stderr rendering patches are merged upstream.
  • devenv.yaml options are now documented in snake_case (e.g. allow_unfree, clean_env). The previous camelCase spellings remain supported for backward compatibility.

Breaking Changes

v2.1

05 May 13:54

Choose a tag to compare

Bug Fixes

  • Fixed dynamic process port allocation reusing stale eval/build-cache entries without replaying port reservations, which could make parallel devenv up instances both try the same base port (#2779).
  • Fixed exec_if_modified task checks walking the filesystem twice per run.
  • Fixed set: Tried to change the read-only variable "PWD" and "SHLVL" errors in fish after devenv shell reloads.
  • Fixed wrong background color in TUI apps (e.g. neovim) inside devenv shell. Cells the app cleared with a custom background now keep that color instead of falling back to the terminal default.
  • Nested substituter nix-cache-info downloads under "Configuring cachix".
  • Fixed TUI rendering glitches during lock validation, and nested fetch activities (e.g. tarball downloads) under "Validating lock".
  • Fixed TUI freezing while cachix finishes uploading on shell entry. Push progress is now visible during cleanup.
  • Fixed cachix push progress stuck at 0/N. Already-cached paths now count toward progress.
  • Fixed tracked path log lines showing as dot-prefixed rows under "Evaluating shell" in the TUI instead of attaching to the eval activity.
  • Fixed "suspicious ownership" errors when using Nix installed in single-user mode. Nix requires read-only group permissions on outputs (#2751).
  • Fixed hot reload not watching files transitively imported by devenv.nix (e.g. imports = [ ./nested/child.nix ]).
  • Fixed the root devenv.nix being imported twice when devenv.yaml imported a sub-project that also had its own devenv.yaml (#2755).
  • Fixed devenv shell and devenv build failing with path '...drv' is required, but there is no substituter that can build it after the cached derivation was garbage-collected. The stale eval-cache entry is now invalidated when its referenced store paths no longer exist, forcing a re-evaluation that re-materializes the .drv on disk.
  • Fixed hot reload missing file and directory changes that occurred during a build or during the brief gap between watch refreshes. The reload watcher now tracks path state (file/directory/missing) across reload cycles, queues deferred events while a build is in progress, and reconciles drift after rewatching so missed changes still trigger a follow-up rebuild.
  • Fixed MCP server segfault on exit by waiting for the cache init thread to finish before exiting (#2699).
  • Fixed independent oneshot tasks (e.g. devenv:files and devenv:python:virtualenv) running sequentially instead of in parallel, causing unnecessary waterfall delays during devenv shell startup.
  • Fixed nix build failing with E0463: can't find crate for devenv_reload by switching the iocraft [patch.crates-io] entry to the row-level-diff branch, which carries iocraft 0.8.0. The previous cachix branch was stuck at 0.7.18 so the patch no longer applied, leaving two iocraft versions in the dependency graph and causing rustc metadata hash mismatches.
  • Fixed processes.<name>.watch restarting processes multiple times for a single burst of queued file watcher events by draining the watch queue before restart (#2735).
  • Fixed processes.<name>.watch restarting processes on read-only access, directory listing, and metadata-only file events (#2734).
  • Fixed imports overriding the base project's inputs (e.g. inputs.nixpkgs.url) instead of the base config taking precedence (#2728).
  • Fixed Boehm GC "Repeated allocation of very large block" warnings being printed to stderr during devenv shell.
  • Fixed devenv hook not changing directory when cding out of a devenv project. The shell would deactivate but remain in the project directory instead of following the user to the target directory.
  • Fixed devenv hook fish causing infinite recursion / hang when entering a devenv project, because the nested fish -c invocation re-sourced ~/.config/fish/config.fish which re-ran the hook. The nested fish now uses --no-config (#2741).
  • Fixed cachix daemon failing to start because the evaluated store path for the cachix binary was never realized. Now uses the cachix bundled with devenv via PATH, falling back to evaluating cachix.binary only when needed.
  • Fixed warning messages from Nix not being forwarded and displayed during evaluation.
  • Fixed devenv test leaving orphaned processes after test failures by ensuring processes are always stopped before propagating errors.
  • Fixed adding a new input to devenv.yaml causing all existing inputs to be re-fetched instead of only resolving the new one (#2688).
  • Fixed processes.<name>.watch.paths not triggering process restarts because Nix paths were serialized as store paths instead of source directory paths (#2657).
  • Fixed cursor shape escape sequences (DECSCUSR) not being forwarded to the terminal in devenv shell, which caused programs like neovim to not change cursor shape between modes (e.g. block in normal mode, bar in insert mode).
  • Fixed shift+mouse configuration (XTSHIFTESCAPE) not being forwarded to the terminal in devenv shell.
  • Fixed devenv shell hanging indefinitely when exiting the shell during a hot-reload build by interrupting the lingering Nix evaluation on shutdown.
  • Fixed devenv repl broken TUI output and hanging evaluation by adding proper TUI handoff support, showing evaluation progress in the TUI before handing the terminal to the interactive REPL.
  • Fixed Ghostty shell integration not working in devenv shell by sourcing ghostty.bash from the rcfile when GHOSTTY_RESOURCES_DIR is set.
  • Fixed TUI panic when expanding error details containing multi-byte UTF-8 characters (e.g. miette underlines) by using character-based truncation instead of byte-based slicing.
  • Fixed devenv:git-hooks:install in linked worktrees and submodules by updating rolling to prek 0.3.9, which honors repo-local and worktree-local core.hooksPath.
  • Fixed devenv processes stop removing the process from the manager state, making it impossible to start or restart afterwards.
  • Fixed process exec probes failing with "No such file or directory" during devenv test when a task depends on a process (e.g. after = [ "devenv:processes:postgres" ]), because the bash path was not resolved for the enterTest task runner (#2713).
  • Fixed processes with restart = "never" not satisfying @completed task dependencies, causing a hot loop and dependencies to never resolve (#2712).
  • Fixed TUI hiding Nix evaluation error details, showing only a failure mark without the actual error message (#2720). Failed Evaluating activities now auto-fetch and display their propagated error logs.

Improvements

  • The TUI now shuts down ~50ms faster.
  • TUI operation activities (Configuring shell, Configuring cachix, Loading tasks, etc.) now nest under their parent activity instead of being forced to the top level. "Configuring cachix" appears as a child of "Configuring shell" (next to "Evaluating shell"), reflecting that cachix setup runs as part of shell configuration.
  • "Validating lock" is now visible in the TUI by default instead of hidden behind the Debug filter.
  • Sped up devenv shell startup on projects with many cached input paths by batching file watcher registration into a single pathset update and readiness wait, instead of reconciling the pathset once per path. This removes long hangs before enterShell on large inputs.
  • Fixed port allocation values (config.processes.<name>.ports.<port>.value) resolving to the base allocate port in devenv shell, devenv tasks run, and other commands. When the native process manager is running, port values now match the ports allocated by devenv up (#2710).
  • Standardized keyboard shortcut notation across devenv up TUI and devenv shell to use consistent Ctrl-E format instead of mixed ^e/Ctrl-Alt-E styles. macOS now shows Opt instead of Alt (#2736).
  • Auto-detect AI coding agents (via CLAUDECODE, OPENCODE_CLIENT, and AI_AGENT environment variables) and enable quiet mode to avoid wasting LLM tokens on TUI progress output. Override with --verbose, --tui, or set DEVENV_NO_AI_AGENT=1 to disable detection entirely (#2723).
  • Always enable Nix's show-trace setting so full evaluation stack traces are shown on error, instead of a truncated trace suggesting the nonexistent --show-trace flag (#2725).
  • Upgraded Nix to 2.34, bringing multithreaded tarball unpacking, evaluator performance improvements, and REPL enhancements.
  • Added require_version field to devenv.yaml to enforce a devenv CLI version. Set to true to match the modules version, or use a constraint string like ">=2.1" (#2391).
  • Added Ctrl-X keybinding to stop individual processes from the TUI while keeping them visible and restartable.
  • Added Ctrl-H keybinding to toggle hiding stopped processes in the TUI. Failed processes remain visible, and the process count shows how many are hidden (#2692).
  • Tasks can now display messages when entering the shell by writing {"devenv":{"messages":["..."]}} to $DEVENV_TASK_OUTPUT_FILE (#2500).
    ...
Read more

v2.0.6

22 Mar 08:42

Choose a tag to compare

Bug Fixes

  • Fixed task cache initialization failing with "unable to open database file" when the state directory does not yet exist.
  • Fixed cachix daemon log output leaking into and corrupting the TUI display by capturing daemon stderr and forwarding it through the push activity (#2648).
  • Fixed devenv test hanging when a process outputs non-UTF-8 bytes by using lossy UTF-8 decoding instead of closing the pipe, which caused a deadlock between the parent waiting for the child to exit and the child blocking on a full stdout pipe (#2590).
  • Fixed hot reload sometimes picking up stale configuration or crashing due to the old Nix evaluator not being fully cleaned up before creating a new one. Errors during reload are now reported instead of silently breaking subsequent evaluations.
  • Fixed DEVENV_TUI=false and DEVENV_TUI=0 not disabling the TUI (#2646).
  • Migrated certificates and hosts modules to use tasks instead of process.manager.before/process.manager.after for the native process manager (#2569).
  • Fixed stale shell eval cache entries causing devenv shell and direnv activation to ignore changes to devenv.nix config such as languages, env, packages, and scripts (#2643).
  • Fixed services failing to start with E2BIG when the shell environment is large by moving env/cwd/stdio setup from the bash wrapper script to the spawned process directly (#2638).
  • Fixed processes failing to start when exported bash functions are present in the environment (#2587).
  • Fixed eval cache storing inconsistent port allocations across different cached attributes (#2631).
  • Fixed stale eval cache invalidation for devenv up process config changes caused by overlapping evaluations clearing each other's file dependency observers (#2632).
  • Fixed strict port restarts failing with "port already in use" when the kernel hasn't released the socket yet after process shutdown, by distinguishing ownerless transient conflicts from real ones and retrying accordingly (#2647).
  • Fixed false-positive --strict-ports failures on macOS when IPv6 loopback binding returns a benign error after a clean shutdown and cache invalidation (#2640).
  • Fixed child processes being left running on shutdown when using non-native process managers like process-compose (#2586).
  • Fixed devenv update resolving stale revisions when Nix's fetcher cache contains outdated entries by setting tarball-ttl to 0 during update, equivalent to nix --refresh (#2616).
  • Fixed Nix backend initialization crash when impure: true by removing use of nonexistent impure Nix setting; impure mode now works by skipping pure-eval (which defaults to false).
  • Fixed execIfModified glob walker entering gitignored directories, causing extreme slowdowns in repos with large ignored trees (#2588).
  • Fixed devenv up -d not keeping processes running with the native process manager by spawning a daemon via re-exec instead of fork, which is unsafe in multithreaded programs (#2630).
  • Fixed environment variable precedence in process manager: per-process env now correctly wins over global env.
  • Fixed hot reload triggering a fork bomb by ignoring file change events while a build is already in progress, preventing cascading zombie builds.

Improvements

  • The TUI now shows a "stopping" status during graceful process shutdown (#2647).
  • Process stop_all() now stops processes concurrently instead of serially (#2647).
  • --quiet now disables the TUI and suppresses all output except warnings and errors (#2617).
  • Bumped Nix input to fix devenv shell failing with "suspicious ownership or permission" on single user Nix installations where umask causes store outputs to have incorrect permissions (#2585).
  • Containers now report all missing inputs at once instead of one at a time (#2598).
  • Extracted container, search, and gc methods from devenv.rs into separate submodule files for better code organization.
  • Added allowUnsupportedSystem option for devenv.yaml to allow packages not supported on the current system. Can be set at the top level, under nixpkgs, or per platform via nixpkgs.per-platform.<system> (#2639).
  • Added new nixpkgs config options to devenv.yaml: allowNonSource, allowlistedLicenses, blocklistedLicenses, and androidSdk.acceptLicense (#2634).
  • Added allowInsecurePredicate generation from permittedInsecurePackages so insecure package allowlisting works correctly.

Breaking Changes

  • process.manager.before/process.manager.after: These options are no longer supported with the native process manager. Use tasks with before/after dependencies instead. See https://devenv.sh/tasks/

v2.0.5

16 Mar 23:01

Choose a tag to compare

Improvements

  • Show a quit prompt on first Ctrl+C in the TUI instead of immediately terminating (#2607).
  • Patched Nix to avoid hitting GitHub rate limits when fetching flake inputs (upstreamed as NixOS/nix#15470).
  • Improved eval performance by caching the initial Nix Value, avoiding re-evaluation of nixpkgs and the module system on subsequent attribute lookups (~2x time-to-shell improvement).
  • devenv-run-tests: --only and --exclude now support glob patterns (e.g. --only 'python-*').

Bug Fixes

  • Fixed devenv test not running enterTest tasks (e.g., git-hooks:run) in devenv 2.0+. Also: devenv test now fails early when enterTest tasks fail, and skips redundant load_tasks() when tasks are already handled.
  • Fixed file watcher dropping change events during the initial bootstrap file flood by switching from try_send to backpressure, which caused devenv.nix changes to go undetected during hot reload.
  • Fixed exec_if_modified performance when negation patterns were used, avoiding a full walk of the parent directory for literal file paths.
  • Fixed child processes (postgres, redis, etc.) being left running after devenv up exits or devenv processes down is called. The native manager wrapper now forwards TERM/INT signals to the child process group, and the process-compose backend creates a proper process group for signaling (#2619).
  • Fixed secretspec prompting for secrets in non-interactive contexts like direnv.
  • Fixed devenv search showing truncated package names (e.g. pkgs. instead of pkgs.ncdu).
  • Fixed runtime directory path (devenv-<hash>) being inconsistent on macOS when paths contain symlinks (e.g. /tmp vs /private/tmp), which could cause processes to look for sockets in the wrong directory.
  • Fixed TUI hanging when the backend encounters an error in the PTY shell path (e.g. Nix evaluation failure).
  • Fixed nix run trying to run devenv-wrapped which doesn't exist.
  • Fixed in-band resize events being sent to the shell when the app did not opt-in to receiving them.
  • Fixed a packaging error in nixpkgs that resulted in the macOS builds of devenv to include two conflicting copies of the Boehm GC (#2552, #2576).
  • Fixed devenv init, devenv test, and secretspec hint messages being silently dropped due to missing user-message marker.

v2.0.4

11 Mar 23:27

Choose a tag to compare

Bug Fixes

  • Fixed files and other task-based features not working via direnv in devenv v2 because devenv direnv-export did not run enterShell tasks (#2602).
  • Fixed devenv shell hanging in certain CI environments by requiring both stdin and stdout to be a real terminal before launching the PTY reload shell (#2597).
  • Added a timeout to the terminal cursor position query to prevent hangs in PTY environments that don't respond to DSR queries.
  • Fixed process dependencies not being respected in the native process manager (#2554).
  • Fixed execIfModified task cache not invalidating when a previously watched file is deleted, renamed, or moved outside the glob pattern (#2577).
  • Fixed task exports (e.g. VIRTUAL_ENV, PATH from venv) not being set in the reload shell.
  • Fixed port allocation not detecting ports bound to 0.0.0.0 or [::], causing multiple devenv instances to allocate the same port (#2567).
  • Fixed cursor position requests not being passed through in the shell (#2570).
  • Fixed "Threads explicit registering is not previously enabled" crash on some Nix versions by calling GC_allow_register_threads() after libexpr_init() (#2576).
  • Fixed -O packages:pkgs causing infinite recursion by using NixOS module system merging instead of self-referencing config.packages.
  • Fixed --clean shell environment capture keeping all host variables except the keep list (inverted filter).
  • Fixed devenv search output being drawn directly to stdout over the TUI.
  • Fixed the shell not forwarding several terminal escape sequences (DA2, DA3, XTVERSION, DCS, DECRQM, Kitty keyboard protocol, XTMODIFYOTHERKEYS, mouse modes, and color scheme reporting), which broke TUI programs like neovim and helix.
  • Fixed the shell not cleaning up Kitty keyboard protocol and XTMODIFYOTHERKEYS state on exit, which left the terminal in a broken state after a program crash.
  • Fixed the shell not sending in-band resize notifications (mode 2048) through the PTY, which caused programs that rely on this protocol to miss resize events.
  • Fixed the shell forwarding text area size queries (CSI 18 t) to the real terminal, which returned incorrect dimensions that included the status line row.
  • Fixed the devenv main thread and REPL thread using the default stack size instead of 64MB, which could cause stack overflows during deep Nix evaluations.
  • Fixed TUI sometimes overwriting the shell prompt/command line after commands like devenv update, caused by cancelling iocraft's render loop mid-frame.

Improvements

  • Added strictPorts option to devenv.yaml for configuring strict port mode as a project default, along with --no-strict-ports CLI flag to override it (#2606).
  • Bumped secretspec to 0.8.0 and enabled all provider features (Google Cloud Secret Manager, AWS Secrets Manager, HashiCorp Vault).
  • Replaced stdout based DEVENV_EXPORT: protocol in tasks with file based exports ($DEVENV_TASK_EXPORTS_FILE), simplifying the encoding and moving JSON construction into Rust.
  • Task exports are now always produced, including when a task is skipped via its status command.
  • Validation errors for @ready process dependencies now include a link to the documentation.

Breaking Changes

  • Removed devenv-tasks export subcommand, replaced by file-based exports via $DEVENV_TASK_EXPORTS_FILE.

v2.0.3

06 Mar 17:44

Choose a tag to compare

Bug Fixes

  • Fixed devenv test conflicting with older pinned devenv modules that set devenv.state without lib.mkDefault.
  • Removed debug watchexec logs from showing up in --no-reload shells.
  • Fixed TUI colors being unreadable on light terminal backgrounds.
  • Disabled the PTY in non-interactive environments (CI) preventing the shell from hanging.
  • Fixed navigateExclusion ranges overlap error in the Nix backend (#2552).
  • Increased thread stack size to 64MB to prevent stack overflows during deep Nix evaluations (#2555).

v2.0.2

05 Mar 14:52

Choose a tag to compare

Bug Fixes

  • Fixed devenv test not using the eval cache due to a temporary state directory being created on every run.
  • Fixed TUI overflow being sent to scrollback instead of being clipped
  • Fixed first Esc keypress being swallowed in shell reload mode (#2548).
  • Fixed TUI displaying incorrect expected download count.
  • Fixed TCP readiness probes only checking IPv4, causing hangs when processes bind to IPv6 loopback (#2549).

v2.0.1

04 Mar 06:26

Choose a tag to compare

Bug Fixes

  • Fixed TUI panic when navigating up/down with many processes (#2542).
  • Fixed exec readiness probes not inheriting the process environment (e.g. PGDATA, PGHOST), causing probes to always fail.

Improvements

  • TUI now displays the readiness probe type when a process is in the starting state (e.g. starting (exec: pg_isready) or starting (http: localhost:8080/health)).

v2.0

03 Mar 22:19

Choose a tag to compare