Yes We Can: Standardizing Dev Environments without Containers
Is it possible to standardize local development environments without using VMs or containers? You bet.
Declarative tools like Flox, built on Nix, give us a way to define a project’s runtime environment as code. This is consistent with the Terraform model: You declare the software and config a project requires as part of a machine-readable specification, instead of prescribing a sequence of commands to install and configure them. The irony is that Nix predates Terraform v0.1.0 by more than a decade!
Just like with Terraform, Nix and Flox let you define a project’s needs… without prescribing how (or where) to realize these needs. But unlike Terraform and Nix, Flox doesn’t ship its own domain-specific language. Instead, you use standard TOML to declare packages, variables, setup hooks, and other affordances:
[install]
python.pkg-path = "python313"
jq.pkg-path = "jq"
jq.version = "1.8.2"
[vars]
APP_ENV = "development"
[hook]
on-activate = '''
mkdir -p "$FLOX_ENV_CACHE/app"
'''Flox evaluates this specification to resolve and then lock any declared dependencies. Developers activate Flox environments in their preferred local shells, agents activate them inside sandboxes, and CI runners reuse the same environments with the same locked dependencies. Humans keep their preferred editors and local workflows; agents get the same deterministic starting point... without burning tokens reverse-engineering the project's dependencies.
Here's how to identify a project's undeclared dependencies, commit a Flox manifest and lockfile alongside its code, and give both human and agentic contributors project code that builds or runs at any time, in any place.
Why Builds Still Fail with Pinned Dependencies
A Python-based service can pass every test on an engineer's MacBook… but still fail in CI. In many orgs and projects, this is the rule, not an exception. Everything seems to line up: The Python interpreter matches the project's version pin; the packages match what’s pinned in uv.lock. But the build needs PostgreSQL headers that the engineer installed on their machine via Homebrew months ago… and forgot about.
Spoiler alert: The dependencies listed in the project’s README don't account for those headers.
The problem of undeclared state exposes the paradox of dependency pinning: even when every pin resolves perfectly, builds can still fail. Native libraries, system packages, and compiler versions vary across machines. Conventional build recipes can depend on system state they cannot fully specify.
The upshot? Projects build locally, but good luck reproducing this success anywhere else.
Why Environment Drift Is a Thing
Environment drift happens when the packages and settings available to a project diverge across machines or over time. A compiler upgrade breaks a previously working build. A Python extension loads an ABI-incompatible version of a native library and crashes. A contributor installs a tool via Homebrew for an unrelated project, pulling in library dependencies they don’t even know about. Months later, another project's build script requires one of those libraries, finds it in PATH, and links against it. The build succeeds. The contributor shares the project with their teammates, none of whom can reproduce it on their own machines.
Language-specific package managers solve part of the problem. uv.lock pins Python dependencies, including packages distributed as binary wheels; package-lock.json pins npm dependencies. Neither by itself necessarily accounts for the native libraries, system packages, or build tools these dependencies need.
Version managers like pyenv and nvm make it possible to select specific Python or Node.js releases, which is useful—to a point. But syncing versions of interpreters or runtimes isn’t a guarantee that your project will build or behave the same way on every machine. pyenv, for example, typically expects to compile Python from source using libraries installed on the host. Two developers can install the same Python release and end up with interpreters linked against different versions of OpenSSL or SQLite. Both report the same Python version, yet each depends on different versions of native libraries. And neither a Python version pin nor a Node.js version pin accounts for the compilers, headers, and system libraries the project requires.
Every new tool adds another opportunity for a silent assumption to become an undeclared dependency. The challenge for platform teams is how to record requirements once and make them usable by every contributor.
OK, So Why Are We Jailing Human Developers inside Containers?
Dev containers, VMs, and cloud dev shells standardize the software inside a workspace, but also insert a boundary between that workspace and the host. In this pattern, the affordances that developers take for granted on their local systems depend on how well (or if) their editors, debuggers, and language servers integrate with the dev container, or whether their project files, credentials, and local services are accessible there. And on macOS, dev containers run inside a VM, so humans and agents build and test against Linux instead of macOS. They can't run native binaries or use Apple's system frameworks inside the container.
There's also a distinction between reproducing a pre-built OCI image and reproducibly rebuilding that image from scratch. Pinning an image by digest identifies a specific, immutable artifact. But rebuilding an image via its Dockerfile isn't necessarily reproducible. The upshot? The same Dockerfile can produce different images on different days, even if the file itself doesn’t change.
Frustratingly, we’ve come to conflate isolation with reproducibility. But reproducibility really requires just enough isolation to keep undeclared inputs from changing the result. Believe it or not, this doesn't require jailing human developers inside of containers or VMs. Declarative environments provide a better way to control dependencies while preserving access to native tools, hardware, and familiar workflows.
AI agents bring the importance of strong, sandbox-strength isolation into focus. We want to jail agents, limiting what they can access, modify, or damage. But inside their sandboxes, agents still need a project's interpreters, compilers, native libraries, and build tools. If you block network access, those dependencies had better already be available; if you allow it, agents can burn through thousands or tens of thousands of tokens reverse-engineering dependencies, resolving conflicts, and figuring out what works. Multiply that effort across every agent and every fresh sandbox, and environment setup becomes a Sisyphean process.
Nix, Flox, and the Declared Dependency Graph
Nix does something brilliant. It lets you define dependencies declaratively, then resolves them into a dependency graph that accounts for transitive dependencies. It materializes these dependencies as packages under hash-addressed paths in an immutable store. By pinning inputs, the same dependency graph can be reproduced across machines, regardless of what software happens to be installed on them.
Flox extends that model across the SDLC, letting teams build and publish custom software to a private catalog; publish and share versioned environments; generate authoritative SBOMs; automate package rebuilds as sources change; and control when running systems adopt updates.
For example, a Python and Node.js project could start with this manifest fragment:
[install]
python.pkg-path = "python313"
node.pkg-path = "nodejs_24"
uv.pkg-path = "uv"
postgresql.pkg-path = "postgresql"
pkg-config.pkg-path = "pkg-config"When a human or agent runs flox activate, Flox makes the declared tools available in that shell. Packages live in the Nix store (/nix/store) rather than globally in /bin, /usr/bin, /lib, /usr/lib, etc. For humans, Flox environments run locally on each developer's machine, with access to their editor and all local resources. For agents, Flox environments run in sandboxes.
Flox is a cross-platform, cross-architecture, cross-language-and-toolchain platform, so humans and agents alike get access to all the dependencies they need, including historical package versions going back six years or more. The same Flox manifest can declare reproducible environments for Linux and macOS, on x86-64 and ARM. Flox resolves the appropriate packages for each supported target. Teams maintain a single declarative manifest per environment, and the same manifest declares platform-specific dependencies for Linux and macOS, on x86 and ARM… without installation scripts or complicated setup READMEs.
Version and Diff a Project’s Runtime alongside Its Code
Start with a repository that onboarding contributors routinely struggle to build on their machines. Use Flox's floxify skill with your preferred coding agent to inspect the repo and author a reproducible Flox environment. The floxify skill analyzes language lockfiles, runtime pins, CI workflows, Dockerfiles, build scripts, and service configs to identify all of a project's requirements. It generates a Flox manifest, checks it against these findings, and validates that dependencies resolve and the environment activates as expected.
Prompt the agent to build and test the project in the resultant environment, resolve any remaining issues, and commit the verified manifest and lockfile alongside the code. This way a project’s runtime dependencies and the environment they expect to run in travel (and are versioned/managed) alongside its code.
Once a project’s build or runtime environment lives alongside its code, changes to dependencies or an environment config go through the same pull-request (PR) workflow as changes to code: When a project adds a new package or version, the PR includes changes to the Flox manifest and lockfile. Reviewers can inspect those changes as diffs; CI activates the environment pinned by the PR's lockfile and builds and tests code against it. If a regression appears at a later point, SREs can use git bisect to identify the offending commits… up to and including any changes to dependencies or environment config that coincide with it.
From the First Commit to the Next CVE
Flox scales this model beyond development and CI. Teams can build and publish custom software to their own private catalogs, as well as publish versioned build or runtime environments to FloxHub. As packages and their dependencies change, automated rebuilds test and publish updated artifacts. Teams define policy-driven updates for managed FloxHub environments to govern when their workloads pick up new software.
This goes for routine feature releases and zero-day security patches alike.
When a critical CVE drops, teams can rebuild affected packages, test their replacements, and update pinned references for production workloads that run vulnerable software. If an update introduces a regression, they can restore the previous generation: in either case, updating or rolling back is an atomic edit to a declarative reference, such as a FloxHub environment, a Git commit, or an SHA256-hashed Nix store path. Kubernetes, Nomad, AWS ECS/Fargate, and other standard production systems then deploy the referenced environment.
Try It Yourself
Start with a simple service you already ship. Download Flox, floxify your project, then publish what you’ve built to FloxHub. Discover how simple it is to switch atomically between reproducible software states when a critical CVE drops, an agent-authored change takes down production, or a routine deployment ruins your day—or night.
Frequently Asked Questions
Can you standardize development environments without containers or VMs?
Yes. Containers and VMs standardize an environment by isolating it from the host. Declarative tools like Flox standardize the dependency graph instead: a manifest declares the packages, variables, and hooks a project needs, and a lockfile pins every resolved dependency. Each developer activates that environment directly in their own shell, on their own machine, and gets the same locked software as everyone else.
Why does a build fail in CI when every dependency is pinned?
Because pins usually cover only part of what a build uses. A Python lockfile can match exactly while the build still depends on PostgreSQL headers, a compiler, or a native library that happens to be installed on one engineer's machine and nowhere else. Those undeclared inputs are what make a build pass locally and fail in CI.
Don't uv.lock, package-lock.json, pyenv, and nvm already solve this?
Only in part. Language lockfiles pin the packages their package managers install, and version managers select interpreter and runtime releases. Neither necessarily accounts for the native libraries, system packages, compilers, and headers those packages need. Two developers can even install the same Python release with pyenv and end up with interpreters linked against different versions of OpenSSL or SQLite.
Isn't isolation required for reproducibility?
Some isolation is. Reproducibility requires just enough isolation to keep undeclared inputs from changing the result. A declarative environment provides that by resolving declared dependencies into hash-addressed paths in an immutable store, rather than relying on whatever happens to be installed on the host. It doesn't require walling developers off from their editors, debuggers, credentials, hardware, or local services.
Do AI agents still need sandboxes?
Yes. Agents should run in sandboxes that limit what they can access, modify, or damage. But inside a sandbox, an agent still needs the project's interpreters, compilers, native libraries, and build tools. Activating a locked Flox environment inside the sandbox gives the agent those dependencies up front, instead of leaving it to spend tokens reverse-engineering them in every fresh sandbox.
Do I need to learn the Nix language to use Flox?
No. Flox is built on Nix, but it doesn't ship its own domain-specific language. You declare packages, variables, setup hooks, and services in a standard TOML manifest, and Flox resolves and locks them. The same manifest can declare environments for Linux and macOS, on x86-64 and ARM.
How do I create a Flox environment for an existing repository?
Use Flox's floxify skill with your preferred coding agent. It analyzes the repo's language lockfiles, runtime pins, CI workflows, Dockerfiles, build scripts, and service configs, generates a Flox manifest, and validates that dependencies resolve and the environment activates. Have the agent build and test the project in that environment, then commit the manifest and lockfile alongside the code.
How does a declarative environment help when a critical CVE drops?
Teams can rebuild affected packages, test their replacements, and update the pinned references their production workloads use. Updating or rolling back is an atomic edit to a declarative reference, such as a FloxHub environment, a Git commit, or a hash-addressed Nix store path. Kubernetes, Nomad, AWS ECS/Fargate, and other production systems then deploy the referenced environment.
Keep learning with Flox
Interviews, tips, guides, industry best practices, and news.
A Turnkey Toolkit for Agentic Development with Flox
Test drive OpenClaw and nearly 80 agentic AI environments on your own machine. At once. Without permanently breaking anything. Share what you build with others and it Just Works. Impossible, you say? Not with Flox!
Read postCode and Its Runtime Should Travel Together
README files drift, and agents burn tokens reverse-engineering project setup. This article explores a pattern where the runtime environment itself lives and travels with the project repo, versioned and reviewed alongside its code.
Read postFocusing on the Code, Not the Cruft
Putting the flox and floxify agent skills through their paces with Claude Code: building a FastAPI embedding service from scratch, then reconstructing a complete six-service Mastodon development environment from an existing checkout.
Read postMaking Flox Better for People and Machines
Flox v1.14.1 improves activation, search, and usability as more developers, CI systems, and AI agents rely on Flox.
Read postFlox Account Tokens for People and Machines
Flox now supports granular, role-based tokens that enable organizations to reduce their blast radius, keep pipelines running smoothly through staff changes, easily rotate credentials on a schedule, and seamlessly authenticate in browserless workflows.
Read postOne Tool, Every Language: Declarative Dev Environments
Imagine creating declarative, reproducible environments for the toolchains and dependencies you use in your workflows. Declaring compilers, debuggers, dev libraries, and other dependencies as code. Declarative patterns make this convenient, reproducible, and scalable.
Read post


