One Runner Is Now Enough

A runner can now serve many directories, not just the one it was started in. You can point it at specific projects and directories or let it find your Git repositories.

The new thread composer on ampcode.com with the runner mac-mini selected and a picker listing its projects and folders

Start a runner and tell it which directories to serve with --dir. Repeat the flag for each one:

$ amp --no-tui --runner-id mac-mini --dir ~/code/amp --dir ~/code/sandcastle

Or start it in the directory that holds your checkouts and let it find them:

$ cd ~/code
$ amp --no-tui --runner-id mac-mini --discover-dirs

--discover-dirs serves every Git checkout up to two levels beneath the current directory and picks up new ones as you clone them.

Add or remove directories while the runner is running, without restarting it:

$ amp runner dirs add ~/code/new-repo
$ amp runner dirs list
$ amp runner dirs remove ~/code/dotfiles

The runner remembers the directories you add this way and serves them again the next time you start it from the same directory.

Oh, They Can Update Themselves Too

Runners now update themselves too. If you leave an amp --no-tui runner running, it keeps checking for new releases about once an hour and installs them. Once no thread is running on it, it restarts into the new version, at most once every 12 hours. It keeps its runner ID, its directories, and the rest of its flags.

Turn it off with amp.runner.autoUpdate.enabled: false in your settings.

Read more about serving multiple directories and runner updates in the runner docs.