Skip to content
subcloakdocs

Protect your Mac

Install Guard

Make npm, pnpm, Yarn, Bun, uv and pip wait a few days before installing brand-new versions, see each tool's cooldown status, and check a package before you install it.

Install Guard sets a cooldown for each package manager: a waiting period before it installs a version that was published recently. Hijacked versions are usually caught and pulled within days, so a cooldown of a few days skips most of them. The setting goes in each package manager’s user config, so it applies to every install on this Mac: yours, your editor’s and your agents’. Install Guard also shows whether each tool actually honours its cooldown, and lets you check a package name before you install it.

Install Guard on a test Mac: Yarn's cooldown is set but ignored, and pip is too old to have one.

Install Guard: 2 of 6 package managers have a cooldown, 1 set but ignored; the Wait before installing new versions picker at 7 days with Apply to All; Check a package before you install it with an ecosystem picker, Package name and Version fields and Check; and Package managers: npm 11.12.0 at 7 days, pnpm None, uv 7 days, Bun None, Yarn 4.10.3 Ignored with Fix and a note about the day suffix, and pip 25.2 Update needed
  1. Open Install Guard. The subtitle says how many package managers have a cooldown and how many are set but ignored, for example 2 of 6 package managers have a cooldown · 1 set but ignored.

  2. Under Cooldown, pick Wait before installing new versions: Off, 3 days, 7 days (the default) or 14 days.

  3. Under Package managers, click Set, Change or Fix next to one and choose a duration. Or click Apply to All…, which opens the change for the first package manager that differs from your choice; repeat it for the rest.

  4. Watch shows the exact change as a diff: Set a 7-day cooldown for pnpm?, the file, the line it adds or changes, and a note on the unit. “Watch will change one line in your config file and keep a copy of the original next to it.” Click Apply, or Cancel.

    The confirmation sheet: Set a 7-day cooldown for pnpm?, showing a pnpm config file gaining the line for a 10080-minute cooldown, with a note that pnpm counts minutes, and Cancel and Apply buttons
New in 1.2.0

Each package manager’s row shows its version, the file its cooldown lives in, and its status. Watch reads the version from the tool’s own files, never by running it, and the setting from the file that version reads.

Status Meaning
7 days (green dot) A cooldown is set, and this version honours it
1 day (default) No cooldown set, but this version waits a day by default (pnpm 11)
None No cooldown is set
Ignored (orange) A cooldown is set, but this version doesn’t apply it. A note says why. Fix writes the setting again in the tool’s own key and unit, which helps when only the form was wrong, such as a Yarn day suffix; when the version is too old, update the tool.
Update needed This version has no cooldown setting at all. A note says which version added one. Update the tool, then set it.
Not installed Watch didn’t find it

A cooldown is ignored, for example, when:

  • npm is older than 11.10;
  • pip is older than 26.0, or older than 26.1 for a duration such as P7D;
  • pnpm 11 has the setting only in its old rc file, or pnpm 10 only in config.yaml;
  • Yarn is version 1, or the value uses a day suffix such as 7d, which some Yarn 4 releases drop (minutes always work);
  • Bun’s value is under an hour (Bun counts seconds);
  • uv is older than 0.9.17.

When several copies of a tool are installed, Watch uses the one your version manager makes the default (nvm, fnm, Volta or asdf for npm; pyenv for pip; rbenv for Bundler), otherwise Homebrew’s, then the newest. A note names other copies that read the setting differently.

The same status raises PKG-8 in the Inbox: a Review card for a cooldown that’s ignored, and a Good to know card for tools without one. PKG-8 also covers Deno, Poetry and Bundler, which Install Guard doesn’t set.

Some settings stop older versions of the same tool from starting. Install Guard doesn’t set them while such a copy is on the Mac, and says which copy to update first: “Not set: … can’t read this setting and would stop working. Update it to … or later first.”

  • Yarn’s npmMinimalAgeGate in ~/.yarnrc.yml: Yarn 2.0 to 4.9 refuse unknown settings. Watch looks at Yarn versions checked into projects (.yarn/releases), packageManager fields and Corepack’s cache. Yarn 1 doesn’t read this file and doesn’t count.
  • uv’s exclude-newer = "7 days": uv older than 0.9.17 can’t read it.

Turning a cooldown off is always allowed.

Watch changes one line in the package manager’s user config file, and adds it (and its section) if it’s missing. Nothing in your projects is changed.

Package manager File Line for 7 days Note in the app
npm ~/.npmrc min-release-age=7 npm reads this for every install, including the ones agents and editors run.
pnpm 11 ~/Library/Preferences/pnpm/config.yaml (or $XDG_CONFIG_HOME/pnpm/config.yaml) minimumReleaseAge: 10080 pnpm 11 counts minutes and reads this file, not rc: 7 days is 10080.
pnpm 10 ~/Library/Preferences/pnpm/rc minimum-release-age=10080 pnpm counts minutes: 7 days is 10080.
Yarn ~/.yarnrc.yml npmMinimalAgeGate: 10080 Yarn counts minutes: 7 days is 10080. A project’s own .yarnrc.yml can override this.
Bun ~/.bunfig.toml, under [install] minimumReleaseAge = 604800 Bun counts seconds: 7 days is 604800.
uv ~/.config/uv/uv.toml exclude-newer = "7 days" uv applies this to pip, sync and tool installs.
pip ~/Library/Application Support/pip/pip.conf, under [install] uploaded-prior-to=P7D pip 26.1 and later read this; older pip ignores it.

If you keep dotfiles in a repository and link them into your home folder, they stay links. Watch edits the file the link points to and keeps that file’s permissions. A broken link, or a link into a folder Watch can’t write (such as a Nix store), is never replaced: the change fails and the Mac beeps.

  • Choose Off for a package manager and apply: Watch removes the line. A section header it created stays.
  • Before each change, if the file already existed, Watch saves a copy next to it with .cloakwatch-backup added to the name, for example ~/.npmrc.cloakwatch-backup. Each change replaces the previous copy.

Turning a cooldown off in Install Guard never raises the “An install cooldown was removed” card (PKG-11); a cooldown that disappears some other way does.

Watch refuses config files larger than 256 KB. If writing fails, the Mac beeps and the file stays as it was.

New in 1.2.0

Under Check a package before you install it, choose the ecosystem (npm, PyPI, crates.io, RubyGems, Go or Packagist), type a Package name and, if you like, a Version (optional), and click Check. “Checked on this Mac against the feed Watch already has and a list of popular package names. Nothing is sent anywhere.”

Answer Meaning
“… is in the feed’s malicious list … Don’t install it.” That version, or every version, is known to be malicious
“The feed flagged versions of … recently. Check the Feed’s Live list before installing.” Live has flagged versions of it
“… looks like …, a popular package. Check you meant …” The name is one or two letters off a popular npm or PyPI name, has swapped letters, or uses look-alikes such as rn for m or 0 for o
“The name has letters from outside the Latin alphabet …” or “… an invisible character …” Characters that can make a different package look like a familiar one
“On this Mac: … in N places.” Where it’s already installed
“Nothing known against …. That’s not a guarantee: new hijacks take hours to be listed, and a cooldown covers that gap.” Nothing found
The Block suspected releases section: Hold back releases under review, Coming soon, and the note Holding back a release while it's under review will come in an update. Detections and fixes stay free.

Hold back releases under review shows Coming soon: “Holding back a release while it’s under review will come in an update. Detections and fixes stay free.” It needs Subcloak’s release scanner to send its verdicts to Macs, which it doesn’t do yet. Nothing in Cloak Watch 1.2 changes how your package managers install.

If a preview build of Cloak Watch set up install blocking on this Mac, the section says Install blocking is still set up with Turn Off…, which removes Watch’s scripts in ~/.cloak-watch/bin, its token and its line in your shell profiles. From Terminal: watchctl guard remove.

  • Dependabot appears when a project uses Dependabot with a package manager that has no cooldown here, as a reminder that a cooldown in your user config doesn’t change CI.
  • Recent installs lists installs in your code folders with what the feed says about each.

A cooldown in your user config affects installs on this Mac only. It doesn’t change your CI, Dependabot or anyone else’s Mac; set those in the project or the CI’s own config if you want them too.