Skip to main content
Set up NotCMS in your project and start fetching content from Notion in minutes.

Prerequisites

Before you begin, make sure you have:
  • Node.js 18.17 or higher installed
  • A Notion account with at least one database
  • Basic knowledge of TypeScript (recommended)

Step 1: Install NotCMS

Step 2: Initialize Your Project

Use the NotCMS CLI to set up your project:
This command will:
  1. Check environment variables
  2. Create a notcms.config.json configuration file

Step 3: Configure Environment Variables

Add your NotCMS credentials to your .env file:
Get your credentials from the NotCMS Dashboard

Step 4: Pull Your Schema

Generate TypeScript types from your Notion databases:
This creates a type-safe schema file at src/notcms/schema.ts:

Step 5: Start Using NotCMS

Create a client and start querying your content:

What’s Next?

Configuration

Learn about advanced configuration options

SDK Reference

Explore the complete SDK API

Error Handling

Learn how to handle errors properly

Next.js Example

See a complete Next.js integration

Common Issues

Make sure your .env file is in the project root and you’re using a package like dotenv or dotenvx to load them.
Ensure your Notion databases have the correct permissions and your API key has access to them.
Run npx notcms-kit pull again to regenerate the schema if you’ve made changes to your Notion databases.