Commands
This is what tx0 help prints. tx0 ui --help lists the keys of the terminal interface.
usage: tx0 <command> [options]
commands:
check [PATH...] check the tree and report what the rules find; PATHs limit the
check to some files and directories
--format F human (default), agent (compact, for coding agents), json or sarif
--changed only findings that are new in the changes not yet committed
--since REV only findings that are new since the git revision REV
--new only findings that are not in the baseline
--baseline FILE the baseline, instead of `baseline` in tx0.toml
--delta compare with the previous check: new, open and fixed findings
--level L only findings of level L and above: note, warning or error
--tier T use tier T instead of the one in tx0.toml
--max-findings N show at most N findings; 50 for --format agent, all otherwise;
0 shows all
--root DIR the root of the tree; by default the nearest directory above
the first PATH with tx0.toml or .git
fix [PATH...] apply the fixes that keep behaviour
--unsafe also apply fixes that may change behaviour
--finding ID apply the fix of this finding only, safe or not; may be repeated
--dry-run write nothing
--diff print the changes as a unified diff
suppress ID --reason TEXT [--until YYYY-MM-DD]
write a suppression comment for a finding, in the syntax of its
file, and check that it suppresses only that finding
metrics [PATH...] lines, comments, complexity, nesting, length and parameters of
files and functions, with totals, and duplicated code
--format F human (default) or json
--top N list the N functions that rank highest (default 10)
--sort S rank by complexity (default), nesting, length or params
--files list every file (human format)
gate [PATH] evaluate the conditions of [gate] in tx0.toml on new code and on
the whole tree: findings, duplication, complexity, coverage
--changed, --since REV
new code is what changed since REV, such as origin/main
--coverage FILE a coverage report; may be repeated
--format F human (default), agent or json
coverage line coverage from lcov, Cobertura or JaCoCo reports
--coverage FILE a report; may be repeated; by default [coverage] reports
--changed, --since REV
also the coverage of the lines changed since REV
--format F human (default) or json
--top N list the N files with the most lines not run (default 10)
explain RULE|ID what a rule finds and how to configure and suppress it; for the id
of a finding, also the finding and its fix
explain RULE FILE [ROOT]
say why RULE runs on FILE or not
baseline [PATH] [--output FILE]
write the current findings to a baseline, by default the file
named in tx0.toml or tx0-baseline.txt
hook [FILE...] check files after an edit, for the hooks of coding agents; without
FILE, reads the hook's JSON on standard input; prints findings that
are new against HEAD on standard error and exits with 2
init [PATH] [--agents] write a commented tx0.toml; with --agents, print configuration for
coding agents and a section for AGENTS.md instead
rules [PATH] [--path FILE]
list the rules, and whether each runs on FILE
status [PATH] refresh the index of PATH and show what changed since the last run
tree [PATH] [--depth N]
show the fingerprints of PATH and its directories
diff A B list the files that differ between two directories
watch [PATH] keep the index of PATH current and show changes as they happen
ui [PATH...] browse the findings in the terminal and act on them; they follow
the files as they change (`tx0 ui --help` lists the keys)
--tier T use tier T instead of the one in tx0.toml
lsp [PATH] run a language server that shows findings in the editor as you type
mcp [PATH] serve tools for coding agents over stdio (Model Context Protocol)
help show this text
options:
--timings print how long each step took, on standard error
exit codes: 0 success; 1 findings fail the gate; 2 usage or configuration error;
3 tx0 could not run. `tx0 hook` exits with 2 when it reports findings and 1 when it fails. tx0 watch runs on Linux for now.