semtest/Getting Started/Quick start
Getting Started

Quick start

Go from zero to your first semantic test in five steps.

1. Initialize

Scaffold a new semtest setup in your project:

bash
semtest init

This creates a semtest.config.ts configuration file with a default model configuration.

2. Write a spec

Create a spec file. Spec files must contain .spec. in the filename and can live anywhere in your project.

MARKDOWNsemtests/package.spec.md
# Package Metadata

## Expectation

The package.json file should have a "name" field and a "version" field.

That's it. Plain language describing what should be true about the code.

3. Run

bash
semtest run

You'll see a progress indicator for each test, then a summary:

text
Found 1 semantic test file(s)

✔ [1/1] package.spec.md · 1 passed

Semantic tests completed
Report: semtest-results/latest.md
CI output: semtest-results/ci-results.json

1 passed

PASSED

4. Read the report

Open semtest-results/latest.md. You'll see a summary table and per-test details for any failures. Passing tests are excluded by default — use --include-passing to see them.

5. Gitignore the output

The output directory contains generated reports — don't commit them.

bash.gitignore
semtest-results/

Next steps