# Yes We Can: Standardizing Dev Environments without Containers

> Is it possible to standardize local development environments without using VMs or containers? You bet. Declarative Flox environments give humans and agents the same locked dependencies, without jailing developers inside a container.

Source: https://flox.dev/blog/yes-we-can-standardizing-dev-environments-without-containers/
Author: Steve Swoyer
Published: 2026-11-15

## Summary

We jail AI agents inside containers or VMs so we can limit the blast radius if something goes wrong. Why do we jail human developers, too? Declarative tools like Flox give humans **just enough isolation** to run reproducible environments in their preferred shells. Agents activate the same environments inside strong sandbox jails. Both get the dependencies they need across platforms and toolchains. Agents do their work without torching thousands of tokens needlessly reverse-engineering their environments. CI and prod reuse the same locked, versioned environment.

Key takeaways:

- Language lockfiles and version managers pin interpreters and libraries, but leave native libraries, system packages, and compilers undeclared.
- Environment drift comes from undeclared host state: a header installed months ago, a library pulled in by an unrelated tool, an interpreter linked against a different OpenSSL.
- Reproducibility requires just enough isolation to keep undeclared inputs out, not necessarily a container or VM boundary around every developer.
- One Flox manifest defines an environment across Linux and macOS, on x86-64 and ARM. Flox resolves and locks the dependencies appropriate to each target; Nix fetches or builds the corresponding packages into its immutable store.
- Commit the Flox manifest and lockfile with the code, and runtime changes go through the same PRs and CI as code changes.

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:

```toml
[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.

![Prescribe versus declare. A README lists a sequence of brew install, export, and mkdir commands that run against whatever the host already has and leave native dependencies undeclared. A Flox manifest.toml declares the same packages, variables, and hooks in TOML, which Flox resolves into a full dependency graph, locks in manifest.lock, and activates the same way on every machine.](https://flox.dev/images/blog/declare-dont-prescribe.svg)

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.

![An iceberg. Above the waterline sit the declared pins: a Python 3.13 version pin, uv.lock, and package-lock.json. Below it sit undeclared dependencies: PostgreSQL headers from a Homebrew install, the OpenSSL pyenv compiled against, the SQLite version, compilers, C headers, pkg-config, libraries from unrelated installs, and whatever resolves first on PATH. The build passes on a laptop and fails in CI with 'pg_config executable not found'. The fix is to declare postgresql and pkg-config in the Flox manifest.](https://flox.dev/images/blog/undeclared-dependency-iceberg.svg)

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.

![A matrix comparing language lockfiles, version managers, dev containers, and Flox. Lockfiles pin language packages but leave native libraries and compilers to the host. Version managers select a runtime release but link native libraries from the host. Dev containers install everything in the image but rebuild unreproducibly from a Dockerfile, target Linux only, and run Linux inside a VM on macOS. Flox locks packages, native libraries, and build tools in the Nix store, resolves per target for Linux and macOS, and runs in the local shell, native on macOS.](https://flox.dev/images/blog/coverage-matrix.svg)

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](https://flox.dev/blog/platform-teams-and-the-challenge-of-works-on-my-machine/#container-workflows-and-the-inferred-build-runtime-contract). 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](https://flox.dev/blog/standardized-development-environments-explained/#reproducibility-and-isolation-in-context) 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.

![A chart of isolation from the host against reproducibility. The assumed trade-off runs from host plus README, through pyenv and nvm, language lockfiles, and containers rebuilt from a Dockerfile, to images pinned by digest. Flox on a laptop and Flox in an agent sandbox share the same manifest.lock and sit at the top, regardless of isolation. Humans keep the host, agents are sandboxed with the same toolchain, and CI runners reuse the lock.](https://flox.dev/images/blog/isolation-vs-reproducibility.svg)

## Nix, Flox, and the Declared Dependency Graph

[Nix](https://nix.dev/) 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](https://flox.dev/) 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:

```toml
[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.

![Declare, resolve and lock, activate. One manifest.toml installs python313, nodejs_24, uv, postgresql, and pkg-config. Flox resolves it into a manifest.lock with entries for aarch64-darwin, x86_64-darwin, aarch64-linux, and x86_64-linux. A developer laptop, an agent sandbox, and a CI runner each run flox activate against the same locked dependencies.](https://flox.dev/images/blog/one-manifest-everywhere.svg)

## 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](https://flox.dev/blog/code-and-its-runtime-should-travel-together/).

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.

![The environment lifecycle in eight steps. Build and review: floxify the repo, verify and commit the manifest and lockfile, review dependency changes as diffs, and test in CI with flox activate. Ship and patch: publish to a private catalog and FloxHub, deploy to Kubernetes, Nomad, or AWS ECS/Fargate, patch a CVE by rebuilding affected packages, and update or roll back with one atomic edit. git bisect traces a regression to the commit that bumped OpenSSL in manifest.lock, and FloxHub generations let workloads roll back from gen 4 to gen 3.](https://flox.dev/images/blog/first-commit-to-next-cve.svg)

## Try It Yourself

Start with a simple service you already ship. [Download Flox](https://flox.dev/download/), [floxify](https://github.com/flox/flox-skills/) 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`](https://github.com/flox/flox-skills/) 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.

---

This is the Markdown version of https://flox.dev/blog/yes-we-can-standardizing-dev-environments-without-containers/. An index of everything on flox.dev is at https://flox.dev/llms.txt, and reference documentation is at https://flox.dev/docs/llms.txt.
