notas 26.2.0 → 26.4.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 CHANGED
@@ -54,6 +54,29 @@ notas notion version
54
54
 
55
55
  `db` is an alias for `databases`.
56
56
 
57
+ ## Skills
58
+
59
+ | Skill | Description |
60
+ |-------|-------------|
61
+ | **notion** | Reference guide for the notas CLI Notion provider — pages, databases, blocks, users, comments, and search |
62
+
63
+ ### Claude Code
64
+
65
+ ```bash
66
+ # Add marketplace
67
+ /plugin marketplace add circlesac/notas-cli
68
+
69
+ # Install plugin
70
+ /plugin install notas
71
+ ```
72
+
73
+ ### Pi
74
+
75
+ ```bash
76
+ pi install git:circlesac/notas-cli
77
+ # or: npx @mariozechner/pi-coding-agent install git:circlesac/notas-cli
78
+ ```
79
+
57
80
  ## Development
58
81
 
59
82
  ```bash
package/package.json CHANGED
@@ -42,5 +42,5 @@
42
42
  "type-check": "npx tsc --noEmit"
43
43
  },
44
44
  "type": "module",
45
- "version": "26.2.0"
45
+ "version": "26.4.0"
46
46
  }
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: notion
3
+ description: Reference guide for the notas CLI Notion provider. Use this when working with Notion pages, databases, blocks, users, comments, or search.
4
+ ---
5
+
6
+ # notas CLI Reference
7
+
8
+ ## Quick Start
9
+
10
+ ```bash
11
+ notas notion auth login # OAuth login (opens browser)
12
+ notas notion search "meeting" # Search across workspace
13
+ notas notion db list # List all databases
14
+ ```
15
+
16
+ ## Global Flags
17
+
18
+ | Flag | Alias | Description |
19
+ |------|-------|-------------|
20
+ | `--workspace` | `-w` | Select workspace (when multiple configured) |
21
+ | `--json` | | Output as JSON |
22
+ | `--plain` | | Output as tab-separated plain text |
23
+
24
+ ## Authentication
25
+
26
+ ```bash
27
+ notas notion auth login # OAuth flow (default)
28
+ notas notion auth login --token ntn_xxx # Manual token
29
+ notas notion auth login --name work # Name the workspace
30
+ notas notion auth status # Show all workspaces
31
+ notas notion auth logout --name work # Remove a workspace
32
+ notas notion auth refresh # Refresh OAuth token
33
+ notas notion auth rename old-name new-name # Rename workspace
34
+ ```
35
+
36
+ Environment variable: `NOTION_TOKEN` overrides stored credentials.
37
+
38
+ ## Databases
39
+
40
+ ```bash
41
+ notas notion db list
42
+ notas notion db get <database-id>
43
+ notas notion db query <database-id>
44
+ notas notion db query <database-id> --filter '{"property":"Status","select":{"equals":"Done"}}'
45
+ notas notion db query <database-id> --sort '[{"property":"Created","direction":"descending"}]'
46
+ notas notion db query <database-id> --columns "Name,Status,Date"
47
+ notas notion db create <parent-page-id> --title "My Database"
48
+ notas notion db update <database-id> --title "New Title" --description "Updated"
49
+ notas notion db delete <database-id>
50
+ ```
51
+
52
+ Pagination: `--limit 10`, `--all`, `--cursor <cursor>`
53
+
54
+ ## Pages
55
+
56
+ ```bash
57
+ notas notion pages get <page-id>
58
+ notas notion pages create <parent-id> --title "New Page"
59
+ notas notion pages create <parent-id> --title "Page" --content "Body text"
60
+ notas notion pages create <parent-id> --title "Page" --icon "📝"
61
+ notas notion pages create <db-id> --parent-type database --title "Row" --properties '{"Status":{"select":{"name":"Draft"}}}'
62
+ notas notion pages update <page-id> --title "Updated Title"
63
+ notas notion pages archive <page-id>
64
+ notas notion pages restore <page-id>
65
+ ```
66
+
67
+ Stdin support:
68
+ ```bash
69
+ cat notes.md | notas notion pages create <parent-id> --title "From File" --stdio
70
+ ```
71
+
72
+ ## Blocks
73
+
74
+ ```bash
75
+ notas notion blocks list <page-id>
76
+ notas notion blocks list <page-id> --recursive # All nested blocks
77
+ notas notion blocks get <block-id>
78
+ notas notion blocks append <page-id> --text "Hello world"
79
+ notas notion blocks append <page-id> --type heading_1 --text "Title"
80
+ notas notion blocks append <page-id> --type code --text "console.log('hi')" --language javascript
81
+ notas notion blocks append <page-id> --type to_do --text "Task" --checked
82
+ notas notion blocks append <page-id> --type bookmark --url "https://example.com"
83
+ notas notion blocks append <page-id> --type divider
84
+ notas notion blocks append <page-id> --blocks '[{"object":"block","type":"paragraph","paragraph":{"rich_text":[{"type":"text","text":{"content":"Complex block"}}]}}]'
85
+ notas notion blocks update <block-id> --text "Updated text"
86
+ notas notion blocks update <block-id> --body '{"paragraph":{"rich_text":[{"type":"text","text":{"content":"Raw update"}}]}}'
87
+ notas notion blocks delete <block-id>
88
+ ```
89
+
90
+ Block types: `paragraph`, `heading_1`, `heading_2`, `heading_3`, `bulleted_list_item`, `numbered_list_item`, `to_do`, `toggle`, `code`, `quote`, `callout`, `divider`, `bookmark`
91
+
92
+ Stdin support:
93
+ ```bash
94
+ cat code.py | notas notion blocks append <page-id> --type code --language python --stdio
95
+ ```
96
+
97
+ ## Search
98
+
99
+ ```bash
100
+ notas notion search "query"
101
+ notas notion search "query" --type page
102
+ notas notion search "query" --type database
103
+ notas notion search --sort ascending
104
+ notas notion search # List all (no query)
105
+ ```
106
+
107
+ ## Users
108
+
109
+ ```bash
110
+ notas notion users list
111
+ notas notion users list --filter "john"
112
+ notas notion users get <user-id>
113
+ notas notion users me
114
+ ```
115
+
116
+ ## Comments
117
+
118
+ ```bash
119
+ notas notion comments list <page-id>
120
+ notas notion comments create --page-id <page-id> --text "New comment"
121
+ notas notion comments create --discussion-id <id> --text "Reply"
122
+ echo "Comment from pipe" | notas notion comments create --page-id <id> --stdio
123
+ ```
124
+
125
+ ## Raw API
126
+
127
+ ```bash
128
+ notas notion api GET /v1/users
129
+ notas notion api POST /v1/search --body '{"query":"test"}'
130
+ notas notion api POST /v1/databases/<id>/query '{"page_size":5}'
131
+ notas notion api PATCH /v1/pages/<id> --body '{"archived":true}'
132
+ ```
133
+
134
+ ## Common Workflows
135
+
136
+ ### Create a page with content from a file
137
+ ```bash
138
+ cat document.md | notas notion pages create <parent-id> --title "My Doc" --stdio
139
+ ```
140
+
141
+ ### Query a database and pipe to jq
142
+ ```bash
143
+ notas notion db query <db-id> --json | jq '.results[].properties.Name.title[0].plain_text'
144
+ ```
145
+
146
+ ### Append multiple blocks from a script
147
+ ```bash
148
+ notas notion blocks append <page-id> --type heading_1 --text "Section Title"
149
+ notas notion blocks append <page-id> --text "Paragraph content"
150
+ cat snippet.py | notas notion blocks append <page-id> --type code --language python --stdio
151
+ ```
152
+
153
+ ### Search and get page content
154
+ ```bash
155
+ PAGE_ID=$(notas notion search "meeting notes" --json | jq -r '.results[0].id')
156
+ notas notion blocks list $PAGE_ID --recursive --plain
157
+ ```