devenv
Fast, Declarative, Reproducible, and Composable Developer Environments using Nix
What is devenv?
Fast, Declarative, Reproducible, and Composable Developer Environments using Nix
Overview of devenv
What it is
devenv is a command-line tool that provides fast, declarative, reproducible, and composable developer environments using Nix. It is open source under the Apache-2.0 license and is developed by Cachix. The tool aims to simplify environment setup and management for developers across different projects and languages.
Key features
- Terminal UI with live build progress, task hierarchy, and error details
- Native shell reloading that rebuilds in the background while the shell stays interactive
- Instant environments with incremental Nix evaluation caching (sub 100ms when nothing changed)
- LSP for devenv.nix with autocomplete, hover docs, and go to definition via bundled nixd
- Ad hoc environments from the CLI without any config files
- 50+ languages with built-in tooling: compilers, LSP servers, formatters, linters, and version selection
- 100,000+ packages from Nixpkgs for Linux, macOS, x64, and ARM64 (including WSL2)
- 40+ services like PostgreSQL, Redis, MySQL, MongoDB, Elasticsearch, Caddy, and more
- Native process manager written in Rust with dependency ordering, restart policies, readiness probes, socket activation, watchdog heartbeats, and file watching
- Automatic port allocation that finds free ports so parallel environments never collide
- Tasks with DAG based execution, caching, parallel runs, and namespace support
- Scripts with access to all environment packages
- OCI containers built from your environment without Docker
- Outputs for packaging apps using each language's best tools (crate2nix, uv2nix, ...)
- Polyrepo support to reference outputs and options across repositories
- Profiles for environment variants
- Composable via imports to share and reuse environments across projects
- Inputs for pinning and overriding Nix dependencies
- SecretSpec for declarative, provider agnostic secrets management (keyring, 1Password, dotenv)
- Git hooks via git-hooks.nix with pre configured formatters and linters
- Testing with
devenv testthat automatically starts and stops processes- direnv integration for automatic shell activation when entering a directory - MCP server for AI assistant integration (package and option search)
- AI generation to scaffold environments from a natural language description
Use cases
devenv is suitable for developers who need reproducible and composable development environments across multiple projects. It can be used for setting up language-specific toolchains, managing services like databases and caching layers, running tasks with dependency ordering, building OCI containers, and integrating with AI assistants. The tool supports polyrepo setups and allows sharing environment configurations across teams.
Getting started
devenv initThis generates devenv.nix. Then run:devenv shellFor more details, see the repository README.
License and pricing
devenv is licensed under Apache-2.0 and is open source. No pricing information is stated.
Based on the project's public README and repository metadata.