# Config file reference

Source: https://testis.dev/docs/config

> Every setting in .testis/config.yaml: targets, environments, secrets, AI models, safety limits and cloud sync.

`testis init` writes `.testis/config.yaml`. Commit it with your tests. Secrets never belong in it: use `secretRefs` (the *name* of an environment variable) or your personal settings.

```yaml
schemaVersion: 1
project:
  name: my-shop
targets:
  - kind: web
    baseUrl: http://localhost:3000
    devCommand: npm run dev
environments:
  local: {}
defaultEnv: local
```

## `prd`

Who writes the PRD, the description of what your app should do that tests are judged against:

| Value | Meaning |
| --- | --- |
| `yours` (default) | You provide it: save it as `PRD.md` in your project or upload it on the setup page. No PRD yet? `testis prd prompt` gives you a prompt for your coding assistant (Claude Code, Cursor, ChatGPT), which writes it for you. A PRD in that prompt's format is read at no AI cost; any other document is put into checkable requirements with one AI call. |
| `testis` | Testis writes it from your code and your app's pages, with your AI model. Where the code looks wrong, it asks you a question and writes the rule it thinks is right, marked _(proposed)_. A test that fails only against a proposed rule is listed as "depends on your answer", not as a bug, until you confirm the PRD. |

Either way, Testis shows you the PRD and asks you to confirm it before testing.

## `scope`

`codebase` (default) tests the whole app; `diff` tests only the features your uncommitted git changes touch.

## `project`

`name` (required). Used for the run records and as the default dashboard project.

## `targets`

At least one. Each has a `kind`.

### `kind: web`

| Field | Meaning |
| --- | --- |
| `baseUrl` | Where the app is reachable, local or deployed. |
| `devCommand` | Command that starts your dev server. Testis runs it when the address is local and nothing is listening. |
| `readyUrl` | Polled until the server answers (default: `baseUrl`). |
| `readyTimeoutMs` | How long to wait for it (default 60000). |
| `cwd` | Folder to start the dev server in. |
| `viewport` | `{ width, height }` of the browser (default 1280×720). |
| `auth` | Sign in once per run and start every browser already signed in. See [Logins, test data and payments](/docs/logins-data-payments). |
| `reset` | `{ method, path }` of a route that puts the app's test data back (local runs only), for example `POST /__test/reset`. Or `{ restart: true }`: Testis starts the app again before every test, for apps that keep their data in memory (only when Testis starts the app with `devCommand`). Without either, tests share the app's data. |

### `kind: api`

`baseUrl`, `devCommand`, `readyUrl`, `readyTimeoutMs` and `cwd` as above, plus:

| Field | Meaning |
| --- | --- |
| `openapi` | Path or URL of an OpenAPI document, so Testis can learn your endpoints. |
| `auth` | Log in before every run: `method` (default POST), `url`, `headers`, `body`, and `save` (variable → `$.json.path`, `header:Name` or `status`). |

### `kind: cli`

| Field | Meaning |
| --- | --- |
| `alias` | The name tests use for the program. |
| `binary` | What it runs (never through a shell). |
| `buildCommand` | Optional build step, run once before the tests. |
| `cwd` | Folder the program is built or started from. |
| `installFrom` | Test the released package: `{ source: npm, spec: "pkg@1.2.3" }`. |

## `environments`

A named set of values; pick one with `-e <name>` (the default is `defaultEnv`).

| Field | Meaning |
| --- | --- |
| `baseUrl` | Replaces the web target's address (for example staging). |
| `apiBaseUrl` | Replaces the API target's address. |
| `variables` | Values tests use as `{{NAME}}`. |
| `secretRefs` | Variable → the **name** of an environment variable that holds the secret. |
| `readOnly` | `true` blocks anything that changes data (use for production). |

## `llm`

Normally set for you by `testis setup` and `testis models`, in `~/.testis/config.yaml` (all your projects) and merged with this file (this file wins).

```yaml
llm:
  providers:
    deepseek: { kind: openai-compatible, baseUrl: https://api.deepseek.com, apiKeyEnv: DEEPSEEK_API_KEY }
  models:
    planner: deepseek/deepseek-chat
    actor: deepseek/deepseek-chat
    judge: deepseek/deepseek-chat
  fallback: testis/gemini-2.5-flash # optional: used if the model above runs out of credit or quota
```

When a check fails, the judge takes a second look against your PRD. A model that can look at pictures also gets a screenshot of the page then, which helps with things a text view of the page cannot show (something covered, cut off or hidden). Anthropic, OpenAI and Google models always get it; for another provider, add `vision: true` to it (or `testis models add <name> --vision`) when its model reads images. A model that turns out to refuse pictures is asked again without one.

See [Choose an AI model](/docs/ai-models).

## `safety`

| Field | Meaning |
| --- | --- |
| `allowCommands` | Extra setup commands the tester may run, matched exactly. |
| `denyActions` | Never click controls whose name matches one of these (case-insensitive). Useful for "Delete account". |
| `allowedHosts` | Hosts tests may call besides your own targets. |
| `purchases` | `avoid` (default) keeps the tester away from buy and pay buttons. `sandbox` lets it complete a purchase with the test card; `testis init` sets this only when the payments are in test mode. |
| `allowRemoteData` | Testis refuses to start an app whose settings point at a database that is not on this machine. Set `true` only for a throwaway database you own. Live payment keys can never be allowed. |

## `run`

Older projects may have a `run` section (`mode`, `concurrency`, `effort`, ...). It is still accepted but no longer used: how long a test may take is set per run with `testis test --minutes`.

## `cloud`

| Field | Meaning |
| --- | --- |
| `project` | The dashboard project this folder uploads to (letters, numbers, dots, dashes). |
| `sync` | `false` keeps this project's runs on this machine. |
| `apiUrl` | A different cloud address. |

## `integrations`

Where problems can be sent and who hears about runs. The config holds only the names of the environment variables with the tokens. See [Issue trackers and Slack](/docs/integrations).

| Field | Meaning |
| --- | --- |
| `github` | `repo` (`owner/name`, default: your git remote), `tokenEnv` (default `GITHUB_TOKEN`), `labels`. |
| `jira` | `url`, `project` (key), `issueType` (default `Bug`), `emailEnv` (`JIRA_EMAIL`), `tokenEnv` (`JIRA_API_TOKEN`). |
| `linear` | `team` (key or name), `tokenEnv` (default `LINEAR_API_KEY`). |
| `slack` | `webhookEnv` (default `SLACK_WEBHOOK_URL`), `on`: `failures` (default) or `always`. |
