Install the CLI
Install the Trunk CLI to start automating your code quality checks.
bash (no prompts)
curl https://get.trunk.io -fsSL | bash
curl https://get.trunk.io -fsSL | bash -s -- -y
brew install trunk-io
npm install -D @trunkio/launcher
pnpm add -D @trunkio/launcher
yarn add -D @trunkio/launcher
From the root of a git repo, run:
trunk checkby default only checks the changes you've made in your branch, ignoring issues in the default branch. This means that if you haven't made any changes,
trunk checkwill come back empty, so to get a sense of what
trunk checkcan do, we suggest running:
trunk check --sample 5
To allow your teammates to use
trunkwithout installing anything, the launcher can be committed directly into your repo:
curl -LO https://trunk.io/releases/trunk
chmod +x ./trunk
git commit ./trunk -m "Commit Trunk to our repo"
This makes it much easier for you to share Trunk with your colleagues!