explaingit

cachix/devenv

6,779RustAudience · developerComplexity · 3/5Setup · moderate

TLDR

A tool that sets up consistent, reproducible developer environments, languages, databases, and services, from one config file, powered by Nix under the hood but without requiring Nix knowledge.

Mindmap

mindmap
  root((devenv))
    What it does
      Reproducible envs
      One-command setup
      No conflicts
    Languages
      50 plus languages
      Compilers
      Formatters
    Services
      PostgreSQL
      Redis
      MySQL
    Features
      Fast activation
      Direnv integration
      Container export
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Define a project's full stack, Node.js, PostgreSQL, Redis, in one config file so any team member gets the exact same environment with one command.

USE CASE 2

Switch between project branches that require different compiler or language versions without conflicts with other projects.

USE CASE 3

Export a development environment as a container image without needing Docker installed.

USE CASE 4

Automatically activate the correct project environment when entering a directory using the direnv integration.

Tech stack

RustNixDirenv

Getting it running

Difficulty · moderate Time to first run · 30min

Requires installing Nix first, which takes a few minutes on macOS or Linux before devenv can be added.

License terms are not described in the explanation.

In plain English

devenv is a tool for setting up developer environments: the collection of programming languages, libraries, databases, and background services a project needs to run. Instead of writing setup scripts or manually installing tools, you describe what you need in a single configuration file and devenv creates a consistent environment that works the same way on any machine where devenv is installed. The tool is built on Nix, a package manager that tracks exactly which version of every tool is installed and isolates environments from each other so they do not conflict. You do not need to understand Nix to use devenv -- it provides its own simpler configuration format and handles the Nix layer for you. When you join a project or switch branches, one command gives you the correct versions of every compiler, database, and utility with no interference from other projects on the same computer. devenv supports over 50 programming languages with built-in tooling such as compilers, formatters, and editor support, drawing from a catalog of over 100,000 packages. It can also start and manage background services like PostgreSQL, Redis, and MySQL, each configured in the same file. A native process manager written in Rust handles starting and stopping those services, managing dependencies between them, and restarting them if they crash. Environment activation is fast: if nothing changed since the last run, the shell is ready in under 100 milliseconds. You can generate an initial configuration from a natural language description, load a shared configuration from another repository, or export the environment as a container image without requiring Docker. A direnv integration makes the environment activate automatically whenever you enter the project directory.

Copy-paste prompts

Prompt 1
Write a devenv.nix config for a Python 3.11 FastAPI project that starts a PostgreSQL 15 database and a Redis instance when I run devenv up.
Prompt 2
How do I add a shell hook in devenv that runs database migrations automatically every time the environment activates?
Prompt 3
Set up devenv for a Node.js 20 project with MySQL 8, and have it install npm dependencies automatically on environment activation.
Prompt 4
Walk me through using devenv to export my development environment as a container image I can push to a registry.
Prompt 5
How do I write a devenv config that loads a shared base configuration from another repository and adds project-specific services on top?
Open on GitHub → Explain another repo

← cachix on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.