A modern, full-featured Notion CLI
npm install onotionA modern, full-featured Notion CLI.
``bash`
npm install -g onotion
1. Create a Notion integration at https://www.notion.so/my-integrations
2. Copy your Internal Integration Token
3. Run:
`bash`
onotion auth login
`bash`
onotion auth login # Store API token
onotion auth logout # Remove credentials
onotion auth whoami # Show current user
`bash`
onotion search "meeting notes"
onotion search "project" --type page
onotion search "tasks" --type database
`bash`
onotion db list # List all databases
onotion db query
onotion db query
onotion db schema
onotion db create -p
`bash`
onotion page get
onotion page get
onotion page create -p
onotion page create -p
onotion page update
onotion page append
onotion page append
onotion page delete
`bash`
onotion block get
onotion block list
onotion block append
onotion block append
onotion block delete
All commands support four output formats:
`bash`
onotion db list # Table (default)
onotion db list -o json # JSON
onotion db list -o plain # Plain text
onotion db list -o compact # JSONL with flattened fields
Fields and streaming:
`bash`
onotion db query
onotion db query
onotion db query
Note: --stream is supported with -o json or -o compact.
Config is stored in ~/.config/onotion/config.json.
Publishing is handled by CI on every push to main`. The pipeline auto-increments the patch version and publishes to npm, so do not manually tag or publish versions.
MIT