All apps/Trunk

Trunk

trunk

All-in-one tool for checking, formatting and monitoring code.

Runs as trunk|macOS, Linux, Windows|trunk.io

Command form

ai-draft · 4 tasks · 12 fields

Run Trunk checks and formatters. Other subcommands are outside this form.

Opens the form; the finished command lands at your prompt, unrun
otty gui trunk

trunk check

Check code

Run linters on changed files, or all files.

Check codeExample values, fixed in this page — nothing here reaches a terminal
Basic
Paths
any
Do not fix
--no-fix
TasksEach one presets the form for one job
Check changed files
pathsno_fix
Check everything
pathsallno_fixfilter
ParametersOnly these flags are editable in the form
Paths
path · positional 0 · repeatable
All files
boolean
--all-a
Apply fixes
boolean
--fix-y
Do not fix
boolean
--no-fix-n
Filter linters
string
--filter
Diff mode
string
--diffnonecompactfull
Upstream branch
string
--upstream

trunk fmt

Format code

Run formatters on changed files, or all files.

Format codeExample values, fixed in this page — nothing here reaches a terminal
Basic
Paths
any
TasksEach one presets the form for one job
Format changed files
paths
Format everything
pathsallfilter
ParametersOnly these flags are editable in the form
Paths
path · positional 0 · repeatable
All files
boolean
--all-a
Do not fix
boolean
--no-fix-n
Filter formatters
string
--filter
Upstream branch
string
--upstream
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed trunk against its version. A form that does not match your version is not offered.