How to Set Up a Cross-Platform Package Manager on Any OS

··11 min read
How to Set Up a Cross-Platform Package Manager on Any OS

If you have ever set up a new laptop and spent an entire evening hunting down installers, copying license keys, and clicking through "Next, Next, Finish" wizards, you already understand the problem. The average developer or power user now juggles two or three operating systems: a Windows work machine, a MacBook at home, maybe a Linux box or a WSL environment for servers. Every one of those platforms ships with its own way of installing software, and none of them agree with each other.

Here is a fact that surprises most people: a fresh Windows install can take a skilled user over four hours to fully provision with the same 40 to 60 tools they rely on daily. On macOS with Homebrew and a saved manifest, that same setup takes under 20 minutes and mostly runs unattended. The difference is not talent or typing speed. It is having a cross-platform package manager and a repeatable configuration.

In this guide I will walk through what a cross-platform package manager actually is, which ones are worth your time in 2024, and exactly how to set one up on Windows, macOS, and Linux so that a single command file rebuilds your entire toolkit. I use these tools every week, so expect honest tradeoffs, not marketing gloss.

Key Takeaways
  • A package manager installs, updates, and removes software from the command line using a central repository, replacing manual downloads.
  • No single tool covers all three OSes perfectly. The realistic winning combo is Homebrew (macOS/Linux), WinGet or Chocolatey (Windows), and a shared manifest.
  • Storing your package list in a plain text manifest file turns a 4-hour setup into a 20-minute unattended reinstall.
  • Cross-platform managers like Nix and Pkgx get you closer to "one config for everything," but carry a real learning curve.
  • Always verify what you install. Package repositories are a supply-chain attack surface, so pin versions and audit unfamiliar packages.
  • Keep license keys and premium installers organized separately from open-source packages, since managers rarely handle activation.

What Is a Cross-Platform Package Manager?

A package manager is a tool that installs software from a curated repository using a single command instead of a web browser and a mouse. Instead of visiting a website, downloading an installer, and clicking through prompts, you type something like brew install git and the tool fetches, verifies, and installs it for you.

A cross-platform package manager extends that idea across operating systems. The dream is one command syntax and one list of packages that works identically on Windows, macOS, and Linux. In practice, we usually get 80% of that dream by pairing a couple of managers together and sharing a manifest file between them.

Why bother instead of just downloading installers?

  • Speed: Installing 30 tools takes one command and a coffee break, not an afternoon.
  • Reproducibility: A manifest file documents your exact setup and rebuilds it anywhere.
  • Updates: A single upgrade command patches everything, which closes security holes faster.
  • Cleanliness: Uninstalls actually remove things instead of leaving orphaned files scattered across your disk.

If you are the kind of person who reinstalls or migrates systems often, this is one of the highest-leverage habits you can build. It pairs naturally with a broader move toward portable tooling, something I touched on in our guide to migrating from Windows to Linux without losing your apps.

The Main Cross-Platform Package Managers Compared

Let me be direct: there is no perfect universal tool yet. Each option makes different tradeoffs between coverage, complexity, and how "cross-platform" it really is. Here is how the serious contenders stack up.

Manager Platforms Package Count (approx.) Learning Curve Best For
Homebrew macOS, Linux 7,000+ formulae, 4,000+ casks Low Mac users, mixed Mac/Linux teams
WinGet Windows 6,000+ Low Windows 10/11, official Microsoft tool
Chocolatey Windows 9,000+ Low-Medium Windows automation, enterprise
Nix macOS, Linux, WSL 80,000+ High Reproducible, declarative setups
Pkgx macOS, Linux, Windows (WSL) Large, npm-style Low-Medium Running tools without installing globally

My honest recommendation for most people: use the native leader on each OS and share a manifest. That means Homebrew on macOS and Linux, plus WinGet or Chocolatey on Windows. If you crave true single-config reproducibility and can invest a weekend learning, Nix is the closest thing to a universal solution, especially with nix-darwin and Home Manager.

How to Set Up a Package Manager on macOS and Linux (Homebrew)

Homebrew is the friendliest starting point and works on both macOS and most Linux distributions, which already gives you two of the three platforms covered.

Step-by-step installation

  1. Open your terminal (Terminal on macOS, or your distro's shell on Linux).
  2. Run the official install script:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Follow the prompts. On Apple Silicon Macs, Homebrew installs to /opt/homebrew; on Linux it goes to /home/linuxbrew/.linuxbrew.
  4. Add Homebrew to your shell path when prompted, then reload your shell with source ~/.zshrc or source ~/.bashrc.
  5. Verify with brew --version.

Installing and managing software

  • Install a command-line tool: brew install ripgrep
  • Install a GUI app (macOS only, via casks): brew install --cask visual-studio-code
  • Update everything: brew update && brew upgrade
  • Clean up old versions: brew cleanup
  • Remove something completely: brew uninstall ripgrep

The magic step: a Brewfile

This is where Homebrew becomes genuinely powerful. Run brew bundle dump --file=~/Brewfile and it writes every installed package into a plain text file. On any new machine, install Homebrew, copy your Brewfile over, and run brew bundle --file=~/Brewfile. Everything reinstalls automatically.

Store that Brewfile in a private Git repo or a secure note. It becomes the single source of truth for your entire toolkit.

How to Set Up a Package Manager on Windows (WinGet and Chocolatey)

Windows finally has a first-party answer: WinGet, which ships built into Windows 10 (recent builds) and Windows 11. For deeper automation and a larger catalog, Chocolatey remains excellent. Many power users run both.

Using WinGet

  1. Confirm WinGet is present. Open PowerShell and run winget --version. If it is missing, install "App Installer" from the Microsoft Store.
  2. Search for software: winget search vlc
  3. Install by ID: winget install VideoLAN.VLC
  4. Update everything at once: winget upgrade --all
  5. Export your installed apps to a manifest: winget export -o packages.json
  6. On a new machine, import it: winget import -i packages.json

Using Chocolatey

  1. Open PowerShell as Administrator.
  2. Run the install command from chocolatey.org (a single Set-ExecutionPolicy plus install script).
  3. Install packages: choco install googlechrome 7zip vscode -y
  4. Upgrade all: choco upgrade all -y

If your work involves Windows-specific utilities, it is worth browsing curated Windows software and desktop utilities alongside your package manager. Some tools, like Windows Symlink Creator Pro, solve problems that no package manager touches, such as managing symbolic links safely for cross-drive setups.

A Worked Example: Rebuilding a Dev Machine in 20 Minutes

Let me make this concrete with real numbers. Say you are a web developer who just got a new MacBook and you previously ran your old setup manually. Your typical toolkit includes 34 command-line tools, 11 GUI apps, and 6 language runtimes. That is 51 pieces of software.

The old way: Download each installer, run it, restart when prompted, configure. At an optimistic average of 5 minutes per app including download time, that is roughly 4 hours and 15 minutes of hands-on clicking. In reality it is often a full workday because you forget which tools you had.

The manifest way:

  1. Install Homebrew (about 3 minutes).
  2. Pull your dotfiles repo containing your Brewfile: git clone https://github.com/you/dotfiles (30 seconds).
  3. Run brew bundle --file=./dotfiles/Brewfile.
  4. Walk away. Homebrew downloads and installs all 51 items in parallel where possible.

On a decent connection, the whole thing finishes in about 18 minutes, almost all of it unattended. That is a 92% reduction in your active time. Do this twice a year across two machines and you have saved an entire working day.

The same principle applies to teams. If you onboard a new engineer, handing them a manifest and a README means they are productive on day one instead of day three. This kind of repeatable, scriptable

Cover image: Tiny New Laptop by c.j.b, licensed under BY 2.0 via Openverse.

Recent Posts

View all →

Most Popular Software

View all →

Browse by Platform

View all →