Hacker News new | ask | show | jobs
by z_mitchell 398 days ago
That's mostly what we've built with Flox [1] (though I'm not exactly sure what you mean by run any command from any Nix package). It looks and feels like an amped up package manager, but uses Nix as kind of an infrastructure layer under the hood. Here's a typical workflow for an individual developer:

- cd into repo

- `flox activate` -> puts you into a subshell with your desired tools, environment variables, services, and runs any setup scripts you've defined

- You do your work

- `exit` -> you're back in your previous shell

Setting up and managing an environment is also super easy:

- cd into project directory

- `flox init` -> creates an "environment"

- `flox install python312` -> installing new packages is very simple

- `flox edit` -> add any environment variables, setup scripts, services in an editor

- `flox activate` -> get to work

The reason we call these "environments" instead of "developer environments" is that what we provide is a generalization of developer environments, so they're useful in more than just local development contexts. For example, you can use Flox to replace Homebrew by creating a "default" environment in your home directory [2]. You can also bundle an environment up into a container [3] to fit Flox into your existing deployment tools, or use Flox in CI [4].

All that stuff I described is free, but we have some enterprise features in development that won't be, and I think people are going to find those very appealing.

[1] https://flox.dev

[2] https://flox.dev/docs/tutorials/migrations/homebrew/

[3] https://flox.dev/docs/reference/command-reference/flox-conta...

[4] https://flox.dev/docs/tutorials/ci-cd/