What belongs in a default environment
Your default environment is active in every shell, in every directory. That makes it the right home for tools you use everywhere:- General-purpose command-line tools, such as
git,curl, andjq - Your editor (Neovim, Helix), terminal multiplexer (tmux, Zellij), and shell prompt (Starship, Oh My Posh)
- Coding agents, such as Claude Code and Codex
- CLIs for cloud providers and other services you use across projects, such as
awscli2,azure-cli, andgh
- Language toolchains pinned to a project, such as Node.js 20 for one repository and Node.js 22 for another
- Services, such as databases and message queues
- Libraries and build dependencies that a project needs to compile
[hook] and [profile] scripts.
Try an example
Open your default environment’s manifest in your editor:flox generations rollback.
Everyday essentials
Start here if you’re replacing Homebrew,apt, or another system package manager.
This environment is just a list of packages,
so you can build it without opening the manifest at all:
description that explains what the environment is for:
manifest.toml
brew leaves
and find each one in the catalog.
Catalog package names usually match Homebrew’s, but not always,
so use flox search to check.
Shell power user
This environment takes your editor, prompt, and shell integrations to every machine, so you don’t have to copy dotfiles around.manifest.toml
[vars]setsEDITORandVISUALin every shell, so tools such asgitopen Neovim.[profile]has one script per shell. Your shell runs only the script that matches it, so the same environment works in Bash, Zsh, and Fish. If you use tcsh, add atcshscript the same way.- The scripts set up the Starship prompt,
the
zcommand fromzoxidefor jumping between directories, and thefzfkey bindings. They also aliaslstoeza.
[profile] for details.
If you already set up these tools in
.bashrc, .zshrc, or config.fish,
remove those lines after you move them into the manifest,
so the setup doesn’t run twice.macOS and Linux
If you work on a Mac but deploy to Linux, or split your time between both, one default environment can serve all of your machines. Use a package’ssystems option to install it only where you need it.
manifest.toml
- By default, an environment supports
aarch64-darwin,aarch64-linux, andx86_64-linux, so it works on Apple silicon Macs and on ARM and x86 Linux. - A package’s
systemsoption limits that package to some of those systems. Here, the GNU tools install only on macOS, and Linux-only tools such asstraceinstall only on Linux. Without it, Flox can’t resolve the environment on systems where the package isn’t available.
Your default environment’s packages come before the system’s in your
PATH,
so GNU sed, grep, find, and tar replace the BSD versions that ship with macOS.
If your scripts rely on BSD behavior, such as sed -i '', leave these packages out.Team baseline
If your team uses FloxHub organizations, you can publish a shared baseline environment with internal CLIs and approved tool versions. Everyone on the team can then include it in their own default environment and add personal tools on top.manifest.toml
- Flox merges the baseline into your environment. Your own manifest takes priority, so you can add packages or override the version of a baseline package without changing the baseline for everyone else. You can’t remove a package that the baseline installs.
- Include the baseline with
remote, notdir. Your default environment lives on FloxHub, and you can’t push an environment that includes a local directory. - To see the merged manifest, run
flox list -D --config.