@andrzejchm/notion-cli 0.8.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.
@@ -13,7 +13,7 @@
13
13
 
14
14
  | Area | CLI | MCP | Parity |
15
15
  |------|-----|-----|--------|
16
- | Search | Basic keyword | Semantic + AI + connected sources + date/creator filters | Partial |
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 |
@@ -24,7 +24,7 @@
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 add + list | Page-level + inline (selection-anchored) + reply to thread + rich text | Partial |
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
30
  | Create pages in DB | `create-page --parent <db>` with `--prop` | Full property support, date/place/checkbox expanded formats | ✅ Parity |
@@ -56,19 +56,18 @@ These gaps directly limit what an AI agent can accomplish through the CLI compar
56
56
  **CLI:** `notion archive <id>` — archives (trashes) a page. Supports `--json` for full page output.
57
57
  **Status:** Shipped in v0.9.0.
58
58
 
59
- #### 4. Search filters (date range, creator)
59
+ #### 4. Search filters (date range, creator) — partially addressed
60
60
  **MCP:** `created_date_range` (start/end dates), `created_by_user_ids` filter, scoped search within page/database/teamspace.
61
- **CLI:** Keyword-only search with `--type` filter.
62
- **Why important:** Agents searching for "recent" items or "my tasks" need date and creator filters to get relevant results without scanning everything.
63
- **Suggested flags:** `--created-after`, `--created-before`, `--created-by`
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.
64
64
 
65
65
  ### Tier 2 - Medium Impact (power-user and advanced agent workflows)
66
66
 
67
- #### 5. Inline / anchored comments
67
+ #### 5. Inline / anchored comments — partially shipped
68
68
  **MCP:** `selection_with_ellipsis` targets a specific block; `discussion_id` replies to existing threads. Rich text with mentions, dates, links.
69
- **CLI:** Page-level comments only. Plain text only.
70
- **Why:** Agents doing code/doc review need to comment on specific sections, not just drop a page-level note. Thread replies keep conversations organized.
71
- **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.
72
71
 
73
72
  #### 6. Create databases
74
73
  **MCP:** `CREATE TABLE` DDL with full type system (select, relation, rollup, formula, unique_id, etc.).
@@ -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).
@@ -137,3 +158,28 @@ notion archive "$PAGE_ID" --json
137
158
  ```
138
159
 
139
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**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrzejchm/notion-cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Read Notion pages and databases from the terminal. Built for AI agents and developers.",
5
5
  "keywords": [
6
6
  "notion",