Flox · one manifest, every environment

3 months ago

Flox gives you one declarative manifest that describes every tool your project needs, and reproduces the same environment everywhere, from laptop to production. All the power of Nix, with none of the learning curve. Let me take you from your project folder to a shared, reproducible environment.

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00One manifest, every environment.
  2. 0:17Create an environment
  3. 0:28Tools appear when you activate
  4. 0:45Any of 120,000+ packages
  5. 0:58Share the exact environment
  6. 1:12Run services with your code
  7. 1:29One definition, everywhere
Show transcript

One manifest, every environment.

Flox

All the power of Nix, none of the learning curve.

flox init → flox activate → flox push

Flox gives you one declarative manifest that describes every tool your project needs, and reproduces the same environment everywhere, from laptop to production. All the power of Nix, with none of the learning curve. Let me take you from your project folder to a shared, reproducible environment.

Create an environment

$ flox init
⚡ Created environment 'my-project' (aarch64-darwin)

A declarative environment, defined by a manifest that sits right beside your code.

Start in your project folder and run flox init. That creates a new environment, defined by a manifest file that sits right beside your code. Nothing is global, and nothing is installed on your system yet.

Tools appear when you activate

$ flox install python3 nodejs
$ flox activate
flox [my-project] $ python3 --version
Python 3.13.13
flox [my-project] $ exit
$ python3 --version
python3: command not found

Install any tools you want, then activate the environment. Inside it, python and node are on your path, at the versions the manifest pins. Type exit to leave, and those tools are gone from your shell. They exist only inside the activation, so your projects never collide and your system stays clean.

Any of 120,000+ packages

$ flox search ripgrep
ripgrep  Utility that combines the usability of The
         Silver Searcher with the raw speed of grep
$ flox install ripgrep

Search the catalog and install any package, each pinned to an exact version.

Need something new? Search the catalog and install it. Flox draws from over 120,000 packages, the largest open source collection there is, and every one is pinned to an exact version so the environment stays reproducible.

Share the exact environment

$ flox push        # publish to FloxHub
$ flox pull        # a teammate gets the same one
A shared environment on FloxHub

One source of truth on FloxHub · cryptographically pinned, identical for everyone.

Here is the payoff. Run flox push to publish the environment to FloxHub. Now a teammate runs flox pull and gets the exact same environment, cryptographically pinned down to the last package. One source of truth, and no more works on my machine drift.

Run services with your code

$ flox services start
✔ Service 'stopwatch' started.
$ flox services status
NAME       STATUS     PID
stopwatch  Running    51774

Databases, queues, and workers, started on activate and stopped on exit · a lightweight alternative to Docker Compose.

Environments can run services too. Add a database, a queue, or a background worker to the manifest, and flox services start brings them up alongside your code. They start when you activate and stop when you exit, a lightweight alternative to Docker Compose for local development.

One definition, everywhere

  • Declarative · one manifest describes every tool and service.
  • Reproducible · the same definition, laptop to CI to production.
  • Shareable · flox push / flox pull through FloxHub.
  • 120,000+ packages · all the power of Nix, none of the learning curve.

brew install flox  ·  flox.dev/docs  ·  open source, GPLv2

That is Flox. One declarative manifest, the same reproducible environment from your laptop to CI to production, shareable with your whole team. Install it with brew install flox, and follow the five minute quickstart at flox.dev.