# devenv **Repository Path**: mirrors_trending/devenv ## Basic Information - **Project Name**: devenv - **Description**: Fast, Declarative, Reproducible, and Composable Developer Environments using Nix - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-18 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
# [devenv.sh](https://devenv.sh) - Fast, Declarative, Reproducible, and Composable Developer Environments [](https://devenv.sh) [](https://builtwithnix.org) [](https://discord.gg/naMgvexb6q)  [](https://github.com/cachix/devenv/releases) [](https://github.com/cachix/devenv/actions/workflows/release.yml?branch=main) ## Features ### Developer experience - **[Terminal UI](https://devenv.sh/blog/2026/03/05/devenv-20-a-fresh-interface-to-nix/#terminal-ui)** with live build progress, task hierarchy, and error details - **[Native shell reloading](https://devenv.sh/blog/2026/03/05/devenv-20-a-fresh-interface-to-nix/#native-shell-reloading)** that rebuilds in the background while your shell stays interactive - **[Instant environments](https://devenv.sh/blog/2024/10/03/devenv-13-instant-developer-environments-with-nix-caching/)** with incremental Nix evaluation caching (sub 100ms when nothing changed) - **[LSP for devenv.nix](https://devenv.sh/lsp/)** with autocomplete, hover docs, and go to definition via bundled nixd - **[Ad hoc environments](https://devenv.sh/ad-hoc-developer-environments/)** from the CLI without any config files (`--option languages.rust.enable:bool true`) - **[Out of tree devenvs](https://devenv.sh/ad-hoc-developer-environments/)** to use configs from other repos (`--from github:myorg/configs`) ### Languages, packages, and services - **[50+ languages](https://devenv.sh/languages/)** with built in tooling: compilers, LSP servers, formatters, linters, and version selection - **[100,000+ packages](https://devenv.sh/packages/)** from Nixpkgs for Linux, macOS, x64, and ARM64 (including WSL2) - **[40+ services](https://devenv.sh/services/)** like PostgreSQL, Redis, MySQL, MongoDB, Elasticsearch, Caddy, and more ### Processes and tasks - **[Native process manager](https://devenv.sh/processes/)** written in Rust with dependency ordering, restart policies, readiness probes (exec, HTTP, systemd notify), socket activation, watchdog heartbeats, and file watching - **[Automatic port allocation](https://devenv.sh/processes/#automatic-port-allocation)** that finds free ports so parallel environments never collide - **[Tasks](https://devenv.sh/tasks/)** with DAG based execution, caching, parallel runs, and namespace support - **[Scripts](https://devenv.sh/scripts/)** with access to all environment packages ### Packaging and deployment - **[OCI containers](https://devenv.sh/containers/)** built from your environment without Docker - **[Outputs](https://devenv.sh/outputs/)** for packaging apps using each language's best tools (crate2nix, uv2nix, ...) - **[Polyrepo support](https://devenv.sh/guides/polyrepo/)** to reference outputs and options across repositories ### Composition and configuration - **[Profiles](https://devenv.sh/profiles/)** for environment variants (`--profile backend --profile testing`) - **[Composable via imports](https://devenv.sh/composing-using-imports/)** to share and reuse environments across projects - **[Inputs](https://devenv.sh/inputs/)** for pinning and overriding Nix dependencies ### Security and integrations - **[SecretSpec](https://devenv.sh/integrations/secretspec/)** for declarative, provider agnostic secrets management (keyring, 1Password, dotenv) - **[Git hooks](https://devenv.sh/git-hooks/)** via git-hooks.nix with pre configured formatters and linters - **[Testing](https://devenv.sh/tests/)** with `devenv test` that automatically starts and stops processes - **[direnv integration](https://devenv.sh/integrations/direnv/)** for automatic shell activation when entering a directory - **[MCP server](https://devenv.sh/mcp/)** for AI assistant integration (package and option search) - **[AI generation](https://devenv.new)** to scaffold environments from a natural language description ## Quick start Running ``devenv init`` generates ``devenv.nix``: ```nix { pkgs, lib, config, inputs, ... }: { # https://devenv.sh/basics/ env.GREET = "devenv"; # https://devenv.sh/packages/ packages = [ pkgs.git ]; # https://devenv.sh/languages/ # languages.rust.enable = true; # https://devenv.sh/processes/ # processes.dev.exec = "${lib.getExe pkgs.watchexec} -n -- ls -la"; # https://devenv.sh/services/ # services.postgres.enable = true; # https://devenv.sh/scripts/ scripts.hello.exec = '' echo hello from $GREET ''; # https://devenv.sh/basics/ enterShell = '' hello # Run scripts directly git --version # Use packages ''; # https://devenv.sh/tasks/ # tasks = { # "myproj:setup".exec = "mytool build"; # "devenv:enterShell".after = [ "myproj:setup" ]; # }; # https://devenv.sh/tests/ enterTest = '' echo "Running tests" git --version | grep --color=auto "${pkgs.git.version}" ''; # https://devenv.sh/outputs/ # outputs = { # rust-app = config.languages.rust.import ./rust-app {}; # python-app = config.languages.python.import ./python-app {}; # }; # https://devenv.sh/git-hooks/ # git-hooks.hooks.shellcheck.enable = true; # See full reference at https://devenv.sh/reference/options/ } ``` And ``devenv shell`` activates the environment. ## Commands ``` $ devenv https://devenv.sh 2.0.0: Fast, Declarative, Reproducible, and Composable Developer Environments Usage: devenv [OPTIONS] [COMMAND] Commands: init Scaffold devenv.yaml, devenv.nix, and .gitignore. generate Generate devenv.yaml and devenv.nix using AI shell Activate the developer environment. https://devenv.sh/basics/ update Update devenv.lock from devenv.yaml inputs. http://devenv.sh/inputs/ search Search for packages and options in nixpkgs. https://devenv.sh/packages/#searching-for-a-file info Print information about this developer environment. up Start processes in the foreground. https://devenv.sh/processes/ processes Start or stop processes. https://devenv.sh/processes/ tasks Run tasks. https://devenv.sh/tasks/ test Run tests. http://devenv.sh/tests/ container Build, copy, or run a container. https://devenv.sh/containers/ inputs Add an input to devenv.yaml. https://devenv.sh/inputs/ changelogs Show relevant changelogs. repl Launch an interactive environment for inspecting the devenv configuration. gc Delete previous shell generations. See https://devenv.sh/garbage-collection build Build any attribute in devenv.nix. eval Evaluate any attribute in devenv.nix and return JSON. direnvrc Print a direnvrc that adds devenv support to direnv. See https://devenv.sh/integrations/direnv/. version Print the version of devenv. mcp Launch Model Context Protocol server for AI assistants lsp Start the nixd language server for devenv.nix. help Print this message or the help of the given subcommand(s) Input overrides: --from