Valibot

Modular, type-safe schema validation library with bundle sizes starting under 1KB

Library
npm
v1.5.0
9,023 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
87 /100 Excellent
Development Activity 96
Maintenance 100
Community 60
Maturity 52
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 86
Code Quality 90
Innovation 85
Learning Curve 75

Valibot is a TypeScript schema validation library built around many small, independently importable functions rather than a handful of large chainable methods. Schemas are composed by piping together primitive validators and transformation actions (v.pipe(v.string(), v.email())), which lets bundlers tree-shake away everything not actually used — Valibot advertises bundle sizes starting under 1KB versus tens of kilobytes for comparable libraries like Zod.

Beyond runtime validation and parsing (parse, safeParse, is), the project is a monorepo that also ships companion packages for JSON Schema conversion (@valibot/to-json-schema) and internationalized error messages, plus a codemod for migrating existing Zod schemas. Full static type inference means a validated schema’s TypeScript type is derived automatically via InferOutput.

What You Get

  • Composable schema builders (v.object, v.string, v.array, v.union, etc.) combined via v.pipe() with validation/transformation actions
  • parse() (throws on failure), safeParse() (returns a result object), and is() (type guard) APIs for validating unknown data
  • Full static type inference via v.InferInput/v.InferOutput, so a schema’s TypeScript type never has to be hand-written
  • Companion @valibot/to-json-schema package for converting Valibot schemas to standard JSON Schema
  • An official Zod-to-Valibot codemod for migrating existing schema definitions
  • Internationalized error message packages for validation failures in multiple languages

Common Use Cases

  • Validating incoming API request bodies or query parameters on a server with automatic TypeScript types
  • Validating and parsing form input on the client with detailed, per-field error messages
  • Validating environment variables and configuration files at startup
  • Converting existing schemas to JSON Schema for OpenAPI docs or LLM tool-call argument validation
  • Migrating an existing Zod-based codebase to a smaller-bundle alternative via the provided codemod

Under The Hood

Architecture: The monorepo’s library/ package holds the actual valibot npm package; library/src/schemas/ defines type-specific schema constructors (string, number, object, array, union, and dozens more), library/src/actions/ defines composable validation/transformation actions (email, minLength, trim, brand, etc.), and library/src/methods/ implements the parse/safeParse/is entry points that run a schema’s pipeline against input data. packages/to-json-schema and packages/i18n are separate, independently versioned workspace packages consuming the core library’s schema objects.

Tech Stack: Pure TypeScript with zero runtime dependencies, managed as a pnpm workspace (pnpm-workspace.yaml) with per-package package.json/build config, and Vitest for testing (library/src/vitest).

Code Quality: The library/src tree contains 272+ .test.ts files, essentially one per schema type and action, giving near-total coverage of the composable primitives — consistent with the README’s claim of 100% test coverage. Naming is highly consistent (each action/schema is one small file matching its exported name), and the codebase carries zero runtime dependencies, minimizing supply-chain and version-conflict risk for consumers.

API Design: The core design decision — many small single-purpose functions composed via pipe() instead of a large chainable builder object — is explicitly built to let bundlers eliminate unused code, and it keeps the public API surface predictable: every validator/action is a plain function with the same shape, so learning one teaches you the pattern for all of them.

Used by 18 apps in this directory

TypeScript
56%
Other

agenta

AI Development · Developer Tools · Devops

4,788

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript 56%
Python 39%
Updated 5 days ago
Rust
54%
Other

Cap

Team Chat · Video Conferencing

22,884

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust 54%
TypeScript 42%
Updated 4 days ago
TypeScript
45%
Other

Convex Backend

Databases · Developer Tools

12,617

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 43%
Updated 6 days ago
TypeScript
94%
Apache 2.0

flue

AI Agents · Developer Tools

8,383

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
80
Repo Health
82
Technical
70
Dependency
Built with
TypeScript 94%
Updated 1 weeks ago
TypeScript
94%
Apache 2.0

flue

AI Agents · Developer Tools

8,383

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
80
Repo Health
82
Technical
70
Dependency
Built with
TypeScript 94%
Updated 1 weeks ago
TypeScript
90%
MIT

Kaneo

Product Management · Productivity · Project Management

9,250

Lightweight self-hosted project management that gives you kanban boards, GitHub sync, and full team collaboration without the enterprise bloat.

View details
87
Repo Health
81
Technical
70
Dependency
Built with
TypeScript 90%
Updated 5 days ago
TypeScript
90%
MIT

Kaneo

Product Management · Productivity · Project Management

9,250

Lightweight self-hosted project management that gives you kanban boards, GitHub sync, and full team collaboration without the enterprise bloat.

View details
87
Repo Health
81
Technical
70
Dependency
Built with
TypeScript 90%
Updated 5 days ago
TypeScript
71%
Other

LogChimp

Marketing · Product Management

1,132

Collect customer feedback, prioritize features with upvotes, and build transparent product roadmaps — fully self-hosted and open source.

View details
83
Repo Health
77
Technical
73
Dependency
Built with
TypeScript 71%
Vue 27%
Updated 5 days ago
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

28,378

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
90
Repo Health
73
Technical
65
Dependency
Built with
TypeScript 99%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers