@andrzejchm/notion-cli 0.7.0 → 0.8.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.
@@ -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.6.0)
7
+ - **CLI** = `@andrzejchm/notion-cli` (this repo, v0.8.0)
8
8
  - **MCP** = Official Notion MCP server
9
9
 
10
10
  ---
@@ -17,19 +17,19 @@
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-only (db query) | Full read + write (update any property) | Gap |
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 | - | Trash pages | Gap |
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
27
  | Comments | Page-level add + list | 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 | Gap |
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 | Gap |
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,23 +41,20 @@ 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:** No equivalent. Can only read properties via `db query`.
47
- **Why first:** AI agents frequently need to update task status, dates, assignees. This is the single most impactful missing write operation.
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` only supports `page_id` parent with title + markdown body. Cannot create database entries.
53
- **Why second:** Agents need to create tasks, tickets, and records in databases — not just child pages.
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:** No equivalent.
59
- **Why third:** Agents need to clean up after themselves — archive completed tasks, delete draft pages.
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
59
  #### 4. Search filters (date range, creator)
63
60
  **MCP:** `created_date_range` (start/end dates), `created_by_user_ids` filter, scoped search within page/database/teamspace.
@@ -185,5 +182,5 @@ The CLI isn't just chasing MCP parity — it has unique strengths:
185
182
  ---
186
183
 
187
184
  *Last updated: 2026-03-23*
188
- *CLI version compared: 0.6.0*
185
+ *CLI version compared: 0.8.0*
189
186
  *MCP version compared: Official Notion MCP (2026-03)*
@@ -120,3 +120,20 @@ notion update "$PAGE_ID" --prop "Status=Done" --json
120
120
  | `date` | `--prop "Due=2024-12-25"` or `--prop "Range=2024-01-01,2024-01-31"` |
121
121
 
122
122
  Required integration capabilities: **Read content**, **Update content**
123
+
124
+ ### `notion archive <id|url>`
125
+
126
+ Archive (trash) a Notion page.
127
+
128
+ ```bash
129
+ # Archive a page by ID
130
+ notion archive "$PAGE_ID"
131
+
132
+ # Archive a page by URL
133
+ notion archive "https://www.notion.so/My-Page-b55c9c91384d452b81dbd1ef79372b75"
134
+
135
+ # Output the full updated page object as JSON
136
+ notion archive "$PAGE_ID" --json
137
+ ```
138
+
139
+ Required integration capabilities: **Read content**, **Update content**
@@ -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`: also need **Insert content**
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" # title-only page
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrzejchm/notion-cli",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Read Notion pages and databases from the terminal. Built for AI agents and developers.",
5
5
  "keywords": [
6
6
  "notion",