MCPcopy Create free account
hub / github.com/arktypeio/arktype

github.com/arktypeio/arktype

Chat with this repo
repository ↗ · DeepWiki ↗ · release arktype@3.0.0 ↗ · + Follow · compare 2 versions
10,671 symbols 44,122 edges 1,363 files 369 documented · 3% ● updated todayarkregex@0.0.20 · 2026-12-05★ 7,917151 open issues

Browse by type

⨍ Functions 9,097◇ Types & classes 1,574
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<a href="https://arktype.io">
    <img
        src="https://arktype.io/image/og.png?v=3"
        width="720"
        alt="ArkType: TypeScript's smallest, fastest validator. One prompt away."
    />
</a>







<a href="https://arktype.io/docs/intro/setup"><strong>Docs</strong></a>
&nbsp;·&nbsp;
<a href="https://arktype.io/#board">Benchmarks</a>
&nbsp;·&nbsp;
<a href="https://arktype.io/docs/precompile">Precompile</a>
&nbsp;·&nbsp;
<a href="https://arktype.io/docs/migrating">Migrate from Zod</a>
&nbsp;·&nbsp;
<a href="https://arktype.io/playground">Playground</a>
&nbsp;·&nbsp;
<a href="https://arktype.io/discord">Discord</a>

Quick start

npm install arktype

Write 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)
}

Migrate with one prompt

  1. Add the ArkType agent skill:

sh npx skills add arktypeio/arktype

  1. Ask your coding agent:

text Migrate this project from Zod to ArkType.

See the migration guide for Zod, Valibot, TypeBox, Yup, Joi, Effect Schema, and JSON Schema.

Docs

CLI

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    # check definitions with @ark/aot

Contributions

We 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!

License

This project is licensed under the terms of the MIT license.

Code of Conduct

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.

Sponsorship

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!

ArkSponsors ⛵

get-convex

Sponsors 🥰

mewhhaha jahands Phalangers WilliamConnatser JameEnder
tylim88 tpetry braden-w

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 7,026
Method 2,071
Interface 861
Class 705
Enum 8

Languages

TypeScript96%
Kotlin3%
C1%
Rust1%
C++1%

Modules by API surface

ark/aot/precompile.ts327 symbols
ark/aot/graph.ts280 symbols
ark/type/standalone/artifact.ts177 symbols
ark/aot/interpreter.ts177 symbols
ark/aot/unplugin.ts164 symbols
ark/aot/settingsValidators.ts138 symbols
ark/schema/node.ts133 symbols
ark/schema/shared/errors.ts119 symbols
ark/sets/roots/union.ts118 symbols
ark/schema/structure/structure.ts109 symbols
ark/aot/flat.ts106 symbols
ark/schema/shared/traversal.ts105 symbols

Dependencies from manifests, versioned

@ark/aotworkspace:* · 1×
@ark/attestlink:ark/attest · 1×
@ark/editor-conformanceworkspace:* · 1×
@ark/fast-checkworkspace:* · 1×
@ark/fsworkspace:* · 1×
@ark/repoworkspace:* · 1×
@ark/schemaworkspace:* · 1×
@ark/utilworkspace:* · 1×
@babel/core7.29.13 · 1×
@babel/runtime8.1.2 · 1×
@elysiajs/openapi1.4.16 · 1×
@eslint/js9.37.0 · 1×

For agents

$ claude mcp add arktype \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page