Help us improve
Share bugs, ideas, or general feedback.
From nix-dev
Use for devenv.sh developer environment patterns including devenv.nix, devenv.yaml, devenv shell, devenv up, devenv init, devenv test, devenv languages, devenv processes, devenv services, pre-commit hooks in devenv, cachix caching, devenv.lock, direnv integration, ad-hoc nix environments, or enterShell configuration.
npx claudepluginhub jylhis/claude-marketplace --plugin nix-devHow this skill is triggered — by the user, by Claude, or both
Slash command
/nix-dev:devenvThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
[devenv](https://devenv.sh) provides declarative developer environments using Nix without requiring deep Nix knowledge.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Structures git workflow practices for committing, branching, resolving conflicts, and organizing work across parallel streams. Use when making any code change.
Share bugs, ideas, or general feedback.
devenv provides declarative developer environments using Nix without requiring deep Nix knowledge.
project/
├── devenv.nix # Main configuration
├── devenv.yaml # Inputs (nixpkgs, etc.)
├── devenv.lock # Pinned versions (commit this)
├── .devenv/ # Generated (gitignore this)
└── .envrc # direnv integration (optional)
{ pkgs, lib, config, ... }:
{
# Packages available in the shell
packages = with pkgs; [
git
curl
jq
];
# Environment variables
env = {
DATABASE_URL = "postgresql://localhost/dev";
RUST_LOG = "debug";
};
# Shell startup hook
enterShell = ''
echo "Welcome to the dev environment"
git status
'';
}
devenv has built-in support for many languages:
{
languages.rust = {
enable = true;
channel = "stable"; # or "nightly", "beta"
};
languages.python = {
enable = true;
version = "3.12";
venv.enable = true;
venv.requirements = ./requirements.txt;
};
languages.go.enable = true;
languages.javascript = {
enable = true;
npm.enable = true;
};
languages.typescript.enable = true;
languages.nix.enable = true; # Adds nil LSP, nixfmt, statix
}
Run infrastructure locally:
{
services.postgres = {
enable = true;
initialDatabases = [{ name = "myapp"; }];
listen_addresses = "127.0.0.1";
};
services.redis.enable = true;
services.minio = {
enable = true;
buckets = [ "uploads" ];
};
}
Start services with devenv up.
Define custom long-running processes:
{
processes = {
server.exec = "cargo run -- serve";
worker.exec = "cargo run -- worker";
frontend.exec = "cd frontend && npm run dev";
};
}
Run with devenv up alongside services.
{
pre-commit.hooks = {
nixfmt-rfc-style.enable = true;
rustfmt.enable = true;
clippy.enable = true;
shellcheck.enable = true;
actionlint.enable = true;
};
}
{
enterTest = ''
echo "Running tests"
cargo test
'';
}
Run with devenv test.
Controls inputs and imports:
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixos-unstable
imports:
- ./backend/devenv.nix
- ./frontend/devenv.nix
devenv init # Initialize new devenv project
devenv shell # Enter the dev shell
devenv shell -- <cmd> # Run command in dev shell
devenv up # Start services and processes
devenv test # Run enterTest
devenv update # Update inputs
devenv info # Show environment info
devenv gc # Garbage collect old generations
devenv search <pkg> # Search for packages
For quick one-off environments without creating files:
devenv -O languages.rust.enable:bool true shell -- cargo --version
devenv -O packages:pkgs "ripgrep fd" shell -- rg --version
Add .envrc for automatic shell activation:
# .envrc
source_url "https://raw.githubusercontent.com/cachix/devenv/main/direnv-support.sh" ""
use devenv
Then direnv allow.
{
cachix.push = "mycache"; # Push builds to Cachix
cachix.pull = [ "mycache" "nix-community" ]; # Pull from caches
}
Use devenv.yaml imports or conditional configuration for different setups (e.g., CI vs local).