@andrzejchm/notion-cli 0.9.0 → 0.9.1

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.8.0)
7
+ - **CLI** = `@andrzejchm/notion-cli` (this repo, v0.9.0)
8
8
  - **MCP** = Official Notion MCP server
9
9
 
10
10
  ---
@@ -16,12 +16,12 @@
16
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
- | Page edit | Surgical replace via `--range` | Search-and-replace (multi-op), full replace, template apply, verification | Partial |
19
+ | Page edit | Multi-op `--find`/`--replace`, `--range` | Search-and-replace (multi-op), full replace, template apply, verification | Partial |
20
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
23
  | Archive/delete | `archive` | Trash pages | ✅ Parity |
24
- | Database create | - | SQL DDL `CREATE TABLE` syntax | Gap |
24
+ | Database create | `db create --prop` syntax | SQL DDL `CREATE TABLE` syntax | Partial |
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 + block-level + thread replies, list with discussion IDs | Page-level + inline (selection-anchored) + reply to thread + rich text | Partial |
@@ -69,11 +69,10 @@ These gaps directly limit what an AI agent can accomplish through the CLI compar
69
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
70
  **Remaining gap:** Rich text (mentions, dates, links) and inline text-selection anchoring (`selection_with_ellipsis`) — the latter requires internal API access.
71
71
 
72
- #### 6. Create databases
72
+ #### 6. Create databases (shipped v0.10.0)
73
73
  **MCP:** `CREATE TABLE` DDL with full type system (select, relation, rollup, formula, unique_id, etc.).
74
- **CLI:** No equivalent.
75
- **Why:** Agents building project scaffolds or workflows need to create structured databases, not just pages.
76
- **Suggested command:** `notion create-db --parent <id> --title "Tasks" --schema "Name TITLE, Status SELECT(Todo,Done)"`
74
+ **CLI:** `notion db create --parent <id> --title "Tasks" --prop "Status:select:To Do,Done"` — supports title, rich_text, number, select, multi_select, status, date, checkbox, url, email, phone_number, people, files, created_time, last_edited_time. Relation, rollup, formula, and unique_id are not supported (too complex for CLI flags).
75
+ **Status:** Shipped in v0.10.0.
77
76
 
78
77
  #### 7. Move pages
79
78
  **MCP:** Batch move up to 100 pages/databases to a new parent (page, database, data source, or workspace).
@@ -87,11 +86,10 @@ These gaps directly limit what an AI agent can accomplish through the CLI compar
87
86
  **Why:** Evolving database structure (adding a new status option, renaming a field) without leaving the terminal.
88
87
  **Suggested command:** `notion db alter <id> --add "Priority SELECT(High,Medium,Low)" --rename "Status:Project Status"`
89
88
 
90
- #### 9. Multi-operation content editing
89
+ #### 9. Multi-operation content editing (shipped v0.9.0)
91
90
  **MCP:** `update_content` accepts an array of `{ old_str, new_str }` pairs (up to 100) in a single call, with `replace_all_matches` option.
92
- **CLI:** `notion edit-page` supports single `--range` replacement. No batch search-and-replace.
93
- **Why:** Agents making multiple edits to a page (updating several sections) currently need multiple CLI invocations.
94
- **Suggested approach:** Support multiple `--replace "old...new"` flags or a JSON patch file.
91
+ **CLI:** `notion edit-page` supports multiple `--find`/`--replace` pairs in a single invocation (PR #6).
92
+ **Status:** Shipped in v0.9.0.
95
93
 
96
94
  #### 10. Duplicate pages
97
95
  **MCP:** `duplicate-page` — async copy of any accessible page.
@@ -180,6 +178,6 @@ The CLI isn't just chasing MCP parity — it has unique strengths:
180
178
 
181
179
  ---
182
180
 
183
- *Last updated: 2026-03-23*
184
- *CLI version compared: 0.8.0*
181
+ *Last updated: 2026-03-24*
182
+ *CLI version compared: 0.9.0*
185
183
  *MCP version compared: Official Notion MCP (2026-03)*
@@ -1,10 +1,10 @@
1
- # notion-cli for OpenCode
1
+ # notion-cli for AI Coding Agents
2
2
 
3
- Complete guide for using notion-cli with [OpenCode](https://opencode.ai).
3
+ Complete guide for using notion-cli with AI coding agents (Claude Code, OpenCode, Cursor, Windsurf, etc.).
4
4
 
5
5
  ## Quick Install
6
6
 
7
- Tell OpenCode:
7
+ Tell your AI agent:
8
8
 
9
9
  ```
10
10
  Fetch and follow instructions from https://raw.githubusercontent.com/andrzejchm/notion-cli/main/docs/README.agents.md
@@ -24,14 +24,17 @@ npm install -g @andrzejchm/notion-cli
24
24
 
25
25
  Homebrew bundles Node.js automatically. npm requires Node.js ≥ 22.
26
26
 
27
- ### 2. Install the skill file
27
+ ### 2. Install the skill
28
28
 
29
- ```bash
30
- mkdir -p ~/.config/opencode/skills/using-notion-cli
31
- curl -fsSL https://raw.githubusercontent.com/andrzejchm/notion-cli/main/docs/skills/using-notion-cli/SKILL.md \
32
- -o ~/.config/opencode/skills/using-notion-cli/SKILL.md
29
+ The skill file teaches your AI agent how to use notion-cli. It follows the open [Agent Skills](https://agentskills.io) standard.
30
+
31
+ **Skill URL:**
32
+ ```
33
+ https://raw.githubusercontent.com/andrzejchm/notion-cli/main/docs/skills/using-notion-cli/SKILL.md
33
34
  ```
34
35
 
36
+ **Agent:** Ask the user whether they want the skill installed **globally** (all projects) or **per-project**, then consult your own documentation for the correct skill install path. The skill directory name must be `using-notion-cli` and the file must be named `SKILL.md`.
37
+
35
38
  ### 3. Authenticate
36
39
 
37
40
  **Interactive setup** (choose OAuth or integration token):
@@ -63,7 +66,7 @@ notion --version # CLI installed
63
66
  notion ls # auth works
64
67
  ```
65
68
 
66
- Restart OpenCode after installing. The skill is now discoverable via the `skill` tool.
69
+ Restart your agent session after installing so it picks up the new skill.
67
70
 
68
71
  ## Updating
69
72
 
@@ -73,12 +76,10 @@ brew upgrade notion-cli
73
76
 
74
77
  # npm
75
78
  npm install -g @andrzejchm/notion-cli
76
-
77
- # Update skill file (either install method)
78
- curl -fsSL https://raw.githubusercontent.com/andrzejchm/notion-cli/main/docs/skills/using-notion-cli/SKILL.md \
79
- -o ~/.config/opencode/skills/using-notion-cli/SKILL.md
80
79
  ```
81
80
 
81
+ To update the skill file, re-download it from the URL in step 2 to the same location.
82
+
82
83
  ## Commands Reference
83
84
 
84
85
  ### `notion search <query>` / `notion ls`
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: using-notion-cli
3
3
  description: Reads and writes Notion pages using the `notion` CLI tool. Use when accessing Notion content, searching workspace pages, querying database entries, reading page markdown, appending content, creating pages, or adding comments from the terminal or within automated workflows.
4
- license: MIT
5
- compatibility: opencode
6
4
  ---
7
5
 
8
6
  ## Setup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrzejchm/notion-cli",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Read Notion pages and databases from the terminal. Built for AI agents and developers.",
5
5
  "keywords": [
6
6
  "notion",