Overview
Thepull command generates or updates your TypeScript schema from Notion databases.
What it does
- Fetches database structure and properties
- Generates TypeScript types
- Updates your schema file
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate TypeScript schema from Notion databases
pull command generates or updates your TypeScript schema from Notion databases.
npx notcms-kit pull
| Option | Description | Default |
|---|---|---|
--env | Environment file path | [".env", ".env.local", ".dev.vars"] |
npx notcms-kit pull
npx notcms-kit pull --env .env.development
import { Schema } from 'notcms';
export const schema = {
// example
blog: {
id: "abc123...",
properties: {
title: "title",
content: "rich_text",
published: "checkbox",
publishDate: "date",
author: "relation",
tags: "multi_select"
}
}
} satisfies Schema;
{
"scripts": {
"schema:pull": "notcms-kit pull",
}
}