A typed client for every model. Run one command and your content model becomes a typed client, with no manual definitions to maintain.
Command to generate typed code
Field types, mapped to real TypeScript
Types matching what’s modeled in the Dashboard
Interfaces reading the same schema — SDK, REST, webhooks
Generated, not hand-written
Add a field in the Dashboard, then run `cairn typegen` — by hand, in CI, or as a predev script — and it shows up typed in your client. No manual type definitions to maintain, and no drift between what your schema says and what your editor autocompletes.
const post = await cairn.posts.findOne({
where: { slug: 'hello-world' },
select: ['title', 'author', 'body'],
})
post.titel // ✕ Type error: did you mean 'title'?Query your way
Prefer raw REST calls or the generated TypeScript client — both read from the same models, with the same field names, the same pagination, and the same error shapes. Pick whichever fits the part of your stack you're building.
$ curl https://api.cairn.dev/v1/posts/hello-world
{ "title": "Hello World", "author": { "name": "..." } }Every way to connect
A fully typed client generated on demand from your schema, via `cairn typegen`.
Predictable REST endpoints for every model, ready for any HTTP client.
Fire events to downstream systems the moment content changes.
Every model you define ships with a typed client, ready to import.