@andrzejchm/notion-cli 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -4
- package/dist/cli.js +485 -300
- package/dist/cli.js.map +1 -1
- package/docs/FEATURE-PARITY.md +24 -28
- package/docs/README.agents.md +63 -0
- package/docs/skills/using-notion-cli/SKILL.md +35 -4
- package/package.json +1 -1
package/docs/FEATURE-PARITY.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> This document tracks gaps and serves as a prioritized roadmap for closing them.
|
|
5
5
|
|
|
6
6
|
**Legend:**
|
|
7
|
-
- **CLI** = `@andrzejchm/notion-cli` (this repo, v0.
|
|
7
|
+
- **CLI** = `@andrzejchm/notion-cli` (this repo, v0.8.0)
|
|
8
8
|
- **MCP** = Official Notion MCP server
|
|
9
9
|
|
|
10
10
|
---
|
|
@@ -13,23 +13,23 @@
|
|
|
13
13
|
|
|
14
14
|
| Area | CLI | MCP | Parity |
|
|
15
15
|
|------|-----|-----|--------|
|
|
16
|
-
| Search |
|
|
16
|
+
| Search | Keyword + sort by last edited | Semantic + AI + connected sources + date/creator filters | Partial |
|
|
17
17
|
| Page read | Markdown via API | Markdown + discussions + transcripts | Partial |
|
|
18
18
|
| Page create | Under pages only | Under pages, databases, data sources; batch; templates; icon/cover | Partial |
|
|
19
19
|
| Page edit | Surgical replace via `--range` | Search-and-replace (multi-op), full replace, template apply, verification | Partial |
|
|
20
|
-
| Page properties | Read
|
|
20
|
+
| Page properties | Read + write via `update --prop` | Full read + write (update any property) | ✅ Parity |
|
|
21
21
|
| Move pages | - | Batch move to any parent | Gap |
|
|
22
22
|
| Duplicate pages | - | Duplicate with async content copy | Gap |
|
|
23
|
-
| Archive/delete |
|
|
23
|
+
| Archive/delete | `archive` | Trash pages | ✅ Parity |
|
|
24
24
|
| Database create | - | SQL DDL `CREATE TABLE` syntax | Gap |
|
|
25
25
|
| Database schema update | Read-only schema | `ADD/DROP/RENAME/ALTER COLUMN` via DDL | Gap |
|
|
26
26
|
| Database views | - | Create + update 10 view types with DSL | Gap |
|
|
27
|
-
| Comments | Page-level
|
|
27
|
+
| Comments | Page-level + block-level + thread replies, list with discussion IDs | Page-level + inline (selection-anchored) + reply to thread + rich text | Partial |
|
|
28
28
|
| Users | List all | List + search + fetch by ID + fetch self | Partial |
|
|
29
29
|
| Teams | - | List teamspaces + search | Gap |
|
|
30
|
-
| Create pages in DB | - | Full property support, date/place/checkbox expanded formats |
|
|
30
|
+
| Create pages in DB | `create-page --parent <db>` with `--prop` | Full property support, date/place/checkbox expanded formats | ✅ Parity |
|
|
31
31
|
| Batch operations | - | Create up to 100 pages, move up to 100 pages | Gap |
|
|
32
|
-
| Icon / Cover | - | Set emoji/image icon + cover on create and update |
|
|
32
|
+
| Icon / Cover | `--icon` / `--cover` on `create-page` | Set emoji/image icon + cover on create and update | Partial |
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -41,37 +41,33 @@ Ordered by impact for AI-agent workflows first, then developer productivity.
|
|
|
41
41
|
|
|
42
42
|
These gaps directly limit what an AI agent can accomplish through the CLI compared to using MCP directly.
|
|
43
43
|
|
|
44
|
-
#### 1. Update page properties
|
|
44
|
+
#### 1. ✅ Update page properties (shipped v0.7.0)
|
|
45
45
|
**MCP:** `update_properties` command — set title, status, dates, select, people, checkbox, numbers, etc. Supports `null` to clear.
|
|
46
|
-
**CLI:**
|
|
47
|
-
**
|
|
48
|
-
**Suggested command:** `notion update <id> --prop "Status=Done" --prop "Priority=High"`
|
|
46
|
+
**CLI:** `notion update <id> --prop "Status=Done"` — supports title, rich_text, select, status, multi_select, number, checkbox, url, email, phone_number, date.
|
|
47
|
+
**Status:** Shipped in v0.7.0.
|
|
49
48
|
|
|
50
|
-
#### 2. Create pages in databases (with properties)
|
|
49
|
+
#### 2. ✅ Create pages in databases (with properties) (shipped v0.8.0)
|
|
51
50
|
**MCP:** `create-pages` supports `data_source_id` parent with full property map including expanded date, place, checkbox formats.
|
|
52
|
-
**CLI:** `create-page
|
|
53
|
-
**
|
|
54
|
-
**Suggested command:** `notion create-page --parent <db-id> --title "Task" --prop "Status=To Do" --prop "Due=2026-04-01"`
|
|
51
|
+
**CLI:** `notion create-page --parent <db-id> --title "Task" --prop "Status=To Do"` — auto-detects database vs page parent. Supports `--icon` and `--cover`.
|
|
52
|
+
**Status:** Shipped in v0.8.0.
|
|
55
53
|
|
|
56
|
-
#### 3. Archive / trash pages
|
|
54
|
+
#### 3. ✅ Archive / trash pages (shipped v0.9.0)
|
|
57
55
|
**MCP:** `update-page` with property changes or page operations; `update_data_source` with `in_trash: true`.
|
|
58
|
-
**CLI:**
|
|
59
|
-
**
|
|
60
|
-
**Suggested command:** `notion archive <id>` / `notion delete <id>`
|
|
56
|
+
**CLI:** `notion archive <id>` — archives (trashes) a page. Supports `--json` for full page output.
|
|
57
|
+
**Status:** Shipped in v0.9.0.
|
|
61
58
|
|
|
62
|
-
#### 4. Search filters (date range, creator)
|
|
59
|
+
#### 4. Search filters (date range, creator) — partially addressed
|
|
63
60
|
**MCP:** `created_date_range` (start/end dates), `created_by_user_ids` filter, scoped search within page/database/teamspace.
|
|
64
|
-
**CLI:** Keyword
|
|
65
|
-
**
|
|
66
|
-
**
|
|
61
|
+
**CLI:** Keyword search with `--type` filter and `--sort asc|desc` (sort by last edited time).
|
|
62
|
+
**Status:** `--sort` added in v0.9.0. Date range and creator filters are **blocked** — the MCP server uses an internal Notion API not accessible to integration tokens. The public search endpoint only supports `sort` as an additional parameter.
|
|
63
|
+
**Remaining gap:** `--created-after`, `--created-before`, `--created-by` cannot be implemented with the public API.
|
|
67
64
|
|
|
68
65
|
### Tier 2 - Medium Impact (power-user and advanced agent workflows)
|
|
69
66
|
|
|
70
|
-
#### 5. Inline / anchored comments
|
|
67
|
+
#### 5. Inline / anchored comments — partially shipped
|
|
71
68
|
**MCP:** `selection_with_ellipsis` targets a specific block; `discussion_id` replies to existing threads. Rich text with mentions, dates, links.
|
|
72
|
-
**CLI:**
|
|
73
|
-
**
|
|
74
|
-
**Suggested flags:** `notion comment <id> -m "text" --anchor "## Section...content"` / `--reply-to <discussion-id>`
|
|
69
|
+
**CLI:** Thread replies (`--reply-to <discussion-id>`) and block-level comments (`--block <block-id>`) shipped. Discussion IDs shown in `notion comments` list output. Inline text-selection anchoring is not available in the public API. Plain text only.
|
|
70
|
+
**Remaining gap:** Rich text (mentions, dates, links) and inline text-selection anchoring (`selection_with_ellipsis`) — the latter requires internal API access.
|
|
75
71
|
|
|
76
72
|
#### 6. Create databases
|
|
77
73
|
**MCP:** `CREATE TABLE` DDL with full type system (select, relation, rollup, formula, unique_id, etc.).
|
|
@@ -185,5 +181,5 @@ The CLI isn't just chasing MCP parity — it has unique strengths:
|
|
|
185
181
|
---
|
|
186
182
|
|
|
187
183
|
*Last updated: 2026-03-23*
|
|
188
|
-
*CLI version compared: 0.
|
|
184
|
+
*CLI version compared: 0.8.0*
|
|
189
185
|
*MCP version compared: Official Notion MCP (2026-03)*
|
package/docs/README.agents.md
CHANGED
|
@@ -81,6 +81,27 @@ curl -fsSL https://raw.githubusercontent.com/andrzejchm/notion-cli/main/docs/ski
|
|
|
81
81
|
|
|
82
82
|
## Commands Reference
|
|
83
83
|
|
|
84
|
+
### `notion search <query>` / `notion ls`
|
|
85
|
+
|
|
86
|
+
Search or list pages and databases. Both commands support:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Sort results by last edited time
|
|
90
|
+
notion search "meeting notes" --sort desc
|
|
91
|
+
notion ls --sort asc
|
|
92
|
+
|
|
93
|
+
# Filter by type
|
|
94
|
+
notion search "Q1" --type page
|
|
95
|
+
notion ls --type database
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
| Flag | Description |
|
|
99
|
+
|------|-------------|
|
|
100
|
+
| `--sort <asc\|desc>` | Sort by last edited time |
|
|
101
|
+
| `--type <page\|database>` | Filter by object type |
|
|
102
|
+
| `--cursor <cursor>` | Pagination cursor from a previous `--next` hint |
|
|
103
|
+
| `--json` | Force JSON output |
|
|
104
|
+
|
|
84
105
|
### `notion update <id|url>`
|
|
85
106
|
|
|
86
107
|
Update properties on any Notion page (standalone or database entry).
|
|
@@ -120,3 +141,45 @@ notion update "$PAGE_ID" --prop "Status=Done" --json
|
|
|
120
141
|
| `date` | `--prop "Due=2024-12-25"` or `--prop "Range=2024-01-01,2024-01-31"` |
|
|
121
142
|
|
|
122
143
|
Required integration capabilities: **Read content**, **Update content**
|
|
144
|
+
|
|
145
|
+
### `notion archive <id|url>`
|
|
146
|
+
|
|
147
|
+
Archive (trash) a Notion page.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Archive a page by ID
|
|
151
|
+
notion archive "$PAGE_ID"
|
|
152
|
+
|
|
153
|
+
# Archive a page by URL
|
|
154
|
+
notion archive "https://www.notion.so/My-Page-b55c9c91384d452b81dbd1ef79372b75"
|
|
155
|
+
|
|
156
|
+
# Output the full updated page object as JSON
|
|
157
|
+
notion archive "$PAGE_ID" --json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Required integration capabilities: **Read content**, **Update content**
|
|
161
|
+
|
|
162
|
+
### `notion comment [id|url] -m <text>`
|
|
163
|
+
|
|
164
|
+
Add a comment to a page, block, or discussion thread.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Page-level comment
|
|
168
|
+
notion comment "$PAGE_ID" -m "Reviewed and approved."
|
|
169
|
+
|
|
170
|
+
# Reply to an existing discussion thread (use discussion ID from `notion comments`)
|
|
171
|
+
notion comment --reply-to "$DISCUSSION_ID" -m "Agreed, let's proceed."
|
|
172
|
+
|
|
173
|
+
# Comment on a specific block
|
|
174
|
+
notion comment --block "$BLOCK_ID" -m "This section needs revision."
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
| Flag | Description |
|
|
178
|
+
|------|-------------|
|
|
179
|
+
| `-m, --message <text>` | Comment text (required) |
|
|
180
|
+
| `--reply-to <discussion-id>` | Reply to an existing discussion thread |
|
|
181
|
+
| `--block <block-id>` | Comment on a specific block |
|
|
182
|
+
|
|
183
|
+
The `notion comments <id>` list command now shows `DISCUSSION` and `PARENT` columns so agents can reference discussion IDs with `--reply-to`.
|
|
184
|
+
|
|
185
|
+
Required integration capabilities: **Read content**, **Insert content**, **Read comments**, **Insert comments**
|
|
@@ -24,7 +24,8 @@ Pages must be shared with your integration: open page → `⋯` → **Add connec
|
|
|
24
24
|
|
|
25
25
|
**Integration capabilities** (set at notion.so/profile/integrations/internal → your integration → Capabilities):
|
|
26
26
|
- Read-only commands: **Read content** only
|
|
27
|
-
- `notion append`, `notion append --after`, `notion create-page
|
|
27
|
+
- `notion append`, `notion append --after`, `notion create-page` (page parent): also need **Insert content**
|
|
28
|
+
- `notion create-page --parent <db>`: also need **Insert content** + database must be shared with integration
|
|
28
29
|
- `notion edit-page`: also need **Update content** + **Insert content**
|
|
29
30
|
- `notion comment`: also need **Read comments** + **Insert comments**
|
|
30
31
|
|
|
@@ -109,14 +110,38 @@ notion db query <id|url> --json | jq '.[] | .properties'
|
|
|
109
110
|
notion append <id|url> -m "## Heading\nParagraph text" # append markdown blocks to a page
|
|
110
111
|
notion append <id|url> -m "$(cat notes.md)" # append file contents
|
|
111
112
|
|
|
112
|
-
notion create-page --parent <id|url> --title "Title" #
|
|
113
|
-
notion create-page --parent <id|url> --title "Title" -m "# Hello" # with markdown body
|
|
114
|
-
echo "# Content" | notion create-page --parent <id|url> --title "Title" # from stdin
|
|
113
|
+
notion create-page --parent <page-id|url> --title "Title" # child page under a page
|
|
114
|
+
notion create-page --parent <page-id|url> --title "Title" -m "# Hello" # with markdown body
|
|
115
|
+
echo "# Content" | notion create-page --parent <page-id|url> --title "Title" # from stdin
|
|
116
|
+
|
|
117
|
+
# Create entry in a database (auto-detected from parent ID)
|
|
118
|
+
notion create-page --parent <db-id|url> --title "New Task"
|
|
119
|
+
notion create-page --parent <db-id|url> --title "Task" --prop "Status=To Do" --prop "Priority=High"
|
|
120
|
+
notion create-page --parent <db-id|url> --title "Task" --prop "Due=2026-04-01" -m "# Details"
|
|
121
|
+
|
|
122
|
+
# Icon and cover
|
|
123
|
+
notion create-page --parent <id|url> --title "Page" --icon "🚀"
|
|
124
|
+
notion create-page --parent <id|url> --title "Page" --cover "https://example.com/img.jpg"
|
|
125
|
+
|
|
115
126
|
URL=$(notion create-page --parent <id|url> --title "Summary" -m "...") # capture URL
|
|
116
127
|
|
|
117
128
|
notion comment <id|url> -m "Reviewed and approved." # add comment to a page
|
|
118
129
|
```
|
|
119
130
|
|
|
131
|
+
#### Updating Page Properties
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
notion update <id|url> --prop "Status=Done" # set a single property
|
|
135
|
+
notion update <id|url> --prop "Status=Done" --prop "Priority=1" # multiple properties
|
|
136
|
+
notion update <id|url> --title "New Title" # set the title
|
|
137
|
+
notion update <id|url> --prop "Due=2026-04-01" # set a date
|
|
138
|
+
notion update <id|url> --prop "Tags=bug,urgent" # multi-select (comma-separated)
|
|
139
|
+
notion update <id|url> --prop "Done=true" # checkbox (true/yes/false/no)
|
|
140
|
+
notion update <id|url> --prop "Status=" # clear a property (empty value)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Supported types: title, rich_text, select, status, multi_select, number, checkbox, url, email, phone_number, date.
|
|
144
|
+
|
|
120
145
|
#### Surgical Editing
|
|
121
146
|
|
|
122
147
|
Search-and-replace specific text, replace the full page, or insert content at a specific location.
|
|
@@ -197,6 +222,12 @@ notion edit-page "$PAGE_ID" \
|
|
|
197
222
|
--find "Status: In Progress" --replace "Status: Done" \
|
|
198
223
|
--find "Blocked: yes" --replace "Blocked: none"
|
|
199
224
|
|
|
225
|
+
# Create a database entry with properties
|
|
226
|
+
DB_ID=$(notion search "Tasks" --type database | jq -r '.[0].id')
|
|
227
|
+
notion db schema "$DB_ID" # check property names and valid values first
|
|
228
|
+
notion create-page --parent "$DB_ID" --title "Fix login bug" \
|
|
229
|
+
--prop "Status=To Do" --prop "Priority=High" --prop "Due=2026-04-15"
|
|
230
|
+
|
|
200
231
|
# Insert a new sub-section after an existing section
|
|
201
232
|
notion append "$PAGE_ID" -m "## New Sub-section\nContent here" \
|
|
202
233
|
--after "## Existing Section...last line of section"
|