mkenv is a CLI that builds and runs per-project developer containers using Docker with security-focused defaults, disposable sessions, and caching for language tooling. It exists for devs who would rather yeet a container than reimage their laptop.
This documentation assumes you already live inside a terminal, know Docker basics, and understand that trusting random repos is a losing bet. We cover how to install, run, and bend mkenv without touching YAML.
$PATH.curl -L https://github.com/0xa1bed0/mkenv/releases/download/latest/mkenv-darwin-arm64 -o mkenv
chmod +x mkenv
sudo mv mkenv /usr/local/bin/
mkenv --version
mkenv ..First run builds the full image and primes caches for package managers, compilers, language servers, and editor plugins. Subsequent runs reuse cached layers, so containers spin up quickly unless you force a rebuild.
-h/--help for usage details.mkenv / mkenv runBuild (if necessary) and run a dev container for the current project.
mkenv run [PATH] [flags]
..| Flag | Type | Description | Default |
|---|---|---|---|
--tools |
comma list | Extra tools to preinstall (e.g. nvim,tmux,ripgrep). |
none |
--langs |
comma list | Hint runtimes to prioritize (node,go,python,rust). | auto-detect |
--volume |
comma list | Mount additional host directories inside the container. Support realtive path (e.g. "~/foo:~/foo") | project dir only |
--rebuild |
bool | Ignore cache and rebuild the image from scratch. | false |
--shell |
string | Preferred shell to launch inside the container (bash, zsh, fish). |
zsh |
--entrypoint |
string | Preferred entrypoint (e.g. "tmux") | none |
mkenv attachAttach another shell or process to an existing container for the same project.
mkenv attach [PATH]
mkenv listList managed containers, images, and cache entries tracked by mkenv.
mkenv list [--verbose]
--verbose adds cache location details.mkenv cleanRemove containers, images, and caches created by mkenv for a project or for all projects.
mkenv clean [PATH] [--all]
--all wipes everything including shared caches.mkenv completionEmit shell completion scripts for bash, zsh, or fish.
mkenv completion [bash|zsh|fish]
mkenv helpDisplay inline help for commands/subcommands.
mkenv help [command]
mkenv scans the project directory for manifests like package.json, pnpm-lock.yaml, poetry.lock, requirements.txt, go.mod, Cargo.toml, Gemfile, and Dockerfile fragments. Signals drive which language runtimes, package managers, and helper tools get baked into the image.
This scan also figures out sensible build contexts, env vars, and whether to preload IDE tooling like language servers.
$HOME./Users/you mounts.Language caches live under ~/Library/Caches/mkenv (configurable later). Node modules, Go build cache, Rust crates, pip wheels, and editor plugin directories all reuse prior layers. Rebuild triggers only when relevant manifest or lockfiles change.
The contract is simple: run mkenv ., get a clean environment with the right tooling, no mental overhead, and a fast exit path if something looks off.
mkenv also scans your project files once to see if you about to mount anything sensitive to the container. If it will find any suspitious files (like your ssh keys, tokens, etc...) it will warn you and let you review them before starting environment.
The sandbox could potentially have credential stealers sneaked through supply chain attack - because of this we highly recoomend to no mount any secrets to the sandbox and keep them on your machine.
You can run your npm run dev as usual. Nothhing special is required by you. mkenv will magically make sure that when you access localhost:3000 from browser or postman or anything else you will be routed to the proper container and to the proper process.
Not officially yet. Linux support is near-term; Windows likely rides on WSL once the experience doesn't suck.
No, it depends on Docker for virtualization. Think of mkenv as the paranoid orchestrator on top.
By default under ~/Library/Caches/mkenv with subfolders per project fingerprint. Use mkenv list --verbose to inspect.
Run mkenv . again. You'll either reattach or get a fresh container using existing caches.
No. It's a dev tool for local workstations, not a deployment platform. If you push it to prod, that's on you.
Sure, but the safer move is to run Cursor/VS Code inside via the --editor flag so AI agents stay sandboxed.
No analytics pings. If something breaks, file an issue rather than letting logs spy on you.