v2.0 Now: TypeScript type extraction from JSDoc + declare const

Your README deserves
better than a single .md file.

Codex builds a fast, searchable, version-aware docs site from your repo. Free forever for OSS, configured in one codex.json, deployed to a custom domain in 38 seconds.

14 OSS projects went live in the last hour
drizzle-orm.dev/docs/schema/pg-table
K
Core concepts Schema pgTable

pgTable()

stable · v0.30+

Defines a Postgres table — a typed schema that drives query inference, migrations, and your IDE's autocomplete. Compose columns with the column helpers in drizzle-orm/pg-core.

schema.ts — Postgres
1
2
3
4
5
6
7
8
9
10
11
import { pgTable, serial, text, timestamp }
  from 'drizzle-orm/pg-core'

export const users = pgTable('users', {
  id:        serial('id').primaryKey(),
  email:     text('email').notNull().unique(),
  name:      text('name'),
  createdAt: timestamp('created_at')
                .defaultNow().notNull(),
})
Type inference — The column helpers carry through. users.id is typed as number, users.email as string. db.select().from(users) returns a typed row.
Docs for 4,408 OSS projects · 1.4M+ GitHub stars
Linnea forecast Glide Vantage Mercury Brightwave Nimbus Coast Halcyon quartermast Northwind Foundry & Co Linnea forecast Glide Vantage Mercury Brightwave Nimbus Coast Halcyon quartermast Northwind Foundry & Co
4,408
OSS projects hosted
1.42M
GitHub stars across all hosted projects
38 min
Avg time-to-first-docs-page
240,118
Search queries served daily
— Built for maintainers

The four things you skip when you'd rather be coding.

01 · GitHub-flavored

Your repo is the CMS.

Codex reads docs/ on every push. GFM admonitions, tabs, code groups, frontmatter — all just markdown you commit. The deploy log is your changelog.

  • Branch previews on every PR
  • "Edit this page" links straight to GitHub
  • Versioned by npm tag — latest, next, v1
drizzle-team / drizzle-orm · main 12s ago
priya.anand · docs: clarify pgTable composite keys
a8e1d2c · 38s ago
deployed
marcus.t · add example: composite unique index
f3b21a4 · 2h ago
preview · #284
hana.s · migrations: stable since v0.30 (note)
b1c842e · yesterday
deployed
14 deploys this week · median 11s
function pgTable — extracted from /src/pg-core/table.ts:24
/** Defines a Postgres table backed by a typed schema. */
export function pgTable<N extends string, C extends ColumnsMap>(
name: N,
columns: C,
extra?: TableExtraConfig<C>
): PgTable<N, C>
// Parameters
name · string — Database identifier.
columns · Record<string, Column> — Object mapping JS field → column helper.
extra · TableExtraConfig — Indexes, foreign keys, checks, RLS.
02 · API reference

Generated from your types — never out of date.

Codex parses your TypeScript types and JSDoc blocks at build time and produces a real API reference. Linked back to source on GitHub, with the line number you last touched.

  • TypeScript + JSDoc, no annotations required
  • Marks @deprecated automatically
  • Cross-links between types, fns, and prose docs
03 · Live sandboxes

Examples that compile in the page.

Drop a StackBlitz, CodeSandbox, or our own WebContainer-powered runner. Readers see types update as they type — no leaving the docs to verify a snippet.

  • WebContainer for node-only examples (free tier)
  • StackBlitz + CodeSandbox embed shortcodes
  • "Fork to GitHub" button writes a real repo
WebContainer · ready
import { drizzle } from 'drizzle-orm/...'
import { users } from './schema'

const db = drizzle(client)

const rows = await db
  .select()
  .from(users)
  .where(eq(users.email, '[email protected]'))
  .limit(1)

console.log(rows)
stdout · 184ms
$ pnpm tsx index.ts
[
{ id: 1, email: '[email protected]', name: 'Priya', createdAt: 2026-04-08T12:01:42.114Z }
]
✓ exited 0 · 184ms
— Code blocks

Code that reads like the editor you write in.

Shiki under the hood, every theme you'd actually use, line highlighting that survives copy-paste. Tab between languages without losing your place.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// drizzle-orm · Postgres · schema
// Run: pnpm drizzle-kit push

import { pgTable, serial, text, timestamp, index }
  from 'drizzle-orm/pg-core'
import { relations } from 'drizzle-orm'

export const users = pgTable('users', {
  id:        serial('id').primaryKey(),
  email:     text('email').notNull().unique(),
  name:      text('name'),
  createdAt: timestamp('created_at').defaultNow().notNull(),
}, (t) => ({
  emailIdx: index('users_email_idx').on(t.email),
}))
Theme: Moonlight · Shiki 1.x · 16 lines SHA a8e1d2c · L4–L20 of examples/postgres/schema.ts
keyword
string
function
type
number
— ⌘K search

Search the API. Not the README.

Typesense-backed, ranks function names and types over prose, returns within 28ms even on a library with 412 exported symbols. Query logs are hashed before they hit our servers.

pgTable|
esc
API · 4 results
function pgTable (name, columns, extra?) → PgTable
type PgTableConfig interface · 6 props
function mysqlTable related · same shape, MySQL backend
function sqliteTable related · SQLite/D1 backend
Guides · 2 results
Defining your first pgTable guide · 4 min
Composite keys on pgTable recipe · 2 min
↑↓ navigate open P only types 28ms · typesense · query hashed

npm-tag versioning

Codex follows your dist-tags. Publish to next and docs/next.example.com appears automatically — including a redirect map for renamed pages.

latest · v0.32.4 next · v0.33.0-rc.2 v0 · sunset

i18n you can defer

Translate at your own pace — Codex falls back to source language for missing pages, with a banner pointing at the PR you'd open. Crowdin and Tolgee connectors built-in.

en · 100% zh-CN · 84% ja · 62% de · 38% pt-BR · 18%

Privacy-preserving analytics

See which pages get reads, which searches return zero results, which examples readers copy. No cookies, no IPs stored, no fingerprinting. GDPR by default.

Search that loves types

Typing PgTable ranks the type ahead of any prose. Filters: type:, fn:, guide: — power users get out of your way.

type: Promise28ms
fn: drizzle11ms
guide: migrations38ms
— Pricing

Free for OSS. Always.

If your repo is public, you pay nothing. The paid tiers are for the maintainers who treat this as a project, not a hobby.

OSS free forever
$0 / public repo

Everything. No upsells. We mean it.

Start free →
  • Unlimited pages, builds, deploys
  • Custom domain & auto-renewing TLS
  • Typesense search · 28ms median
  • API ref from TypeScript + JSDoc
  • WebContainer sandbox embeds
  • ·"Built with Codex" footer link
Most popular
Maintainer 1 project
$14 / month

For maintainers who want analytics, early features, and the ability to remove the footer.

$ codex upgrade →
  • Everything in OSS
  • Privacy-preserving analytics
  • Remove "Built with" footer
  • Early access to new features
  • Custom 404 + search results page
  • 2-week support SLA via email
Sponsor 5 projects
$99 / month

For maintainers running a small ecosystem of libraries.

Talk to us →
  • 5 projects under one workspace
  • Priority queue · 4hr build SLA
  • Slack channel with our team
  • Custom search synonyms
  • Voice in our public roadmap
— Maintainers shipping with Codex

No marketing copy. Just commit messages.

Migrated from Docusaurus on a Sunday afternoon. PageSpeed went from 41 to 99, search latency dropped 3x. I get GitHub issues about docs quality now, not docs bugs.

Priya Anand
Maintainer · drizzle-orm-rls

The JSDoc → API ref thing alone saved me from a weekend of writing markdown. 412 exported symbols, all documented, all linked to source.

Hana Suzuki
ML Lead · Glide · tiny-tensor

We've shipped to 28 locales on our schedule, not a translator's. The "show source language for untranslated" fallback is the right default — I wish every docs tool did this.

Yusuf Abara
Maintainer · halcyon-router

FAQ, but actually useful.

Is it really free for OSS, or are there hidden limits? +
No caps on pages, deploys, bandwidth, search queries, or contributors. The OSS tier shares the same infrastructure as our paid tier — we just ask for a small "Built with Codex" footer link. That's the entire deal.
How does it integrate with my GitHub repo for content? +
Install the GitHub app, point it at a folder (default docs/), and Codex listens for pushes. Pull-request previews get a comment with a live URL within 11s. CODEOWNERS entries automatically become reviewers on docs pages.
What about API reference auto-gen from TypeScript types? +
We parse your .d.ts outputs (TypeDoc-compatible) and JSDoc blocks at build. Every exported symbol gets a page with signatures, parameter docs, examples extracted from @example, and a link to the source line on GitHub.
Can I embed live runnable examples (StackBlitz / CodeSandbox)? +
Yes, with first-class shortcodes for StackBlitz, CodeSandbox, and our own WebContainer runner. For node-only examples you can run inline without an iframe round-trip — readers see types update as they type.
How is search privacy-preserving — do you log queries? +
Queries are SHA-256-hashed in the browser before they hit our servers, with a per-day rotating salt. We can show you "top searches" and "zero-result searches" without ever seeing the plaintext. No cookies, no IPs, no fingerprinting. The hashing code is in our public repo, link in the docs.

Your library deserves an honest docs site.

One command. 38 minutes. Custom domain on the OSS tier.