Releases: cachix/devenv
Releases · cachix/devenv
v2.1.2
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.nixbeing 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_DIRis now always preserved across env cleaning, so the hook-spawned shell still exits when the usercds 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-infoafter the v2.1 lazy cachix refactor.apply_store_settingsnow sets thenetrc-fileglobal 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 withfailed printing to stdout: Broken pipe (os error 32)when its downstream reader (e.g.sourceindevenv 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 upprocesses) and the expanded log view, matching the default behavior oflessandjournalctl. 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
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).
$SHELLis now set to the target shell beforeenterShellhooks run, so scripts that branch on$SHELLsee the shell the user is actually entering.- Fixed
zoxide: infinite loop detectedin the fish hook whencdis overridden to behave likez(e.g.zoxide init --cmd=cd) (#2801). - Fixed
devenv --versionanddevenv -Vfailing with'devenv' requires a subcommand but one was not provided. The flags now print the version and exit, matching the behavior ofdevenv --help(#2791). - Fixed
devenv hook fishnot activating when starting a new fish shell directly inside a project directory. The initial activation now runs on the firstfish_promptevent instead of inline duringsource, so the spawneddevenv shellinherits the real terminal as stdin instead of the closed pipe fromdevenv hook fish | source(#2798). - Fixed
devenv shellskipping the user's.zshenvwhen launching zsh, which could mangle prompts and break.zshrcconfigurations that depend on env vars defined in.zshenv. The user's.zshenvis now sourced before.zshrcduring shell init, matching zsh's documented startup order (#2802). - Fixed the bash/zsh shell hook (
devenv hook bash/zsh) re-launchingdevenv shellon every prompt redraw after the user interrupted a slow eval with Ctrl-C. The hook now caches$PWDbefore launching the subshell, so an aborted or failed activation no longer retries until the usercds away and back.
Improvements
devenv shellnow registers zsh completions from packages in the devenv profile. A generated.zshenvprepends$DEVENV_PROFILE/share/zsh/site-functionstofpathbefore/etc/zshrcruns, so the systemcompinitpicks up the new directory.- Bumped
secretspectov0.10.1. The newbws(Bitwarden Secrets Manager) feature is not enabled because its transitivebitwardencrate conflicts withsqlx0.8 onlibsqlite3-sysand pinstypenumto 1.18. - Bumped
iocraftto0.8.2and switched the[patch.crates-io]entry from thecachix/iocraftfork to upstreamccbrown/iocraftmain, now that the row-level diff and stderr rendering patches are merged upstream. devenv.yamloptions are now documented insnake_case(e.g.allow_unfree,clean_env). The previouscamelCasespellings remain supported for backward compatibility.
Breaking Changes
v2.1
Bug Fixes
- Fixed dynamic process port allocation reusing stale eval/build-cache entries without replaying port reservations, which could make parallel
devenv upinstances both try the same base port (#2779). - Fixed
exec_if_modifiedtask checks walking the filesystem twice per run. - Fixed
set: Tried to change the read-only variable "PWD"and"SHLVL"errors in fish afterdevenv shellreloads. - 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-infodownloads 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.nixbeing imported twice whendevenv.yamlimported a sub-project that also had its owndevenv.yaml(#2755). - Fixed
devenv shellanddevenv buildfailing withpath '...drv' is required, but there is no substituter that can build itafter 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.drvon 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:filesanddevenv:python:virtualenv) running sequentially instead of in parallel, causing unnecessary waterfall delays duringdevenv shellstartup. - Fixed
nix buildfailing withE0463: can't find crate for devenv_reloadby switching the iocraft[patch.crates-io]entry to therow-level-diffbranch, which carries iocraft 0.8.0. The previouscachixbranch 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>.watchrestarting processes multiple times for a single burst of queued file watcher events by draining the watch queue before restart (#2735). - Fixed
processes.<name>.watchrestarting processes on read-only access, directory listing, and metadata-only file events (#2734). - Fixed
importsoverriding the base project'sinputs(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 hooknot changing directory whencding 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 fishcausing infinite recursion / hang when entering a devenv project, because the nestedfish -cinvocation re-sourced~/.config/fish/config.fishwhich 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.binaryonly when needed. - Fixed warning messages from Nix not being forwarded and displayed during evaluation.
- Fixed
devenv testleaving orphaned processes after test failures by ensuring processes are always stopped before propagating errors. - Fixed adding a new input to
devenv.yamlcausing all existing inputs to be re-fetched instead of only resolving the new one (#2688). - Fixed
processes.<name>.watch.pathsnot 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 shellhanging indefinitely when exiting the shell during a hot-reload build by interrupting the lingering Nix evaluation on shutdown. - Fixed
devenv replbroken 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 shellby sourcingghostty.bashfrom the rcfile whenGHOSTTY_RESOURCES_DIRis 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:installin linked worktrees and submodules by updatingrollingtoprek 0.3.9, which honors repo-local and worktree-localcore.hooksPath. - Fixed
devenv processes stopremoving 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 testwhen 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@completedtask 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 shellstartup 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 beforeenterShellon large inputs. - Fixed port allocation values (
config.processes.<name>.ports.<port>.value) resolving to the baseallocateport indevenv shell,devenv tasks run, and other commands. When the native process manager is running, port values now match the ports allocated bydevenv up(#2710). - Standardized keyboard shortcut notation across
devenv upTUI anddevenv shellto use consistentCtrl-Eformat instead of mixed^e/Ctrl-Alt-Estyles. macOS now showsOptinstead ofAlt(#2736). - Auto-detect AI coding agents (via
CLAUDECODE,OPENCODE_CLIENT, andAI_AGENTenvironment variables) and enable quiet mode to avoid wasting LLM tokens on TUI progress output. Override with--verbose,--tui, or setDEVENV_NO_AI_AGENT=1to disable detection entirely (#2723). - Always enable Nix's
show-tracesetting so full evaluation stack traces are shown on error, instead of a truncated trace suggesting the nonexistent--show-traceflag (#2725). - Upgraded Nix to 2.34, bringing multithreaded tarball unpacking, evaluator performance improvements, and REPL enhancements.
- Added
require_versionfield todevenv.yamlto enforce a devenv CLI version. Set totrueto 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).
...
v2.0.6
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 testhanging 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=falseandDEVENV_TUI=0not disabling the TUI (#2646). - Migrated
certificatesandhostsmodules to use tasks instead ofprocess.manager.before/process.manager.afterfor the native process manager (#2569). - Fixed stale shell eval cache entries causing
devenv shellanddirenvactivation to ignore changes todevenv.nixconfig such aslanguages,env,packages, andscripts(#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 upprocess 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-portsfailures 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 updateresolving stale revisions when Nix's fetcher cache contains outdated entries by settingtarball-ttlto 0 during update, equivalent tonix --refresh(#2616). - Fixed Nix backend initialization crash when
impure: trueby removing use of nonexistentimpureNix setting; impure mode now works by skippingpure-eval(which defaults to false). - Fixed
execIfModifiedglob walker entering gitignored directories, causing extreme slowdowns in repos with large ignored trees (#2588). - Fixed
devenv up -dnot 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). --quietnow disables the TUI and suppresses all output except warnings and errors (#2617).- Bumped Nix input to fix
devenv shellfailing 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.rsinto separate submodule files for better code organization. - Added
allowUnsupportedSystemoption fordevenv.yamlto allow packages not supported on the current system. Can be set at the top level, undernixpkgs, or per platform vianixpkgs.per-platform.<system>(#2639). - Added new nixpkgs config options to
devenv.yaml:allowNonSource,allowlistedLicenses,blocklistedLicenses, andandroidSdk.acceptLicense(#2634). - Added
allowInsecurePredicategeneration frompermittedInsecurePackagesso 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 withbefore/afterdependencies instead. See https://devenv.sh/tasks/
v2.0.5
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:--onlyand--excludenow support glob patterns (e.g.--only 'python-*').
Bug Fixes
- Fixed
devenv testnot runningenterTesttasks (e.g.,git-hooks:run) in devenv 2.0+. Also:devenv testnow fails early when enterTest tasks fail, and skips redundantload_tasks()when tasks are already handled. - Fixed file watcher dropping change events during the initial bootstrap file flood by switching from
try_sendto backpressure, which causeddevenv.nixchanges to go undetected during hot reload. - Fixed
exec_if_modifiedperformance 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 upexits ordevenv processes downis 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 searchshowing truncated package names (e.g.pkgs.instead ofpkgs.ncdu). - Fixed runtime directory path (
devenv-<hash>) being inconsistent on macOS when paths contain symlinks (e.g./tmpvs/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 runtrying to rundevenv-wrappedwhich 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
Bug Fixes
- Fixed
filesand other task-based features not working via direnv in devenv v2 becausedevenv direnv-exportdid not run enterShell tasks (#2602). - Fixed
devenv shellhanging 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
execIfModifiedtask 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,PATHfrom venv) not being set in the reload shell. - Fixed port allocation not detecting ports bound to
0.0.0.0or[::], 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()afterlibexpr_init()(#2576). - Fixed
-O packages:pkgscausing infinite recursion by using NixOS module system merging instead of self-referencingconfig.packages. - Fixed
--cleanshell environment capture keeping all host variables except the keep list (inverted filter). - Fixed
devenv searchoutput 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
strictPortsoption todevenv.yamlfor configuring strict port mode as a project default, along with--no-strict-portsCLI 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
statuscommand. - Validation errors for
@readyprocess dependencies now include a link to the documentation.
Breaking Changes
- Removed
devenv-tasks exportsubcommand, replaced by file-based exports via$DEVENV_TASK_EXPORTS_FILE.
v2.0.3
Bug Fixes
- Fixed
devenv testconflicting with older pinned devenv modules that setdevenv.statewithoutlib.mkDefault. - Removed debug watchexec logs from showing up in
--no-reloadshells. - 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 overlaperror in the Nix backend (#2552). - Increased thread stack size to 64MB to prevent stack overflows during deep Nix evaluations (#2555).
v2.0.2
Bug Fixes
- Fixed
devenv testnot 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
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)orstarting (http: localhost:8080/health)).