notion-cli
Original:🇺🇸 English
Translated
Use this skill to operate Notion via the `notion` CLI built from this repo, including install steps and auth setup.
2installs
Sourceinforix/notion-cli
Added on
NPX Install
npx skill4agent add inforix/notion-cli notion-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Notion CLI Skill
Use the binary from this repo to operate Notion. Prefer the local build when developing.
notionInstall
- 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_TOKENOptional: store the token with the CLI (if supported):
notion auth set --token YOUR_TOKENCommands
Auth
notion auth set --token YOUR_TOKEN
notion auth status
notion auth clearPages
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.mdDatabases
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.jsonBlocks
notion blocks get <block_id>
notion blocks update <block_id> --body @block.json
notion blocks children append <block_id> --body @children.jsonUsers
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.jsonSearch
notion search --body @query.jsonExamples
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.jsonNotes
- The CLI uses the Notion API and includes a header by default.
Notion-Version - Use to override when testing a specific API version.
--notion-version - Use ,
--page-size, and--cursorfor list pagination.--all - Use to render Go templates from JSON output.
--format - Use or
--versionto print the CLI version and exit.-V