trunk upgrade to update the Trunk CLI and all your plugins, linters, tools, and runtimes.
Upgrade scopes
Upgrades can be filtered to different scopes by adding them totrunk upgrade <scopes>. The scopes available are:
Automatic upgrades
When running locally, Trunk automatically checks for upgrades in the background on a regular cadence. You’ll see notifications for these upgrades appear in the VSCode Extension or at the end of atrunk check run. To stop seeing these notifications, you can run trunk actions disable trunk-upgrade-available.
When running in single-player mode, Trunk will automatically upgrade itself in the background and stay up to date.
Automatic upgrades with GitHub Actions
You can configure a GitHub workflow to create PRs with the latest Trunk and tool versions automatically. Here’s a sample GitHub Action:You can also set the
arguments field to filter particular scopes to upgrade and set base to define the branch to create a PR against (default main).
Pinning versions
If you don’t want a linter, tool, or runtime to be upgraded, you can pin its version by appending! to the version in your .trunk/trunk.yaml. For example:
Plugin repositories and user.yaml
By default, upgrades are only applied to your repo’s.trunk/trunk.yaml. If you’re using a plugin repo that enables linters/tools, or if you would like upgrades to be applied to your .trunk/user.yaml file, you can run trunk upgrade --apply-to <path> to see upgrades applied there.