Skip to main content

Rolling Toolbox, Pinned Workspace

Updated 13 min readMarkdown

Co-edit with ChatGPT

A practical macOS environment management standard for humans and AI coding agents.

1. The Philosophy

A good developer environment is not defined by having the fewest package managers. It is defined by clear ownership, predictable execution and reproducible projects.

My approach is Mode A+:

  • Homebrew manages the host.
  • Mise manages runtimes and standalone tools.
  • uv manages Python project environments.
  • pnpm manages JavaScript and TypeScript project dependencies.
  • Podman provides infrastructure and container isolation.

I call the versioning strategy Rolling Toolbox, Pinned Workspace.

My personal toolbox should evolve with new stable releases. Each repository should independently declare the exact toolchain and resolved dependencies needed to build, test and run it.

These are my names for the policy, not official industry standards.

2. One Responsibility, One Owner

Layer Owner Examples
Host software and native libraries Homebrew Git, Podman, Mise, desktop apps
Language runtimes Mise Python, Node.js, Java, Go
Standalone CLI applications Mise Copilot, MLX CLI, kubectl, Kind
Python project dependencies uv FastAPI, NumPy, pytest
JavaScript project dependencies pnpm React, Vite, TypeScript
Infrastructure isolation Podman Databases, services, Linux workloads

Avoid installing the same standalone executable through multiple managers.

Different scopes, however, can legitimately contain different versions of the same software. Homebrew's internal Python dependencies can also coexist with Mise-managed Python.

3. Homebrew: Manage the Host

Use Homebrew for macOS applications, native libraries and foundational software.

Install Mise through Homebrew and let Homebrew update Mise itself.

brew install mise git gh podman

A Brewfile records the host software inventory:

brew "mise"
brew "git"
brew "gh"
brew "podman"

To reconstruct the environment:

brew bundle --file=Brewfile

A Brewfile is not an exact version lockfile.

Do not remove dependencies that other formulae require simply because Mise supplies a similar runtime. Do not install project packages into the Homebrew prefix.

4. Mise: The Rolling Personal Toolbox

Mise is the central authority for development runtimes and standalone CLI applications.

Its npm and PyPI backends let me manage tools written in different languages through a single interface.

The PyPI backend normally uses uv to install isolated Python tools. This does not put their packages into my base Python or a project's environment.

Global Configuration

My desired global configuration lives in:

~/.config/mise/config.toml

[tools]
# Language runtimes
node = "lts"
python = "latest"

# Package managers
pnpm = "latest"
uv = "latest"

# Infrastructure
kind = "latest"
kubectl = "1.37" # Match supported cluster versions.

# AI applications
"npm:@github/copilot" = "latest"
"pypi:mlx-lm" = "latest"
"pypi:mlx-whisper" = "latest"

# Personal development tools
"pypi:argcomplete" = "latest"
"pypi:build" = "latest"
"pypi:isort" = "latest"
"pypi:pip-audit" = "latest"
"pypi:pipdeptree" = "latest"
"pypi:poetry" = "latest"
"pypi:pre-commit" = "latest"
"pypi:pytest" = "latest"

# Utilities
"pypi:pywhat" = "latest"
"pypi:whatsurname" = "latest"

[settings]
minimum_release_age = "24h"

This is an illustrative desired configuration, not a claim that every listed tool is currently installed or compatible with the newest Python. Remove tools I no longer need.

Node.js follows its official LTS line. CPython has no formal LTS designation, so Python follows the latest stable release, subject to compatibility.

A tool that needs an older interpreter may require an explicit per-tool Python setting and a separately installed Mise interpreter.

Keep kubectl within the supported version skew of the clusters it accesses.

Shell Activation

Activate Mise in ~/.zshrc:

eval "$(mise activate zsh)"

Installing Standalone Tools

Install a new personal tool with its appropriate backend:

mise use -g pypi:ruff@latest
mise use -g npm:@github/copilot@latest

Avoid:

  • npm install -g
  • pip install into the base interpreter
  • New direct pipx or uv tool install installations when Mise can manage the standalone tool

Existing tools require deliberate migration. Mise does not automatically adopt their environments.

5. Global Configuration Is Not a Project Environment

File or directory Meaning Version control
~/.config/mise/config.toml Personal defaults and toolbox Private dotfiles, optionally
mise.toml Shared repository toolchain Commit
mise.local.toml Personal project overrides Ignore
mise.lock Resolved tool versions and supported integrity metadata Commit
pyproject.toml, uv.lock Python project requirements and resolution Commit
package.json, pnpm-lock.yaml JavaScript project requirements and resolution Commit
.venv/, node_modules/ Generated project environments Ignore

Mise merges applicable configuration files. Project requests normally override global defaults for the same tool, while unrelated global tools remain available.

This is not a hermetic sandbox.

Inspect the effective configuration from the repository root:

mise config ls
mise ls --current
mise current
mise which python

Use mise use -g for intentional global changes and mise use --path ./mise.toml for explicit project changes.

Do not alter the personal toolbox to fix one project's compatibility issue.

6. Installing a Tool Is Not Installing a Project Dependency

This distinction is central to the standard.

Standalone Application

A tool is an executable I use independently of repositories.

For example:

mise use -g pypi:mlx-lm@latest

mlx_lm.generate --help

The CLI has its own installation environment. Its Python modules are not automatically importable by my project's code.

Project Dependency

If my application imports MLX LM, it must declare it locally:

uv add mlx-lm

uv run python -c 'import mlx_lm'

If my project needs pytest, even when I already have a global pytest tool:

uv add --dev pytest

uv run pytest

For JavaScript and TypeScript:

pnpm add react

pnpm add -D typescript vitest

pnpm exec tsc --init
pnpm exec vitest run

Project build, test and deployment commands must not depend on undeclared global utilities.

In particular, uv run and pnpm exec can still encounter executables inherited from PATH. Declare the relevant dependency rather than assuming the command itself guarantees isolation.

Temporary Execution

For reviewed one-off tools, use uvx or pnpm dlx, preferably with a reviewed version.

These do not add the tool to the project's dependency manifest.

uvx --no-python-downloads \
  --python "$(mise which python)" \
  ruff --version

pnpm dlx prettier --version

Installation Decision Table

Intent Installation method
Host application or native library brew install
Personal runtime or CLI mise use -g
Project runtime or external toolchain mise use --pin --path ./mise.toml
Python runtime dependency uv add
Python development dependency uv add --dev
JS runtime dependency pnpm add
JS development dependency pnpm add -D
Temporary utility uvx / pnpm dlx

7. Mode A+: Mise Owns Python Interpreters

uv is capable of installing Python, but I intentionally assign interpreter ownership to Mise.

uv owns virtual environments, dependency resolution and Python project lockfiles.

Mise may delegate standalone PyPI tool installation to uv; Mise remains the configuration owner.

Add the following to a Python project's pyproject.toml:

[tool.uv]
python-preference = "only-system"
python-downloads = "never"

In uv terminology, a Mise-managed interpreter is an external or system interpreter.

These settings prevent uv from managing a competing Python installation for this project, but they do not guarantee that uv selects Mise rather than another external interpreter.

Select it explicitly:

uv sync --python "$(mise which python)"

When invoking uv outside a project, use an explicit interpreter and --no-python-downloads where supported.

Project uv settings are not necessarily inherited by every standalone tool installer. Verify the interpreter used by a standalone tool when compatibility matters.

8. Starting a New Project: Pin the Workspace

Choose a reviewed, compatible runtime at project creation, then pin its resolved version.

New projects may start with current stable versions, but existing projects should not change merely because my global toolbox changes.

Python Project

mkdir my-python-app
cd my-python-app

mise use --pin --path ./mise.toml \
  python@latest uv@latest

uv init --no-pin --python "$(mise which python)"

Add the [tool.uv] policy from Section 7 and set requires-python to the intended supported range.

Then:

uv add --python "$(mise which python)" fastapi

uv add --python "$(mise which python)" \
  --dev pytest ruff

uv sync --python "$(mise which python)"

mise lock

Commit mise.toml, mise.lock, pyproject.toml, uv.lock and the source code, but not .venv/.

JavaScript or TypeScript Project

mkdir my-web-app
cd my-web-app

mise use --pin --path ./mise.toml \
  node@lts pnpm@latest

pnpm init

pnpm add -D typescript vitest

pnpm exec tsc --init

mise lock

Commit mise.toml, mise.lock, package.json, pnpm-lock.yaml and project files, but not node_modules/.

Keep the packageManager field, if present, aligned with the pinned pnpm version. Do not introduce competing lockfiles.

Dependency Versioning

Pin the toolchain exactly.

Application dependency manifests may express compatible ranges; the committed lockfile records exact resolutions.

Update both deliberately when requirements change.

For multiple CI platforms, generate and verify the necessary Mise lock entries for those platforms. If the backend requires additional lock sidecars, commit them as well.

9. A Shared Execution Contract for Humans, Agents and CI

Mise tasks provide one consistent interface for an existing Python project.

The following can be added to its generated mise.toml once the test and lint dependencies exist:

[tasks.setup]
description = "Restore locked dependencies"
run = 'uv sync --locked --python "$(mise which python)"'

[tasks.test]
run = 'uv run --locked --python "$(mise which python)" pytest'

[tasks.lint]
run = 'uv run --locked --python "$(mise which python)" ruff check .'

After reviewing and trusting the repository configuration, humans and agents use the same commands:

mise install --locked

mise run setup

mise run test

mise run lint

For a JavaScript project, setup should use:

pnpm install --frozen-lockfile

Tests should use declared scripts or dependencies.

A clean CI job should reproduce the project without my personal toolbox.

Lockfiles improve reproducibility, but are not a substitute for a hermetic operating system or a pinned production container image.

10. Supply-Chain Security: Latest Eligible, Trusted and Compatible

Latest does not mean bleeding edge.

Keep Mise's 24-hour minimum release age for new version selection where supported. It provides a window for malicious or defective releases to be discovered, not proof that older packages are safe.

The age filter does not universally cover:

  • Exact version requests.
  • Versions already recorded in lockfiles.
  • Backends that cannot report release dates.

The npm and PyPI backends also apply the cutoff to newly resolved dependencies where supported.

Independently configure appropriate controls for project-level uv and pnpm dependency resolution. Mise's settings are not a universal security policy for every package manager.

Treat provenance failures, trust downgrades and blocked lifecycle scripts as signals to investigate.

Do not disable those controls globally to make an installation succeed.

Verify the upstream source, registry metadata and integrity evidence. Prefer an earlier trusted compatible version or defer installation.

Any exception must be narrowly scoped, justified and approved under applicable company policy.

Review repository tasks before trusting them. Never expose tokens in logs, commit credentials or install an unreviewed package merely because an agent suggested it.

11. Maintenance and Declarative Configuration Changes

Updating Mise

Update Mise itself through Homebrew.

With a Homebrew-managed installation, self_update_available: no is expected. There is no need to enable another updater.

brew update
brew upgrade mise
brew doctor

Applying Global Configuration

From my home directory, inspect and update the global toolbox deliberately:

cd ~

mise config ls

mise install

mise outdated

mise upgrade --dry-run

mise upgrade

mise doctor

mise current

latest and lts are version requests, not promises of automatic updates.

After Python upgrades, verify existing standalone Python tools and project interpreters before removing old versions.

Removing Tools

To remove a global tool:

mise unuse -g pypi:ruff

If I manually remove a declaration from TOML, it stops contributing to the active configuration, but old installed files may remain.

Preview cleanup:

mise prune --dry-run

Only run mise prune after reviewing the list and checking old projects, virtual environments and untracked consumers.

Prune is not a complete Terraform-style reconciliation.

Rebuild shims with mise reshim if necessary.

Project dependency upgrades belong in the repository, with tests and reviewed lockfile changes, not in global maintenance.

12. Policy for Future AI Coding Agents

Copy the following rules into AGENTS.md or the relevant agent instructions.

These are requirements for new projects on my behalf, unless an existing repository or organisation requires a different standard.

Environment Management Policy

  • Inspect the current directory, manifests, lockfiles and mise ls --current before making changes. Preserve existing repository conventions unless migration is authorised.
  • Classify each installation as host software, a standalone tool, a project toolchain, a project dependency or a temporary utility.
  • Use Homebrew for the host and Mise for runtimes and persistent standalone tools, including npm and PyPI CLI applications. Avoid duplicate global installations.
  • Use Mise as the Python interpreter owner. Use uv for isolated Python project dependencies and pnpm for JavaScript project dependencies.
  • Use mise use -g only for explicitly authorised global installations. Use mise use --pin --path ./mise.toml for new shared project toolchains.
  • Global tools follow latest eligible, trusted and compatible releases; Node.js follows LTS and Python follows latest stable. Retain compatibility constraints where necessary.
  • Pin project toolchains, commit applicable lockfiles and use locked installs in CI. Declare all project-critical tools, even when they are globally available.
  • Never install project dependencies into the base interpreter or the global npm prefix. Do not commit generated environments, caches or secrets.
  • Do not bypass supply-chain checks. Obtain approval for privileged, destructive or machine-wide changes.
  • Verify ownership, versions, interpreter selection and relevant tests. Report failures and deviations explicitly.

Conclusion

Rolling Toolbox, Pinned Workspace.

Homebrew manages the host. Mise manages the runtimes and standalone applications. uv and pnpm manage project dependencies. Podman isolates infrastructure and workloads.

Install tools for convenience.

Declare dependencies for development.

Pin the workspace for reproducibility.

Keep the toolbox current without sacrificing compatibility or trust.

References

About the author

  • Data Engineer @ TCEU | MSc Big Data Technology @ HKUST | Technology Enthusiast

No comments yet. Be the first to comment.

More from this blog