Skip to content

Patchsmith v0.1.0

Latest

Choose a tag to compare

@driftingly driftingly released this 21 Oct 07:36
· 1 commit to main since this release

The first release of Patchsmith, a command line tool that keeps the PHP versions on your Laravel Forge servers patched.

Commands

  • patchsmith patch patches every Forge-managed PHP version to its latest patch release. It never installs, removes, or switches PHP minor versions, and it skips archived servers. It runs as a dry run until you pass --apply.
  • patchsmith audit runs a read-only audit script as root on each server through a temporary Forge recipe. It reports the installed PHP versions, PHP packages with updates available, and PHP processes still running on a replaced binary.

Install

The binary needs PHP 8.3 or newer.

curl -LO https://github.com/driftingly/patchsmith/releases/download/v0.1.0/patchsmith
chmod +x patchsmith
./patchsmith patch

To check the download, compare it with patchsmith.sha256:

curl -LO https://github.com/driftingly/patchsmith/releases/download/v0.1.0/patchsmith.sha256
shasum -a 256 -c patchsmith.sha256

Forge token

Patchsmith asks for your Forge API token when it starts and never saves it. For unattended runs, set FORGE_TOKEN instead.

  • patch needs the organization:view, server:view, and server:manage-php scopes.
  • audit needs the organization:view, server:view, recipe:view, recipe:manage, and team:view scopes. With --team, it does not need team:view.

When the token can reach more than one organization, Patchsmith asks which one to use. Pass --org to choose up front.

See the README for every option.