FroeMic

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

AI 智慧體v1.0.0
作者:FroeMic更新於 2026-05-11notion-cli-agent@clawhub_froemic/notion-cli-agent
上下文管理工具呼叫#Notion

據 AlphaMoat 統計,截至 2026-09,Notion CLI – Command Line Interface based access to Notion for your agent 累計下載 4,235 次、獲 2 個星標,在全部 5,078 個 AI 技能中排名第 2,354 位,在「AI 智慧體」分類(969 個)中排名第 458 位。

累計安裝
148
累計下載
4235
星標
2
全站排名
#2,354
全站前 47% · 「AI 智慧體」前 48%
平台累計安裝累計下載星標評論
ClawHub ↗137389321
SkillHub ↗14842352—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

使用前需安裝 notion-cli 並配置 Notion 整合金鑰,且需將整合共享到目標頁面或資料庫。命令可建立、更新、歸檔或刪除工作區內容。應核驗並固定可信上游版本,在隔離環境中執行,授予最小頁面許可權;使用前審閱寫入與刪除操作,並保護憑據,避免放入不安全的 shell 配置、命令引數或除錯日誌。

資料釋出於 2026-10-29

可以用來做什麼

  • 搜尋工作區中的頁面或資料庫
  • 檢視或查詢資料庫結構與記錄
  • 在授權範圍內建立、更新或歸檔頁面和內容塊

什麼時候用

  • 整合僅獲訪問所需頁面和許可權時
  • 已核對上游版本且在隔離環境安裝時
  • 執行建立、更新、歸檔或刪除前已人工審閱時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

說明如何查詢指定 Notion 資料庫並更新頁面內容;不要連線工作區、讀取金鑰或執行更改。

月度資料趨勢

累計下載4235
2745354543452026-03 · 累計下載 28552026-05 · 累計下載 33832026-06 · 累計下載 35092026-07 · 累計下載 37722026-08 · 累計下載 39532026-09 · 累計下載 423526-0326-09
星標2
1232026-03 · 星標 22026-05 · 星標 22026-06 · 星標 22026-07 · 星標 22026-08 · 星標 22026-09 · 星標 226-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094235—2
2026-083953+4.8%2
2026-073772+7.5%2
2026-063509+3.7%2
2026-053383—2
2026-032855—2

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

6.5 KB · ClawHub v1.0.0
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
展開全部(共 149 行)
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 <page-id>                             # Get page details
notion pages create --parent <id> --title <text>       # Create a new page
notion pages update <page-id> --properties <json>      # Update page properties
notion pages archive <page-id>                         # Archive a page
notion pages restore <page-id>                         # Restore an archived page
notion pages property <page-id> <property-id>          # Get a specific property value
```

Work with databases:
```
notion databases get <database-id>                     # Get database schema
notion databases create --parent <id> --title <text>   # Create a database
notion databases update <database-id> --title <text>   # Update database metadata
notion databases query <data-source-id>                # Query records in a data source
notion databases query <id> --filter <json>            # Query with filters
notion databases query <id> --sort <json>              # Query with sorting
```

Work with blocks (page content):
```
notion blocks get <block-id>                           # Get a block
notion blocks children <block-id>                      # List child blocks
notion blocks append <block-id> --content <json>       # Append new blocks
notion blocks update <block-id> --content <json>       # Update a block
notion blocks delete <block-id>                        # Delete a block
```

Work with users:
```
notion users list                                      # List workspace members
notion users get <user-id>                             # Get user details
notion users me                                        # Get the authenticated bot user
```

Work with comments:
```
notion comments list --block <block-id>                # List comments on a block
notion comments create --page <page-id> --content <text>  # Add a comment to a page
```

Global options (available on all commands):
```
--api-key <key>                                        # Override NOTION_API_KEY env var
-f, --format <fmt>                                     # Output format: json (default), table, csv
--limit <n>                                            # Max results to return
--cursor <cursor>                                      # 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/<database-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": "<database-id>"}, "properties": {"Name": {"title": [{"text": {"content": "New Task"}}]}}}'
```

Append content to a page:
```
curl -X PATCH https://api.notion.com/v1/blocks/<block-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)

「AI 智慧體」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。