Notion skill and CLI that let you create pages, sync notes, and manage database metadata in a Notion workspace.
It works by providing a Codex skill definition plus a Node CLI in scripts/notion that talks to the Notion API.
- Create pages in Notion databases with structured properties and markdown bodies.
- Sync local notes into Notion using rule files.
- Cache database metadata for fast lookups.
- Parse markdown blocks into structured payloads for automation.
cd scripts/notion
npm install
export NOTION_TOKEN=secret_xxx
node notion.js list-db --limit 5 --format tableIf you install the local bin, you can replace node notion.js with notion.
- Set
NOTION_TOKEN(orNOTION_API_KEY) in the environment or a.envfile. - Run
node notion.js sync-metaonce to create$HOME/.notion-cache.production.json.
Use this skill when you want to:
- Add entries to Notion databases.
- Create new Notion pages with structured data.
- Save content from Dendron notes to Notion.
- Track daily stories, tasks, lessons, or other personal data in Notion.
# List databases
node notion.js list-db --limit 10 --format table
# Create a page
node notion.js create --database-id <db-id> --properties Name="Daily note" --properties Date=2026-01-29
# Sync metadata cache
node notion.js sync-meta
# Lookup pages/databases by query
node notion.js lookup "project alpha" --filter object:page --sort last_edited_time:descending --limit 10
# Fetch pages from a database
node notion.js fetch --database-id <db-id> --query "urgent" --output md
# Sync notes using rules
node notion.js sync --dry-runFull CLI reference lives in scripts/notion/USAGE.md.
Create a database entry from a single markdown block.
- Confirm the target database and the block content.
- Parse the block into
{ title, properties, body }usingparse-block(preferprintfpiping). - Use
createwith the parsed output to create the entry.
printf "%s" "## Weekend grocery reminder
- time: 08:25
- source: SMS
Please pick up apples, oats, and milk on the way home." | node notion.js parse-blockcd scripts/notion
npm test