HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
colinhacks
zod
TypeScript2020–2026
colinhacks / zod

zod

TypeScript-first schema validation with static type inference

39Distinct people
50Mentions
2Explicit recommenders
44.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

TypeScript-first schema validation with static type inference

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I understand this as a knee-jerk reaction. I didn't do this lightly. > Perhaps publish a 4.x along with the 3.x stuff You have some misconceptions about how npm works.…

colinmcd used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 3:16:21 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year50 dated mentions

Observed mentions: 2020-03-10 19:16:32 UTC to 2026-10-26 12:07:02 UTC.

0369122020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 7 mentions; 2 submissions, 5 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC725
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC808
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC909
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC505
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC404
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC11110
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC624

What Hacker News says

8 sources
I have two projects with a total of almost 7k stars. [0] It’s worth noting that GitHub stars truly don’t translate into anything worthwhile in the vast majority of cases. You can have a massively popular project, but it doesn’t automatically translate into Twitter followers or newsletter subscribers. And those things don’t directly translate into wealth or happiness either. Just get a job and make friends and have a life. That route has the highest expected value. I have been chasing GitHub stars for a long time, and it has never been fulfilling. I wouldn’t recommend it. [0] https://github.com/colinhacks/zod
In Tips For Making a Popular Open Source Project in 2021
I tried to introduce `zod` (https://github.com/colinhacks/zod) to achieve the same thing within my current team. The idea was that API responses that weren't reflected in the types would cause hard errors that we had to fix, and that we'd be forced to make sure that the mocks in our tests were up-to-date valid responses. Similarly to the article, I also made it so that in production they would log warnings, because I didn't want to expose us to the possibility that validation could take down the app. However, TypeScript is new to my current team, and so nobody wanted the introduction of a validation API on top. It ended up being ~20 lines of code I couldn't get merged. Since TypeScript was new to the team syntax like `z.infer<typeof User>`, generic code and a whole new way to define types at runtime made them feel like it was too complica
Read the rest
ted. Did others have similar problems introducing something like this?
In Testing in production: using JSON Schema for 3rd party API response validation

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.