📝 notion-cli - Notion from the command line.

A CLI for the Notion API — agent-first, human-friendly.
$ notion pages list --database=Tasks -f Status -f Priority
ID TITLE STATUS PRIORITY CREATED
2f452097-527f-80e1-86df-e5a7719d75d9 Fix login bug In progress High 2026-02-18
3a561098-638f-91f2-97ef-f6b8820e86e0 Update docs Not started Medium 2026-02-17
Agent Skill
This CLI is available as an open agent skill for AI assistants including
Claude Code, OpenClaw,
Codex, Cursor, GitHub Copilot, and
35+ agents.
npx skills add dedene/notion-cli
Installation
Homebrew (macOS/Linux)
brew install dedene/tap/notion
Go
go install github.com/dedene/notion-cli/cmd/notion@latest
Download Binary
Download from GitHub Releases.
Available for:
- macOS: Intel & Apple Silicon (tar.gz)
- Linux: amd64 & arm64 (tar.gz)
- Windows: amd64 & arm64 (zip)
Setup
- Create an integration at https://www.notion.so/my-integrations
- Set your token:
export NOTION_TOKEN=<your-token>
# Or save to keyring:
notion auth add default <your-token>
- Share pages/databases with your integration in Notion
Usage
Pages
notion pages list # list all pages
notion pages list --database=<id> # list from database
notion pages list -f Status -f Priority # show properties inline
notion pages get <id-or-url> # get page details
notion pages create --parent=<id> --title="New Page"
notion pages update <id> --set="Status=Done" # smart type detection
notion pages archive <id>
Markdown
echo "# Hello" | notion pages append-md <id> # append markdown
notion pages export-md <id-or-url> # export as markdown
Databases
notion databases list # list all databases
notion databases get <id> # get schema
notion databases query <id> # query pages
notion databases query <id> -w "Status.equals(Done)" # with filter
Blocks
notion blocks list <page-id> # list blocks
notion blocks get <block-id> # get block
notion blocks delete <block-id> # delete block
Search
notion search "meeting notes" # search workspace
notion search "project" --json # JSON output
Users
notion users list # list workspace users
notion users me # current user
Batch Operations
# Process JSONL from stdin
cat operations.jsonl | notion batch
notion pages list # table (default)
notion pages list --json # JSON for scripts/agents
notion pages list --plain # TSV for piping
Configuration
| Environment Variable |
Description |
Default |
NOTION_TOKEN |
API token |
- |
NOTION_PROFILE |
Auth profile name |
default |
NO_COLOR |
Disable colored output |
- |
About
This CLI wraps the Notion API for terminal and agent use. Features
include:
- URL support: Use Notion URLs or IDs interchangeably
- Smart updates: Auto-detects property types for
--set flag
- Parallel fetching: Fast markdown export with concurrent API calls
- Rate limiting: Built-in respect for Notion's API limits
- Auth profiles: Store multiple tokens in system keyring
No affiliation with Notion Labs, Inc.
License
MIT