# Quick start

> Install trimtest, record a baseline, edit a file, and run only the tests that change reaches.

```bash
cd your-repo
trimtest init                  # writes a commented trimtest.toml and adds .trimtest/ to .gitignore
trimtest detect                # which projects were found, and how many tests each tracks
trimtest record --coverage     # run the suite once and learn what each test executes
```

`record --coverage` runs every test file on its own under the ecosystem's coverage tool (see the
[requirements](/start/install/#requirements-per-language)). 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:

```bash
trimtest select                # which tests that change reaches, and why
trimtest run                   # run just those with each project's native runner
trimtest explain tests/test_core.py   # why a test was, or was not, selected
```

`select` diffs the working tree against the recorded baseline, so uncommitted edits work. Its output names the
reason for every selected test:

```text
pytest: 1 of 1 tests selected
  tests/test_a.py  [test changed]
```

## In CI

In a pull request you do not need a recording at all. Compare against the base branch:

```bash
trimtest run --base origin/main
```

See [GitHub Actions](/guides/github-actions/) for a complete workflow, and keep a scheduled full run
(`trimtest run --full`) as the safety net.

## Next

- [How it works](/concepts/how-it-works/) and the [safety rules](/concepts/safety-rules/)
- [`trimtest.toml`](/reference/config/) for ignores, runner prefixes, timeouts and project overrides
- [For AI agents](/agents/for-ai-agents/) if an agent will be running trimtest
