notion-cli
Work with Notion from the terminal using the `notion` CLI. Use when the user needs to read, create, update, query, or manage Notion pages, databases, blocks, comments, users, or files programmatically. Covers the entire Notion API with 44 commands. Triggers: Notion workspace automation, database queries, page creation, block manipulation, comment threads, file uploads, relation management, database export, multi-workspace management, or any Notion API interaction from the command line. --- # Notion CLI `notion` is a CLI for the Notion API. Single Go binary, full API coverage, dual output (pretty tables for humans, JSON for agents). ## Install ```bash # Homebrew brew install 4ier/tap/notion-cli # Go go install github.com/4ier/notion-cli@latest # npm npm install -g notion-cli-go # Or download binary from GitHub Releases # https://github.com/4ier/notion-cli/releases ``` ## Auth ```bash notion auth login --with-token <<< "ntn_xxxxxxxxxxxxx" # or interactive notion auth login --with-token --profile work <<< "ntn_xxx" # save as named profile export NOTION_TOKEN=ntn_xxxxxxxxxxxxx # env var alternative notion auth status # show current profile notion auth switch # interactive profile picker notion auth switch work # switch to named profile notion auth doctor # health check ``` ## Command Reference ### Search ```bash notion search "query" # search everything notion search "query" --type page # pages only notion search "query" --type database # databases only ``` ### Pages ```bash notion page view <id|url> # render page content notion page list # list workspace pages notion page create <parent> --title "X" --body "content" notion page create <db-id> --db "Name=Review" "Status=Todo" # database row notion page delete <id>
更新日志: Source: GitHub https://github.com/4ier/notion-cli
还没有评论,快来第一个发言吧。