Valibot

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

Library
npm
v1.5.0
9,046 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

Rust
86%
Apache 2.0

mesh-llm

AI Agents · AI Development

3,551

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
85
Repo Health
91
Technical
69
Dependency
Built with
Rust 86%
TypeScript 10%
Updated 5 days ago
TypeScript
98%
Other

Novu

Developer Tools

40,195

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 5 days ago
TypeScript
90%
MIT

open-pencil

AI Design Tools · Design Tools

9,227

An open-source design editor that reads native Figma files, ships a built-in AI assistant with 100+ design tools, and offers real-time serverless collaboration — all without giving up your files.

View details
84
Repo Health
78
Technical
69
Dependency
Built with
TypeScript 90%
Updated 6 days ago
TypeScript
81%
MIT

OpenCode

AI Code Assistants

220,711

A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.

View details
89
Repo Health
76
Technical
66
Dependency
Built with
TypeScript 81%
MDX 16%
Updated 5 days ago
TypeScript
94%
AGPL 3.0

Papra

Bookmarks Archiving

5,587

Self-hosted document archiving with email ingestion, OCR full-text search, and pluggable storage — store once, find anything.

View details
86
Repo Health
82
Technical
69
Dependency
Built with
TypeScript 94%
Updated 6 days ago
TypeScript
94%
AGPL 3.0

Papra

Bookmarks Archiving

5,587

Self-hosted document archiving with email ingestion, OCR full-text search, and pluggable storage — store once, find anything.

View details
86
Repo Health
82
Technical
69
Dependency
Built with
TypeScript 94%
Updated 6 days ago
Rust
79%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,292

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
84
Repo Health
84
Technical
63
Dependency
Built with
Rust 79%
TypeScript 18%
Updated 2 weeks ago
TypeScript
99%
Other

Teable

Databases · No Code Platforms

21,920

A no-code PostgreSQL database with spreadsheet UX, real-time collaboration, and native AI agents — built for teams that outgrow Airtable.

View details
78
Repo Health
76
Technical
62
Dependency
Built with
TypeScript 99%
Updated 6 days ago
TypeScript
99%
Apache 2.0

Trigger.dev

AI Development · Automation · Developer Tools

16,606

Build and deploy fully-managed AI agents and background jobs in TypeScript — with no timeouts, durable retries, real-time observability, and elastic scaling built in.

View details
90
Repo Health
9
Technical
63
Dependency
Built with
TypeScript 99%
Updated 5 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