π¦ ClawHub
Notion Manager
by @willykinfoussia
Notion CLI for creating and managing pages, databases, and blocks.
TERMINAL
clawhub install notion-cliπ About This Skill
name: notion-cli description: Notion CLI for creating and managing pages, databases, and blocks. homepage: https://github.com/litencatt/notion-cli metadata: {"openclaw":{"emoji":"π","requires":{"env":["NOTION_TOKEN"]},"primaryEnv":"NOTION_TOKEN"}}
notion
Use *notion-cli* to create/read/update pages, data sources (databases), and blocks.
Setup
npm install -g @iansinnott/notion-climkdir -p ~/.config/notion
- echo "ntn_your_key_here" > ~/.config/notion/api_key
Usage
All commands require the *NOTION_TOKEN* environment variable to be set:
export NOTION_TOKEN=$(cat ~/.config/notion/api_key)
Common Operations
notion-cli search --query "page title"
notion-cli page retrieve
notion-cli page retrieve
curl -X POST https://api.notion.com/v1/pages \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Content-Type: application/json" \
-H "Notion-Version: 2025-09-03" \
--data '{
"parent": { "database_id": "YOUR_DATABASE_ID" },
"properties": {
"Name": {
"title": [
{
"text": {
"content": "Nouvelle idΓ©e"
}
}
]
}
}
}'
notion-cli db query
curl -X PATCH https://api.notion.com/v1/pages/PAGE_ID \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Content-Type: application/json" \
-H "Notion-Version: 2025-09-03" \
--data '{
"properties": {
"Name": {
"title": [
{
"text": {
"content": "Nouveau titre"
}
}
]
},
"Status": {
"status": {
"name": "In progress"
}
},
"Priority": {
"select": {
"name": "High"
}
},
"Due date": {
"date": {
"start": "2026-02-10"
}
},
"Description": {
"rich_text": [
{
"text": {
"content": "Description mise Γ jour"
}
}
]
}
}
}'
notion-cli db retrieve
Property Types
Common property formats for database items:
{"title": [{"text": {"content": "..."}}]}{"rich_text": [{"text": {"content": "..."}}]}{"status": {"name": "Option"}}{"select": {"name": "Option"}}{"multi_select": [{"name": "A"}, {"name": "B"}]}{"date": {"start": "2024-01-15", "end": "2024-01-16"}}{"checkbox": true}{"number": 42}{"url": "https://..."}{"email": "a@b.com"}Examples
notion-cli search --query "AIStories"
notion-cli db query 2faf172c094981d3bbcbe0f115457cda \
-a '{
"property": "Status",
"status": { "equals": "Backlog" }
}'
notion-cli page retrieve 2fdf172c-0949-80dd-b83b-c1df0410d91b -r
curl -X PATCH https://api.notion.com/v1/pages/2fdf172c-0949-80dd-b83b-c1df0410d91b \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Content-Type: application/json" \
-H "Notion-Version: 2025-09-03" \
--data '{
"properties": {
"Status": {
"status": {
"name": "In progress"
}
}
}
}'
Key Features
notion-cli db query without arguments to enter interactive mode--raw flag for complete API responses-a flag for complex filters with AND/OR conditionsNotes
notion-cli help for complete command referenceReferences
π‘ Examples
notion-cli search --query "AIStories"
notion-cli db query 2faf172c094981d3bbcbe0f115457cda \
-a '{
"property": "Status",
"status": { "equals": "Backlog" }
}'
notion-cli page retrieve 2fdf172c-0949-80dd-b83b-c1df0410d91b -r
curl -X PATCH https://api.notion.com/v1/pages/2fdf172c-0949-80dd-b83b-c1df0410d91b \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Content-Type: application/json" \
-H "Notion-Version: 2025-09-03" \
--data '{
"properties": {
"Status": {
"status": {
"name": "In progress"
}
}
}
}'
βοΈ Configuration
npm install -g @iansinnott/notion-climkdir -p ~/.config/notion
- echo "ntn_your_key_here" > ~/.config/notion/api_key
π Tips & Best Practices
notion-cli help for complete command reference