notion-cli
3
总安装量
3
周安装量
#56499
全站排名
安装命令
npx skills add https://github.com/inforix/notion-cli --skill notion-cli
Agent 安装分布
openclaw
3
gemini-cli
3
claude-code
3
github-copilot
3
codex
3
kimi-cli
3
Skill 文档
Notion CLI Skill
Use the notion binary from this repo to operate Notion. Prefer the local build when developing.
Install
- Homebrew:
brew install inforix/tap/notion-cli - Release binary: download from GitHub releases and place on PATH
- Local build:
go build -o ./bin/notion ./src/cmd/notion
Auth
Set a Notion integration token in the environment:
export NOTION_TOKEN=YOUR_TOKEN
Optional: store the token with the CLI (if supported):
notion auth set --token YOUR_TOKEN
Commands
Auth
notion auth set --token YOUR_TOKEN
notion auth status
notion auth clear
Pages
notion pages list --query "Project" --all
notion pages get <page_id>
notion pages create --body @page.json
notion pages update <page_id> --body @update.json
notion pages archive <page_id>
notion pages export <page_id> --assets=download -o page.md
Databases
notion databases get <db_id>
notion databases query <db_id> --body @query.json
notion databases create --body @database.json
notion databases update <db_id> --body @update.json
Blocks
notion blocks get <block_id>
notion blocks update <block_id> --body @block.json
notion blocks children append <block_id> --body @children.json
Users
notion users list --all
notion users get <user_id>
Comments
notion comments list --page-id <page_id>
notion comments list --block-id <block_id>
notion comments create --body @comment.json
Search
notion search --body @query.json
Examples
notion --version
notion pages list --query "Project"
notion pages export <page_id>
notion pages get <page_id>
notion pages create --body @page.json
notion pages update <page_id> --body @update.json
notion pages archive <page_id>
notion databases query <db_id> --body @query.json
notion blocks children append <block_id> --body @children.json
notion users list --all
notion comments list --page-id <page_id>
notion search --body @query.json
notion files create --body @file-upload.json
notion files read <file_upload_id>
notion files list --page-size 100
notion files read --body @file.json --output ./downloads/
Notes
- The CLI uses the Notion API and includes a
Notion-Versionheader by default. - Use
--notion-versionto override when testing a specific API version. - Use
--page-size,--cursor, and--allfor list pagination. - Use
--formatto render Go templates from JSON output. - Use
--versionor-Vto print the CLI version and exit.