Source Resolution

Every block can be delivered from multiple package sources — Homebrew, the Stackie supercache CDN, npm, pip, apt, and more. Source resolution picks the best source for your current machine and preferences automatically.

How It Works

When you run stackie up, each block goes through the resolver before anything is installed. The resolver walks a prioritised list of sources and selects the first one that satisfies three conditions:

  1. The block supports it — the block’s definition lists that source.
  2. Your platform supports it — e.g. apt is only available on Linux, winget only on Windows.
  3. Stackie has it configured — the source driver is loaded and ready.

yes

yes

no

no

no

yes

no

yes

exhausted

stackie up

prefer existing\ninstallation?

Scan all sources\nfor installed package

Found?

Use existing source

Walk preference order

Block defines\nthis source?

Next source

Platform\ncompatible?

Use this source

Error: no compatible source

Default Source Priority

Stackie ships with sensible per-platform defaults. Sources higher in the list are preferred when a block supports multiple options.

PrioritymacOSLinuxWindows
1go (supercache)go (supercache)go (supercache)
2node (supercache)node (supercache)node (supercache)
3system (supercache)system (supercache)system (supercache)
4elixir (supercache)elixir (supercache)elixir (supercache)
5supercache CDNsupercache CDNsupercache CDN
6Homebrewaptwinget
7npmHomebrewscoop
8pipnpmnpm
9web (direct download)pippip
10webweb

Ecosystem sources (go, node, system, elixir) come first because they use the Stackie supercache CDN — pre-built, versioned binaries delivered without touching your system package manager. The generic supercache entry covers any remaining CDN-backed packages. Traditional package managers (brew, apt, winget) follow as reliable fallbacks, and web (direct URL download) is the last resort.

Customising Your Preferences

You can override the default order from the Stackie dashboard under Settings > Source Preferences. For example, if you prefer Homebrew over the supercache CDN, promote brew to position 1. Your custom order applies to all stacks on your machine.

Prefer Existing Installation

When Prefer existing installation is enabled (Settings > Source Preferences), the resolver first checks whether the package is already installed via any compatible source on your machine. If it finds one, it uses it — skipping the download entirely.

This is useful if you already have PostgreSQL installed via Homebrew and Stackie would otherwise prefer the supercache version: with this setting on, Stackie reuses your existing install and saves the bandwidth.

What Happens When No Source Matches?

If the resolver exhausts every source in the preference list without finding a compatible match, stackie up fails with a descriptive error listing the block’s available sources, your preference order, and the current platform. This usually means the block doesn’t support your operating system yet, or a required source driver isn’t available.