Package and Project Managers
These package managers are used to install the tools and apps at the user level ("global"), depending on system and architecture:
mise: primary global and project package managerdevbox: fallback global and project package managernix: system and user package managerbrew: system package manager
Package Managers by operating system:
- macOS (ARM and AMD):
mise: tracked lock file; multi-userdevbox: tracked lock file; multi-usernix: no tracked lock file; multi-userbrew: no tracked lock file; multi-user
- Linux AMD:
mise: tracked lock file; multi-userdevbox: tracked lock file; single-usernix: no tracked lock file; single-userbrew: no tracked lock file; multi-user
- Linux ARM:
mise: tracked lock file; multi-userdevbox: tracked lock file; single-usernix: no tracked lock file; single-user
Their priority order is:
mise: Primary package and project environment manager (tasks/scripts and environment variables). Packages installed from the Mise registry or using backendsaqua,github,gitlab,npm.mise-nix(aliaseddevbox) Mise backend plugin: Nixhub, the Devbox's registry, is way larger than any other, so it's kept as a fallback option for packages not available in Mise, particularly for macOS (darwin) where some packages likeezaare not supported by the Mise backends.brewandupt: Used to install system dependencies. Bootstrapping them requires sudo permissions.
Mise
mise is cross-platform, and is the primary tool for both package and project environment management (tasks/scripts and environment variables).
Mise Global Environment
For managing packages globally, e.g.
# Installs package globally
mise use -g fd
# Add ~/.local/config/config.{toml,lock}
chezmoi re-addFor packages available in the Aqua registry but not directly in Mise:
mise use -g aqua:organization/package@versionand
mise installfor installing the dependencies declared in mise.toml and mise.lock.
Update packages as
mise upgradeor using the mise task:
mise run mise:updateLock dependencies to specific versions:
mise lockProject Environment
For managing a project, e.g.
cd your-project
mise use node
mise use python@3.11
git add mise.toml mise.lock
git commit -m "build: add node and python dependencies"For instantiating a Mise-managed project, simply running
mise installwill install the dependencies declared in mise.toml and mise.lock.
Mise Tasks
Mise also manages tasks (scripts) that can be run with:
mise run task-nameTo see all available tasks:
# Print list
mise tasks
# Interactize fuzzy search
mise runDevbox
Devbox integration has been removed but its installation has been temporarily kept as an working entry point for installing Nix indirectly in macOS. Mise backend plugin mise-nix (aliased devbox) is then used to install packages from the Nixhub registry, which requires Nix as a system dependency.
UPT
UPT is a cross-platform package manager that wraps the default package manager shipped by the vendor on each platform. Homebrew is the one exception, which is an external dependency. It is also an exception in the sense that it must not be run with sudo. All other platform's system package managers do require sudo.
For this reason Mise task upt is available. It is a Chezmoi template that omits the sudo prefix on MacOS, and is used like
mise run upt install my-toolPlatform Gates for Package Lists
Package lists in home/.chezmoidata/packages.yaml are gated per-platform by suffixing the list key. The install scripts iterate the common list unconditionally, then iterate any platform-specific siblings inside a {{ if eq .chezmoi.os "<os>" }} guard.
Conventions:
<manager>: common to all platforms.<manager>_darwin: macOS-only.<manager>_linux: Linux-only.
Current gated lists:
packages.homebrew.brews_darwinandpackages.homebrew.casks— macOS-only (gated inhome/.chezmoiscripts/run_onchange_after_05-install-homebrew-packages.sh.tmpl).packages.upt_linux— Linux-only (gated inhome/.chezmoiscripts/run_onchange_after_20-install-upt-packages.sh.tmpl).