---
title: "vetd: a TypeScript checker for coding agents"
description: "vetd is an open-source TypeScript checker for coding agents. It checks an agent's edit in memory and rechecks only the files that edit affects."
url: http://localhost:4173/
updated: 2026-11-11
---

# vetd: a TypeScript checker for coding agents

> vetd checks a coding agent's code changes before they are written to disk. The agent sends a diff. vetd returns new TypeScript errors, Next.js and React rule violations, and the Vitest tests the change affects. It is open source (Apache-2.0), version 0.1.0.

| | |
| --- | --- |
| Works with | Claude Code, Cursor, Codex, VS Code, Windsurf, Gemini CLI, any MCP client |
| Ships as | MCP server, CLI, Node SDK |
| Type checker | `tsgo` (TypeScript 7, from `@typescript/native-preview`) |
| Needs | Node.js 22.18+, macOS or Linux |
| Status | Early release. Not on npm yet. Install from a local checkout |

## What problem does it solve?

Agents run `tsc` or `next build` after every edit to find type errors. Each run checks the whole project from scratch, even for a one-line change.

vetd runs one checker per repository and keeps it loaded. Each check only covers the files the edit affects. All agents and git worktrees in the repository share it.

## How does it decide what to recheck?

- It keeps the project and the type checker in memory between checks.
- If you change a function, it rechecks the files that use that function.
- If an export's type did not change, it does not recheck the files that import it.
- Changes to comments or JSX text are not rechecked. They can't affect types.
- Inside a file, it rechecks only the changed function.

If vetd can't prove an edit only affects some files, it checks more files and says why in `fallback`. A failed or unsupported check is never reported as passing.

## How fast is it?

Measured by replaying real commits from public repositories. Every commit is also checked by a separate `tsgo` to catch wrong answers.

| Repository | Full tsgo | vetd p50 | Commits | Mismatches |
| --- | ---: | ---: | ---: | ---: |
| [commerce](https://github.com/vercel/commerce) | 1.3 s | 432 ms | 30 | 116 |
| [saas-starter](https://github.com/nextjs/saas-starter) | 511 ms | 275 ms | 30 | 39 |
| [excalidraw](https://github.com/excalidraw/excalidraw) | 302 ms | 1.4 s | 30 | 8 |
| [taxonomy](https://github.com/shadcn-ui/taxonomy) | 246 ms | 65 ms | 30 | 68 |

Small repositories are fast to check anyway, so the gain there is small. Full results, including failures: [benchmarks](http://localhost:4173/benchmarks.md).

## What does it check besides types?

92 Next.js and React rules. Examples:

| Rule | Flags |
| --- | --- |
| [`next/server-hooks`](http://localhost:4173/rules/next/server-hooks.md) | `useState()` in a Server Component |
| [`next/client-env`](http://localhost:4173/rules/next/client-env.md) | A private env var read in client code |
| [`next/server-actions`](http://localhost:4173/rules/next/server-actions.md) | A plain function passed where a Server Action is required |
| [`next/non-serializable-props`](http://localhost:4173/rules/next/non-serializable-props.md) | Props that can't be sent from server to client |
| [`next/route-params`](http://localhost:4173/rules/next/route-params.md) | `params.slug` that doesn't exist in the route |
| [`next/unknown-route`](http://localhost:4173/rules/next/unknown-route.md) | `<Link href>` to a page that doesn't exist |
| [`next/server-only-in-client`](http://localhost:4173/rules/next/server-only-in-client.md) | A `server-only` module imported into client code |

All rules: [rules](http://localhost:4173/rules.md).

## How do I install it?

```sh
npm install -D /absolute/path/to/vetd @typescript/native-preview
npx vetd init
```

`vetd init` adds vetd to `.mcp.json` and adds usage instructions to `AGENTS.md`. Setup per agent: [MCP setup](http://localhost:4173/mcp.md).

## Does it replace tsc in CI?

No. Keep your full typecheck and build in CI. vetd is for fast feedback while the agent works.

## Pages

- [Docs](http://localhost:4173/docs.md): setup, tools, results, CLI, SDK, configuration, limits
- [MCP setup](http://localhost:4173/mcp.md): per-agent setup
- [Fast type checking](http://localhost:4173/fast-typecheck.md): vetd compared with `tsc`
- [Benchmarks](http://localhost:4173/benchmarks.md): results on public repositories
- [Rules](http://localhost:4173/rules.md): every rule
- [All pages in one file](http://localhost:4173/llms-full.txt)
