Docs · Benchmarks · Precompile · Migrate from Zod · Playground · Discord
npm install arktypeWrite definitions in TypeScript's own syntax — inferred 1:1 and validated at runtime. Works with anything that takes Standard Schema (tRPC, Hono, React Hook Form, Drizzle, AI SDK, MCP SDK, and more).
import { type } from "arktype"
const User = type({
name: "string > 0",
email: "string.email",
"age?": "number.integer >= 0"
})
// { name: string; email: string; age?: number }
type User = typeof User.infer
const out = User({ name: "Ada", email: "ada@", age: -1 })
if (out instanceof type.errors) {
// email must be an email address
// age must be non-negative
console.error(out.summary)
} else {
// out is a User
console.log(out.name)
}-
Add the ArkType agent skill:
npx skills add arktypeio/arktype
-
Ask your coding agent:
Migrate this project from Zod to ArkType.
See the migration guide for Zod, Valibot, TypeBox, Yup, Joi, Effect Schema, and JSON Schema.
- Get started — installation, editor setup, and your first type
- Precompile — compile Types at build time with
@ark/aot - Benchmarks — speed, startup, and bundle size, with methods and rerun commands
- Migration guide — from Zod, Valibot, TypeBox, Yup, Joi, Effect Schema, and JSON Schema
- With agents — the skill and Markdown docs at arktype.io/llms.txt
- What's new in 3.0 — release notes and upgrading from 2.x
arktype ships the ark binary (init, migrate, skill, and check / emit / declare via @ark/aot). Inside an installed project, run pnpm exec ark (or npx arktype everywhere — ark on npm is an unrelated package):
npx arktype init # create ark.json and install the bundled skill
npx arktype migrate # install the skill and print a migration prompt
npx arktype check # run @ark/aot --checkWe accept and encourage pull requests from outside ArkType. Planned work is tracked in this GitHub project.
Depending on your level of familiarity with type systems and TS generics, some parts of the codebase may be hard to jump into. That said, there's plenty of opportunities for more straightforward contributions. We'd generally recommend starting with one of these issues labeled external-contributor-friendly.
If you're planning on submitting a non-trivial fix or a new feature, please create an issue first so everyone's on the same page. The last thing we want is for you to spend time on a submission we're unable to merge.
When you're ready, check out our guide to get started!
This project is licensed under the terms of the MIT license.
We will not tolerate any form of disrespect toward members of our community. Please refer to our Code of Conduct and reach out to david@arktype.io immediately if you've seen or experienced an interaction that may violate these standards.
We've been working full-time on this project for multiple years and it means a lot to have the community behind us.
If the project has been useful to you and you are in a financial position to do so, please chip in via GitHub Sponsors.
Otherwise, consider sending me an email (david@arktype.io) or message me on Discord to let me know you're a fan of ArkType. Either would make my day!
| get-convex |
|---|
|
|
| mewhhaha | jahands | Phalangers | WilliamConnatser | JameEnder |
|---|---|---|---|---|
|
|
|
|
|
|
| tylim88 | tpetry | braden-w | ||
|
|
|
|