Basic Setup
To start using NotCMS, you need to initialize a client with your schema and credentials:Prerequisites
Before initializing the client, ensure you have:- Generated schema - Run
npx notcms-kit init
to generate for the first time ornpx notcms-kit pull
to update your schema - Environment variables - Set up your API credentials
- Installed NotCMS - Add
notcms
to your project dependencies
Environment Variables
Required Variables
Loading Environment Variables
- Next.js
- Node.js
- Vite
Framework-Specific Setup
Next.js App Router
Remix
SvelteKit
Troubleshooting
Common Issues
Environment variables not loading
Environment variables not loading
- Check
.env
file exists in project root - Ensure you’re using a loader like
dotenv
- Verify variable names match exactly
Authentication failed
Authentication failed
- Verify
NOTCMS_SECRET_KEY
is correct - Check
NOTCMS_WORKSPACE_ID
matches your workspace - Ensure API key has necessary permissions
Schema not found
Schema not found
- Run
npx notcms-kit pull
to generate schema - Check import path is correct
- Ensure schema file exports correctly
TypeScript errors
TypeScript errors
- Update to latest NotCMS version
- Regenerate schema with
npx notcms-kit pull
- Check TypeScript version compatibility