Notion CLI
$ notion Community Med RiskNotion CLI (notion, 4ier/notion-cli) provides a fast single Go binary covering Notion pages, databases, blocks, comments, and search. It automatically outputs clean --json for scripts/agents while supporting native Markdown reading/writing and shorthand --filter syntax.
brew install 4ier/tap/notion-cli Use notion CLI for deterministic --json piping, Markdown block export, and shell database queries; use Notion's official hosted MCP when OAuth user-level workspace permissions are preferred over an integration token.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Built specifically with agents and pipes in mind: --json output, Markdown block conversion, shorthand filters, and NOTION_TOKEN env auth.
--jsonsupported consistently acrosssearch,page,db, andblock- Non-interactive
NOTION_TOKENand--with-tokenauth
Notion integration tokens can only access pages/databases explicitly shared with the integration, creating a natural RBAC boundary.
- Integration-level page sharing restricts workspace exposure
- Supports read-only Notion integration capabilities
Single Go binary distributed via Homebrew tap, npm wrapper (@4ier/notion-cli), go install, Scoop, and Docker.
brew install 4ier/tap/notion-cliandnpm install -g @4ier/notion-cli
Saves agents from writing verbose Notion block-JSON payloads thanks to built-in Markdown support and shorthand --filter.
- Markdown-to-block and block-to-Markdown conversion
Community-maintained MIT project (4ier/notion-cli), not an official Notion Labs binary.
- Third-party maintainer rather than official Notion organization
Clear README and built-in --help, though third-party docs are less standardized than official SDKs.
- GitHub README and command help pages
Security, Auth & Guardrails
Reads NOTION_TOKEN from environment variables or stores integration tokens locally via notion auth login --with-token.
CLI is free (MIT); Notion integration tokens work on all Notion plans including Free.
# Notion CLI Agent Rules - Share only specific target pages/databases with the `NOTION_TOKEN` integration so the blast radius is scoped by Notion permissions. - Always pass `--json` on read/search commands and check parent IDs before creating pages. - Require explicit human approval before archiving, deleting blocks, or bulk-updating database properties.
Agent-Ready Command Recipes
Safe Read-Only Queries
notion search "architecture" --json
Searches pages and databases shared with the integration token and returns JSON metadata.
notion page get <PAGE_ID> --json
Fetches page properties and metadata cleanly without modifying workspace content.
Controlled Writes & Previews
notion page create --parent <PARENT_PAGE_ID> --title "Agent Research Notes" --json
Creates a single child page under an explicitly approved parent page ID.
Strengths for Agents
- + Clean
--jsonoutput andNOTION_TOKENauth designed for agent pipelines. - + Native Markdown conversion avoids verbose Notion block JSON construction.
- + Notion integration sharing naturally limits access to approved pages and databases.
Caveats & Pitfalls
- ! Community project (
4ier/notion-cli), not an official Notion Labs CLI. - ! Requires creating a Notion Internal Integration and manually sharing target pages with it.