Quick start
cd your-repotrimtest init # writes a commented trimtest.toml and adds .trimtest/ to .gitignoretrimtest detect # which projects were found, and how many tests each trackstrimtest record --coverage # run the suite once and learn what each test executesrecord --coverage runs every test file on its own under the ecosystem’s coverage tool (see the
requirements). Use trimtest record --run for the static tier only: it
runs everything once and records the baseline only if the run is green.
Now change some code:
trimtest select # which tests that change reaches, and whytrimtest run # run just those with each project's native runnertrimtest explain tests/test_core.py # why a test was, or was not, selectedselect diffs the working tree against the recorded baseline, so uncommitted edits work. Its output names the
reason for every selected test:
pytest: 1 of 1 tests selected tests/test_a.py [test changed]In a pull request you do not need a recording at all. Compare against the base branch:
trimtest run --base origin/mainSee GitHub Actions for a complete workflow, and keep a scheduled full run
(trimtest run --full) as the safety net.
- How it works and the safety rules
trimtest.tomlfor ignores, runner prefixes, timeouts and project overrides- For AI agents if an agent will be running trimtest