Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-flaky-tests-new-monitors.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The Trunk launcher
Trunk uses a launcher to automatically install the appropriate CLI for your platform. The launcher is a bash script that downloads the appropriate Trunk CLI version and runs it. The launcher invisibly runs the Trunk CLI version specified in a project’s.trunk/trunk.yaml file. The actual Trunk CLI is a single binary that is cached locally in ~/.cache/trunk and is updated automatically.
Install the launcher
The Trunk CLI can be installed in many different ways, depending on your use case.Using NPM
If your project uses apackage.json, you can specify the Trunk Launcher as a dependency so your developers can start using Trunk after installing Node dependencies.
package.json as a script:
Using cURL
You can install the Trunk Launcher script directly by downloading it through cURL. The launcher script supports both macOS and Linux environments. To allow your teammates to usetrunk without installing anything, the launcher can be committed directly into your repo:
Using Homebrew
You can run the following command if you prefer to install this tool via homebrew. Keep in mind that other developers on your team will also have to install manually.Using Windows
Fromgit-bash or msys2, download the Bash launcher and add it to your PATH:
powershell, download the powershell launcher:
.\trunk.ps1.
Compatibility
Trunk only supports Windows with the following versions and above:| Tool | Where to Modify | Minimum Required Version |
|---|---|---|
| CLI | cli version in .trunk/trunk.yaml | 1.13.0 |
| Plugins | ref for the trunk plugin in .trunk/trunk.yaml | v1.0.0 |
| VSCode | Reload VSCode to update | 3.4.4 |
Uninstall instructions
From your system
Trunk has a very minimal installation, and therefore, there’s not much to uninstall. The two system paths we use are:/usr/local/bin/trunk: the Trunk Launcher~/.cache/trunk: cached versions of the trunk cli, linters, formatters, etc.
From a repo
To cleanly remove Trunk from a particular repo, run:VS Code extension
To uninstall the Trunk VS Code extension, do so as you would any extension (docs). Then reload VS Code.Binary download (not recommended)
You can directly download thetrunk binary. We don’t recommend this mode of operation because your ability to version the tool through trunk.yaml will not function when launching trunk directly from a downloaded binary. Regardless you can bypass the launcher support by downloading the prebuilt binaries here:
| variable | options |
|---|---|
| version | the semver of the binary you want to download |
| platform | ’darwin`, ‘linux’ |
Pre-installing tools
Trunk hermetically manages all the tools that it runs. To do this, it will download and install them into its cache folder only when they are needed. If you would like to ensure that all tools are installed ahead of time, then you can use thetrunk install command. This may be useful if you want to prepare to work offline or if you would like to include the tools in a docker image. On Linux and macOS you may find the cache folder at $HOME/.cache/trunk.