Loading...
Loading...
Manage Notion pages, databases, and comments from the command line. Search, view, create, and edit content in your Notion workspace.
npx skill4agent add lox/notion-cli notionnotion-clinotion-cli --versiongo install github.com/lox/notion-cli@latestnotion-cli auth login # Authenticate with Notion
notion-cli auth status # Check authentication status
notion-cli auth logout # Clear credentialsNOTION_ACCESS_TOKENnotion-cli auth # Manage authentication
notion-cli page # Manage pages (list, view, create, upload, edit)
notion-cli db # Manage databases (list, query)
notion-cli search # Search the workspace
notion-cli comment # Manage comments (list, create)
notion-cli tools # List available MCP toolsnotion-cli search "meeting notes" # Search workspace
notion-cli search "project" --limit 5 # Limit results
notion-cli search "query" --json # JSON output# 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"
# 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 --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"notion-cli db list # List databases
notion-cli db list --json
notion-cli db query <database-url-or-id> # Query a database
notion-cli db query <id> --jsonnotion-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!"--jsonnotion-cli page list --json | jq '.[0].url'
notion-cli search "api" --json | jq '.[] | .title'notion-cli searchnotion-cli page edit --help--rawpage view--json