notion-cli
A CLI for Notion, built in Go.
Install
Homebrew
brew install inforix/tap/notion-cli
Release binary
Download from the GitHub releases page and place the binary on your PATH.
From source
go build -o ./bin/notion ./src/cmd/notion
Auth
Set a Notion integration token:
export NOTION_TOKEN=YOUR_TOKEN
Usage
notion --help
notion pages export <page_id>
Export to Markdown
notion pages export <page_id> --assets=link
notion pages export <page_id> --assets=download -o page.md
Auth
notion auth status
notion auth set --token YOUR_TOKEN
Search
notion search --body @query.json
Development
- Source code lives in
./src/
- Build output goes to
./bin/ or ./dist/ (ignored by git)
Releases
This project uses GoReleaser. To validate config locally:
goreleaser check