Ad-hoc development shell manager powered by Nix
Features • Installation • Quick Start • Usage • Configuration
Per-project development shells in one command. ah generates a Nix flake on the fly, manages sessions for quick restore, and supports 60+ languages. No flake.nix authoring required.
# Need Rust and Go? Done.
ah rust go- Fast: type
ah rustand you're in a shell with the Rust toolchain ready - Multi language: combine multiple languages in one shell
- Language aliases: short names for languages, e.g.
pyfor Python,tsfor TypeScript - Community-powered: templates from devenv or dev-templates, no setup boilerplate required
- Session management: no rebuild, quick restore, full visibility with GC pinning
- Shell completions: Bash, Zsh, Fish, Elvish, and PowerShell
Tip
Configure the Binary cache before installing to avoid compiling the project from source.
Nix with Flakes enabled is required. If you don't have it installed, we recommend using the Determinate Nix Installer.
nix run github:z1-0/ah.sh -- rust gonix profile install github:z1-0/ah.shAdd to your flake.nix inputs:
inputs.ah.url = "github:z1-0/ah.sh";Then add it to your system or home packages:
environment.systemPackages = [
inputs.ah.packages.${system}.default
];Pre-built binaries are available via Cachix. Choose one of the following options:
If you use profile/CLI packages, run:
cachix use z1-0If you configure NixOS or Home Manager via code, add this to your settings:
nix.settings = {
substituters = [ "https://z1-0.cachix.org" ];
trusted-public-keys = [ "z1-0.cachix.org-1:FS7lPgL0StRBOPrlu0RgdCL7LafUI23+U6Iivdw5QK8=" ];
};# Create a Python dev shell
ah python
# Combine multiple languages
ah rust go nodejs
# You're in a Nix develop shell with all tools available# Shorthand: languages as positional args
ah rust go
# Explicit subcommand
ah use rust go
# Specify a provider
ah use python --provider devenv# List all sessions
ah session list
# Restore a session by index or ID
ah session restore 1
ah session restore a3f8c2d1
# Restore from directory history (interactive)
ah restore
# Update session dependencies (re-runs nix flake update)
ah session update
ah update 1
# Remove sessions
ah session remove 1 2
ah session remove a3f8c2d1
# Clear all sessions
ah session clear# List available providers
ah provider list
# Show supported languages for a provider
ah provider show devenv
ah provider show dev-templates# Generate completions for your shell
ah completion bash
ah completion zsh
ah completion fishTip
Add source <(ah completion bash) (or equivalent for your shell) to your shell profile for persistent completions. Language names and session IDs are completed dynamically.
| Alias | Equivalent |
|---|---|
ah <languages> |
ah use <languages> |
ah restore |
ah session restore |
ah update |
ah session update |
ah creates a config file at ~/.config/ah/config.toml on first run:
# Provider type: devenv or dev-templates
provider = "dev-templates"
# Leave empty to use the $SHELL environment variable
# shell = "zsh"All settings can be overridden via environment variables with the AH_ prefix:
AH_PROVIDER=devenv ah rustNote
The config schema is available at src/assets/config.schema.json.
You can find the full list of supported languages and tools for each provider directly in the source files:
- You run
ah rust go.ahresolves language and selects the provider - If a matching session already exists, it restores the cached Nix profile immediately
- Otherwise,
ahgenerates aflake.nixfor your languages, builds it, and drops you into anix developshell - Session metadata is saved so you can list, restore, update, or remove it later
- Directory history tracks which sessions you used where, so you can quickly
ah restore
Sessions in ah are identified by the provider and languages requested (e.g., devenv + [rust, go]), not the directory path.
If you request a language combination that you've used before, ah reuses the cached Nix profile directly. This means near-zero startup time for repeated sessions.
The trade-off is that you cannot run multiple versions of the same language at the same time (e.g., Python 3.9 and Python 3.11). This is intentional. ah is built for quick startup and ad-hoc use, not for managing multiple long-term project configurations.