Managing Claude Code, Codex, and Gemini CLI with Homebrew and mise

Tadashi Shigeoka ·  Thu, February 19, 2026

To keep AI coding agent CLI environments consistent across multiple macOS machines, I revisited how each tool is installed. Codex CLI and Gemini CLI are now managed through Homebrew’s Brewfile, and Claude Code through mise’s install script.

Background

I work across multiple macOS machines. My development environment setup is managed through the oh-my-config repository, using Homebrew’s Brewfile and mise configuration files to reproduce the environment on any new machine with a single command.

Previously, AI coding agent CLIs were installed globally via npm. However, npm global packages are hard to manage declaratively like a Brewfile, making it tedious to keep things in sync across machines. So I decided to migrate each tool to its officially recommended installation method.

Codex CLI & Gemini CLI → Homebrew

Both Codex CLI and Gemini CLI support Homebrew, so managing them is as simple as adding entries to the Brewfile.

# homebrew/Brewfile
brew "codex"
brew "gemini-cli"

Running brew bundle installs them alongside all other tools. No more managing npm global packages separately.

After migrating, I removed the npm global packages.

npm uninstall -g @openai/codex
npm uninstall -g @google/gemini-cli

Claude Code → mise

Claude Code supports Homebrew as well, but Anthropic recommends the install script method. It enables automatic updates, so you always have the latest version. That’s why I added this installer to mise’s install script instead.

# mise/install.sh
echo "Installing Claude Code"
# https://code.claude.com/docs/en/setup#installation
curl -fsSL https://claude.ai/install.sh | bash

While mise itself doesn’t manage Claude Code’s versioning, including the installer in mise’s setup script ensures it gets installed automatically when bootstrapping a new machine. Once installed, automatic updates keep it on the latest version, so Brewfile-style version management isn’t needed.

Post-Migration Setup Overview

CLI ToolPackage ManagerConfig File
Codex CLIHomebrewhomebrew/Brewfile
Gemini CLIHomebrewhomebrew/Brewfile
Claude Codemise (official installer)mise/install.sh

Summary

Migrating AI coding agent CLIs from npm global installs to Homebrew and mise simplified the setup across multiple Macs. With everything declared in Brewfile and mise scripts, any new machine just follows the existing setup flow to get a fully working environment.

That’s all from the Gemba, reporting on organizing AI coding agent CLI installations.

References