notion

Manage Notion pages, databases, and comments from the command line. Search, view, create, and edit content in your Notion workspace.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "notion" with this command: npx skills add lox/notion-cli/lox-notion-cli-notion

Notion CLI

A CLI to manage Notion from the command line, using Notion's remote MCP server.

Prerequisites

The notion-cli command must be available on PATH. To check:

notion-cli --version

If not installed:

go install github.com/lox/notion-cli@latest

Or see: https://github.com/lox/notion-cli

Authentication

The CLI uses OAuth authentication. On first use, it opens a browser for authorization:

notion-cli auth login      # Authenticate with Notion
notion-cli auth status     # Check authentication status
notion-cli auth logout     # Clear credentials

For CI/headless environments, set NOTION_ACCESS_TOKEN environment variable.

Available Commands

notion-cli auth            # Manage authentication
notion-cli page            # Manage pages (list, view, create, upload, edit)
notion-cli db              # Manage databases (list, query, create entries)
notion-cli search          # Search the workspace
notion-cli comment         # Manage comments (list, create)
notion-cli tools           # List available MCP tools

Common Operations

Search

notion-cli search "meeting notes"           # Search workspace
notion-cli search "project" --limit 5       # Limit results
notion-cli search "query" --json            # JSON output

Pages

All page commands accept a URL, name, or ID to identify pages.

# List pages
notion-cli page list
notion-cli page list --limit 10
notion-cli page list --json

# View a page (renders as markdown in terminal)
notion-cli page view <page>
notion-cli page view <page> --raw            # Show raw Notion markup
notion-cli page view <page> --json           # JSON output
notion-cli page view "Meeting Notes"         # By name
notion-cli page view https://notion.so/...   # By URL

# Create a page
notion-cli page create --title "New Page"
notion-cli page create --title "Doc" --content "# Heading\n\nContent here"
notion-cli page create --title "Child" --parent "Engineering"   # Parent by name
notion-cli page create --title "Child" --parent <page-id>       # Parent by ID

# Upload a markdown file as a page
notion-cli page upload ./document.md
notion-cli page upload ./doc.md --title "Custom Title"
notion-cli page upload ./doc.md --parent "Parent Page Name"
notion-cli page upload ./doc.md --parent-db <db-id>         # Upload as database entry

# Sync a markdown file (create or update)
# First run creates the page and writes notion-id to the file's frontmatter.
# Subsequent runs update the page content using the stored notion-id.
notion-cli page sync ./document.md
notion-cli page sync ./document.md --parent "Engineering"   # Set parent on first sync
notion-cli page sync ./document.md --parent-db <db-id>      # Sync as database entry
notion-cli page sync ./document.md --title "Custom Title"

# Edit a page
notion-cli page edit <page> --replace "New content"
notion-cli page edit <page> --find "old text" --replace-with "new text"
notion-cli page edit <page> --find "section" --append "additional content"

Databases

All database commands accept a URL, name, or ID to identify databases.

# List databases
notion-cli db list                          # List databases
notion-cli db list -q "project"             # Filter by name
notion-cli db list --json

# Query a database
notion-cli db query <database-url-or-id>    # Query a database
notion-cli db query <id> --json

# Create an entry in a database
notion-cli db create <database> --title "Entry Title"
notion-cli db create <database> -t "Title" --prop "Status=Not started"
notion-cli db create <database> -t "Title" --prop "date:Due:start=2026-03-01"
notion-cli db create <database> -t "Title" --content "Body text"
notion-cli db create <database> -t "Title" --file ./notes.md    # Body from file
notion-cli db create <database> -t "Title" --json

Property format: Use --prop Key=Value for text/status properties. Date properties use expanded keys: --prop "date:Date Field:start=2026-01-15".

Comments

notion-cli comment list <page-id>           # List comments on a page
notion-cli comment list <page-id> --json

notion-cli comment create <page-id> --content "Great work!"

Output Formats

Most commands support --json for machine-readable output:

notion-cli page list --json | jq '.[0].url'
notion-cli search "api" --json | jq '.[] | .title'

Tips for Agents

  1. Search first - Use notion-cli search to find pages before operating on them
  2. Use URLs or IDs - Both work for page/database references
  3. Explicit parent types - Use --parent for page parents, --parent-db for database parents on page sync/page upload
  4. Query databases first - Use notion-cli db query <id> to see the schema and property types before creating entries
  5. Check --help - Every command has detailed help: notion-cli page edit --help
  6. Raw output - Use --raw with page view to see the original Notion markup
  7. JSON for parsing - Use --json when you need to extract specific fields

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Proactive Claw Integrations

Optional network and automation helpers for Proactive Claw core: GitHub/Notion cross-skill context, team calendar awareness, daemon installer, and optional c...

Registry SourceRecently Updated
0144
Profile unavailable
Coding

notion

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

notion-cli

No summary provided by upstream source.

Repository SourceNeeds Review
-25
4ier