← Back to Skills Marketplace
froemic

Notion CLI – Command Line Interface based access to Notion for your agent

by FroeMic · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
3000
Downloads
2
Stars
7
Active Installs
1
Versions
Install in OpenClaw
/install notion-cli-agent
Description
Access and manage your Notion workspace via a CLI to search, create, update, and delete pages, databases, blocks, users, and comments with multiple output fo...
README (SKILL.md)

notion-cli Interact with your Notion workspace via the notion-cli.

A production-grade CLI for the Notion API that supports searching, creating and managing pages, databases, blocks, users, and comments with multiple output formats (JSON, table, CSV).

Install Clone and install the CLI:

git clone https://github.com/FroeMic/notion-cli
cd notion-cli
npm install
npm run build
npm link

Set NOTION_API_KEY environment variable:

  1. Create an integration at https://www.notion.so/profile/integrations
  2. Copy the Internal Integration Secret (starts with ntn_ or secret_)
  3. Share any pages/databases you want to access with the integration
  • Recommended: Add to ~/.claude/.env for Claude Code
  • Alternative: Add to ~/.bashrc or ~/.zshrc: export NOTION_API_KEY="your-api-key"

Optional: Set NOTION_DEBUG=true for verbose request/response logging.

Repository: https://github.com/FroeMic/notion-cli

Commands Search across your workspace:

notion search [query]                                  # Search pages, databases, and data sources
notion search [query] --filter page                    # Search only pages
notion search [query] --filter database                # Search only databases
notion search [query] --sort ascending                 # Sort by last edited time

Work with pages:

notion pages get \x3Cpage-id>                             # Get page details
notion pages create --parent \x3Cid> --title \x3Ctext>       # Create a new page
notion pages update \x3Cpage-id> --properties \x3Cjson>      # Update page properties
notion pages archive \x3Cpage-id>                         # Archive a page
notion pages restore \x3Cpage-id>                         # Restore an archived page
notion pages property \x3Cpage-id> \x3Cproperty-id>          # Get a specific property value

Work with databases:

notion databases get \x3Cdatabase-id>                     # Get database schema
notion databases create --parent \x3Cid> --title \x3Ctext>   # Create a database
notion databases update \x3Cdatabase-id> --title \x3Ctext>   # Update database metadata
notion databases query \x3Cdata-source-id>                # Query records in a data source
notion databases query \x3Cid> --filter \x3Cjson>            # Query with filters
notion databases query \x3Cid> --sort \x3Cjson>              # Query with sorting

Work with blocks (page content):

notion blocks get \x3Cblock-id>                           # Get a block
notion blocks children \x3Cblock-id>                      # List child blocks
notion blocks append \x3Cblock-id> --content \x3Cjson>       # Append new blocks
notion blocks update \x3Cblock-id> --content \x3Cjson>       # Update a block
notion blocks delete \x3Cblock-id>                        # Delete a block

Work with users:

notion users list                                      # List workspace members
notion users get \x3Cuser-id>                             # Get user details
notion users me                                        # Get the authenticated bot user

Work with comments:

notion comments list --block \x3Cblock-id>                # List comments on a block
notion comments create --page \x3Cpage-id> --content \x3Ctext>  # Add a comment to a page

Global options (available on all commands):

--api-key \x3Ckey>                                        # Override NOTION_API_KEY env var
-f, --format \x3Cfmt>                                     # Output format: json (default), table, csv
--limit \x3Cn>                                            # Max results to return
--cursor \x3Ccursor>                                      # Pagination cursor

Key Concepts

Concept Purpose Example
Pages Individual Notion pages A meeting note, a project brief
Databases Structured collections of pages A task tracker, a CRM table
Data Sources Individual tables within a database A specific view/table in a database
Blocks Content elements within a page Paragraphs, headings, lists, code blocks
Properties Typed fields on database pages Title, status, date, select, relation
Users Workspace members and integrations Team members, bot integrations
Comments Discussion threads on pages/blocks Feedback, review notes

API Reference

  • Base URL: https://api.notion.com/v1
  • API Version: 2022-06-28
  • Auth: Authorization: Bearer $NOTION_API_KEY
  • Rate Limits: Automatic retry with exponential backoff (up to 3 retries)

Common API Operations Search for a page:

curl -X POST https://api.notion.com/v1/search \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"query": "Meeting Notes", "filter": {"value": "page", "property": "object"}}'

Query a database with filters:

curl -X POST https://api.notion.com/v1/databases/\x3Cdatabase-id>/query \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"filter": {"property": "Status", "status": {"equals": "In Progress"}}}'

Create a page in a database:

curl -X POST https://api.notion.com/v1/pages \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"parent": {"database_id": "\x3Cdatabase-id>"}, "properties": {"Name": {"title": [{"text": {"content": "New Task"}}]}}}'

Append content to a page:

curl -X PATCH https://api.notion.com/v1/blocks/\x3Cblock-id>/children \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json" \
  -d '{"children": [{"object": "block", "type": "paragraph", "paragraph": {"rich_text": [{"type": "text", "text": {"content": "Hello world"}}]}}]}'

Notes

  • The integration must be explicitly shared with each page or database you want to access (via Notion UI: ... menu > Connections > Add your integration).
  • Pages can accept IDs as UUIDs or Notion URLs — the CLI will parse both formats.
  • All list endpoints support cursor-based pagination via --limit and --cursor.
  • Output format can be set to json (default), table, or csv with the -f flag.
  • Property types include: title, rich_text, number, select, multi_select, status, date, people, files, checkbox, url, email, phone_number, relation, rollup, formula, and timestamp fields.

Files 1 total

  • SKILL.md (this file)
Usage Guidance
This skill appears to be a wrapper for a third‑party Notion CLI and reasonably requires your Notion integration key, but the registry metadata omits that requirement and the SKILL.md instructs cloning and building a GitHub repo. Before installing or running these commands: 1) Verify the GitHub repository and review its code (npm install/build runs arbitrary JavaScript). 2) Prefer using the --api-key option for one-off runs rather than permanently storing the key in shell rc files, and create a scoped Notion integration with minimal permissions. 3) If you expect the skill to be self‑contained, ask the publisher why the registry metadata doesn't declare NOTION_API_KEY. 4) If you cannot or will not review the repo, consider using an official Notion SDK or a skill that explicitly declares required credentials and an install mechanism.
Capability Analysis
Type: OpenClaw Skill Name: notion-cli-agent Version: 1.0.0 The skill bundle provides instructions for installing and using a Notion CLI tool. All commands and setup steps, including handling the `NOTION_API_KEY` and installing dependencies via `git clone` and `npm install`, are standard for interacting with the Notion API and developing Node.js CLI tools. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent within the provided files. The instructions are clearly aligned with the stated purpose of interacting with Notion.
Capability Assessment
Purpose & Capability
The skill name and SKILL.md are consistent with a Notion CLI (operations and examples match the Notion API). However the registry metadata provides no description and does not declare the Notion API key (primary credential) even though the instructions explicitly require NOTION_API_KEY.
Instruction Scope
Runtime instructions are focused on Notion CLI usage and how to call the Notion API. They do not ask the agent to read unrelated system files, but they do recommend adding an API key into agent or shell env files (e.g., ~/.claude/.env or ~/.bashrc), which is expected for functionality but is a scope/handling decision the user should consider carefully.
Install Mechanism
There is no automated install spec in the registry; SKILL.md tells the user/agent to git clone a third‑party GitHub repository and run npm install/build/link. Cloning and building arbitrary third‑party code is potentially risky if done automatically — GitHub is a common host, but the skill does not declare that it will or will not perform this action itself.
Credentials
The instructions require NOTION_API_KEY (and optionally NOTION_DEBUG) but the skill metadata lists no required environment variables or primary credential. This mismatch is an incoherence: the skill needs a secret to function but does not declare it in its requirements, so a user/agent may not be aware of the credential scope ahead of time.
Persistence & Privilege
The skill is not marked always:true, declares no config paths to modify, and has no code in the package — it does not request elevated persistence or platform-wide privileges in the registry metadata.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install notion-cli-agent
  3. After installation, invoke the skill by name or use /notion-cli-agent
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
A production-grade CLI for the Notion API that supports searching, creating and managing pages, databases, blocks, users, and comments with multiple output formats (JSON, table, CSV). Based on https://github.com/FroeMic/notion-cli
Metadata
Slug notion-cli-agent
Version 1.0.0
License
All-time Installs 7
Active Installs 7
Total Versions 1
Frequently Asked Questions

What is Notion CLI – Command Line Interface based access to Notion for your agent?

Access and manage your Notion workspace via a CLI to search, create, update, and delete pages, databases, blocks, users, and comments with multiple output fo... It is an AI Agent Skill for Claude Code / OpenClaw, with 3000 downloads so far.

How do I install Notion CLI – Command Line Interface based access to Notion for your agent?

Run "/install notion-cli-agent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Notion CLI – Command Line Interface based access to Notion for your agent free?

Yes, Notion CLI – Command Line Interface based access to Notion for your agent is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Notion CLI – Command Line Interface based access to Notion for your agent support?

Notion CLI – Command Line Interface based access to Notion for your agent is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Notion CLI – Command Line Interface based access to Notion for your agent?

It is built and maintained by FroeMic (@froemic); the current version is v1.0.0.

💬 Comments