Skip to main content
A new CLI version reaches three places: the machines people work on, the repositories they work in, and the hosts that run builds. This page gives the steps for each place. The CLI tells you when a newer version exists, after a command in a terminal and at session start. The notice sends no request of its own. To turn the notice off, set OUTERLAYER_NO_UPDATE_NOTICE. Each notice names one command, with the exact version:
That command runs the named version once. It updates the machine install, which the session hooks run, and the maintained skills. Then doctor shows the result. A global install keeps its older version, and hands off to the newer machine install.

On each machine

  1. Install the new version:
    If you run the CLI with npx, name the version instead: npx -y @outerlayer/cli@latest. Without the version, npx can run an older copy from its cache.
  2. Run outerlayer doctor. The new version updates the machine install and the maintained skills. Doctor names anything else on the machine that needs a step, and says how to fix it.
On a machine that never ran outerlayer init --local, run it once. It installs the hooks and the maintained skills in ~/.agents/skills/. Every outerlayer command updates the installed maintained skills when they come from an older CLI version. It never replaces them with an older version. To move back to an older CLI, install it and run outerlayer init --local. A session-start notice can also say that the maintained skills come from another CLI version. It names the same command, at the newer of the two versions.

The machine install

Each machine keeps one copy of the CLI, the machine install, in ~/.outerlayer/cli. The session hooks and the status line run it. The path does not change, so an upgrade does not change the agent’s settings.
  • A newer CLI that runs a command replaces the machine install.
  • An older CLI leaves it as it is. Only outerlayer init moves it back to an older version, and the command says when it does.
  • When the machine install is newer than the outerlayer command on PATH, that command hands off. The machine install then runs the command with the same arguments.
The handoff keeps the terminal and the hooks on one version. This includes a machine with several Node versions under nvm. To make the outerlayer on PATH run each command itself, set OUTERLAYER_NO_HANDOFF. outerlayer doctor shows both versions, and which one runs a command you type. A repository’s own dependency on @outerlayer/cli never hands off. Neither does a runner’s install. Hooks that an earlier CLI pointed at another copy move to the machine install the first time a newer CLI runs a command. That command prints one line that names the copy the hooks ran before.

In each repository

  1. Run this command in the repository. To see the plan first, add --dry-run.
  2. Review the diff and commit it. The command commits nothing.
The command updates the files init wrote that you have not edited. It removes the maintained skills that the repository still commits. A repository that keeps its sources in .outerlayer/ also moves to the AGENTS.md layout. See Move a repository to this layout. A repository whose instructions come from a control plane needs no change. Run the command in the control plane repository instead.

Remove maintained skills from a repository

Do these steps in order. A machine that skips steps 1 and 2 has no maintained skills after it pulls your commit.
When a repository still commits the maintained skills:
  1. Upgrade the CLI on every machine and build host that works in the repository.
  2. Run outerlayer init --local on each machine a person works on.
  3. Run outerlayer init --update and commit the result.
When you are signed in, init --update names each host on a CLI older than 0.27.0. Do not commit until each of those hosts updates. The command cannot check the machines people work on.

On each build host

A service runner, and a runner in a Lima VM on a Mac, update themselves. Update every other runner by hand. Update a runner has the commands for each kind of runner. A service runner cannot update the helper that starts microVM builds, because the helper needs root. After a CLI update on a Linux service host:
  1. Run outerlayer runner check. It checks the config file, the hooks and the key.
  2. If the runner’s log or outerlayer doctor says the helper needs reinstalling, run outerlayer runner install --service --replace. See Update the microVM helper.

See what changed

The changelog lists what changed in each CLI version.