惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
B
Blog
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
IT之家
IT之家
D
Docker
Google DeepMind News
Google DeepMind News
罗磊的独立博客
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
博客园 - 司徒正美
Engineering at Meta
Engineering at Meta

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
Schemic — Schema as code, for any database
msanchezdev · 2026-06-20 · via Hacker News: Show HN

Schema as code · any database

Your schema, in the Zod you already know.

Define your schema with s.* — a drop-in for Zod. Schemic generates your database's native DDL, validates at runtime, and runs your migrations.

TypeScript-first Zod-compatible MIT

Your schema lives in four places.
None of them agree.

But you already describe your data in TypeScript.

// schema in, native ddl out

From s.* schema to generated native DDL .

Define your tables and fields in TypeScript — the native DDL is generated for you.

// what you get

Everything you get with Schemic.

A drop-in s.* schema, generated DDL, a migration CLI, end-to-end types, the full define* vocabulary, and a live round-trip — all from one typed file.

Drop-in Zod API

A 1:1 drop-in for z.* — refinements, defaults, coercion, and infer / input / output.

email: s.string(),

name: s.string().optional(),

createdAt: s.datetime(),

Migrate an existing schema by find-replacing z.s. Nothing new to learn.

Adopt any database

Introspect a live database into typed schema files.

CLI toolbelt

sc status sc check sc doctor

sc rollback sc seed sc pull

End-to-end types

Infer row shapes straight from the schema.

type User = App<typeof User>

Unsupported types are flagged in your editor — not at migration time.

Bring your own types

Store any class with a typed codec — app value in, wire type out.

Live round-trip

Diff against the running database.

// the cli

Migrations are first-class.

Write a migration from your schema, apply it, and check for drift against the live database — three commands, no DDL by hand.

// if you know Zod, you already know this

Schema, DDL, and migrations — one file.

Go past tables and fields. Events, functions, and access rules all live in the same typed source — and generate real DDL.

// common questions

Questions, answered.

+

Is it really just Zod?

Yes — s.* is a 1:1 drop-in for z.*. Migrate an existing schema by find-replacing z.s. If you know Zod, there's nothing new to learn.

+

Why not write the DDL by hand?

Hand-written DDL drifts from your types. Schemic keeps your schema, the generated DDL, and your TypeScript types as one source of truth — generated, never out of sync.

+

How do migrations run?

Three commands cover the whole loop: one writes a migration from the schema diff, one applies it, one checks for drift.

sc gen sc migrate sc diff --live

+

Which databases are supported?

SurrealDB and Postgres are available today; more databases are on the way through drivers. Each driver maps the full define* vocabulary — tables, fields, indexes, events, functions, and access — to that database's DDL. MIT licensed.

+

Can I adopt it on an existing database?

Yes. One command introspects the live database and generates the matching s.* schema files, so you start from the database you already have and migrate forward.

sc pull

+

Does it replace my database client?

No — it sits on top. You keep your database's official client for queries; Schemic owns the schema, the generated DDL, the migrations, and the row types.

+

Is it a query builder or an ORM?

Neither. Schemic is a schema + migrations toolkit. It owns the schema, the generated DDL, and the migrations; pair it with your database's query tools.

+

Can I drop to raw queries?

Always. Schemic owns the schema and migrations, not your queries — use your database's client directly, and compose raw expressions into defaults, events, permissions, and functions where a driver supports it.

// set up with ai

Let your agent wire it up.

Let your AI coding agent set up Schemic for you. Paste this prompt into Claude Code, Cursor, or any agent — it installs and configures the right driver for your database, brings your schema into TypeScript (new or existing), and prepares your first migration for you to review and run, explaining each step.

one prompt · full setup

Read the full guide

One schema. Zero drift.

Generate the DDL, run the migrations, keep your types — straight from the schema you already wrote.