This reference explains how to replace the CLI-tool part of a Homebrew Brewfile
(brew bundle) with the Atmos toolchain. For the skill decision guide, see
../SKILL.md. For the full toolchain feature reference, see
atmos-toolchain.
This migration covers only part of the Brewfile. The Atmos toolchain manages only CLI binaries. Atmos toolchain fetches these binaries from a GitHub release or a plain HTTP download. This is the same model Aqua uses.
The Atmos toolchain does not replace these items:
caskentries (GUI apps)masentries (Mac App Store apps)- Homebrew formulae that require a build from source or a complex dependency graph
Keep these items in the Brewfile. Continue to install them with brew bundle. Only plain
brew "<cli-tool>" lines that map to a standalone, prebuilt CLI binary are migration candidates.
Before (Brewfile):
tap "hashicorp/tap"
brew "hashicorp/tap/terraform"
brew "kubernetes-cli"
brew "jq"
cask "docker"
mas "Xcode", id: 497799835After (atmos.yaml and .tool-versions, with the Brewfile reduced to items that stay out of
scope):
# atmos.yaml
toolchain:
aliases:
terraform: hashicorp/terraform
kubectl: kubernetes/kubectl
registries:
- name: aqua
type: aqua
source: https://github.com/aquaproj/aqua-registry/tree/main/pkgs
priority: 10# .tool-versions
terraform 1.9.8
kubectl 1.28.0
jq 1.7.1
atmos toolchain install# Brewfile (slimmed -- only what Atmos toolchain doesn't cover)
cask "docker"
mas "Xcode", id: 497799835- Classify each Brewfile line. A plain
brew "<formula>"entry for a standalone CLI tool is a candidate.caskentries,masentries, and formulae that pull in a heavy dependency tree or require a source build stay out of scope. Leave these entries in the Brewfile. - Resolve each candidate's GitHub
owner/repo. Homebrew formula names often differ from the upstream GitHub repository name. This differs from asdf or aqua. For example,kubernetes-climaps tokubernetes/kubectl, andhashicorp/tap/terraformmaps tohashicorp/terraform. You must do this step manually. If the mapping is not obvious, check the formula'shomepageorurlfield withbrew info <formula>. - Pick a version to pin. A Brewfile has no native per-project version pinning.
brew bundlealways installs the current version in the tap. Ask the user which version to pin. Or use the currently installed version as a starting point: runbrew list --versions <formula>. - Add each tool. Run
atmos toolchain add owner/repo@versionfor each resolved candidate. - Add the
toolchain:block toatmos.yamlif the repository does not already have one. See the Before/After section above. - Verify the result. Run
atmos toolchain install, then runatmos toolchain list. - Reduce the Brewfile to the out-of-scope entries only: casks,
masentries, and source-built formulae. Continue to runbrew bundlefor these entries. Do not delete the Brewfile unless every line in it was a migration candidate.
| Homebrew command | Atmos toolchain equivalent |
|---|---|
brew bundle (installs everything in the Brewfile) |
atmos toolchain install (installs everything in .tool-versions). This covers only the CLI-tool subset, not casks or mas entries. |
brew install terraform |
atmos toolchain add hashicorp/terraform@<version>, then atmos toolchain install. Or run atmos toolchain install hashicorp/terraform@<version> for a one-time install. |
brew list --versions terraform |
atmos toolchain list |
brew bundle dump (generates a Brewfile from the installed state) |
No direct equivalent. Build .tool-versions by running atmos toolchain add for each tool, or write the file by hand. |
brew uninstall terraform |
atmos toolchain uninstall hashicorp/terraform@<version> |
brew upgrade terraform |
atmos toolchain add hashicorp/terraform@<new-version>, then atmos toolchain install. Atmos pins exact versions. It does not track "latest" implicitly. |
Homebrew already uses this same pattern. Add eval "$(/opt/homebrew/bin/brew shellenv)" to
~/.bashrc or ~/.zshrc (use /usr/local/bin/brew shellenv on Intel Macs). This command puts
Homebrew's bin directory on PATH once, permanently. Every formula's binary lives in that
directory. Homebrew installs are global, not per-project, so each binary is the same version in
every shell and every directory.
The Atmos toolchain uses the same eval-into-rc-file pattern. But the tools it resolves are
project-scoped, not global. The nearest .tool-versions file or dependencies.tools section
drives the resolution:
Bash (add to ~/.bashrc):
eval "$(atmos toolchain env --format=bash)"Zsh (add to ~/.zshrc):
eval "$(atmos toolchain env --format=bash)"Atmos has no separate --format=zsh option. The bash format emits plain POSIX
export PATH=... syntax. Zsh evaluates this syntax the same way.
Fish (add to ~/.config/fish/config.fish):
atmos toolchain env --format=fish | sourcePowerShell (add to $PROFILE):
Invoke-Expression (atmos toolchain env --format powershell | Out-String)Verify the result with which terraform (use Get-Command terraform on PowerShell). The command
must resolve to the Atmos toolchain install directory, not Homebrew's bin directory.
Important: this is a real behavior change from Homebrew's global installs, not only a syntax
change. With Homebrew, terraform was the same version in every shell and every directory.
atmos toolchain env sets PATH from the current directory's resolved paths at eval time. If you
switch to a project with a different pinned version, you must re-run the eval line. Or use
atmos terraform ... instead of bare terraform. The atmos terraform ... command always
resolves the version per invocation, regardless of shell state. Tell the user about this
tradeoff. It is the cost of the per-project reproducibility that the Brewfile never provided.
- The Brewfile has no native versioning. This is a behavior change, not a bug. When you move these tools under the Atmos toolchain, the team gets reproducible, pinned versions for the first time. Flag this as an improvement. But confirm the user wants pinning, not always-latest, before you migrate.
- The formula-to-repository name mapping is manual. No registry maps Homebrew formula names to GitHub repositories automatically. Each candidate needs a one-time lookup.
- The Atmos toolchain does not support casks,
masentries, or source-built formulae. Do not propose replacement of the whole Brewfile. Only the plain CLI-binary subset is in scope.
- atmos-toolchain SKILL.md:
.tool-versions,dependencies.tools, registries, aliases. - atmos-toolchain commands-reference.md: full CLI command reference.