@getnote/cli 0.1.8 → 1.0.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
|
@@ -240,8 +240,6 @@ make install
|
|
|
240
240
|
## 相关链接
|
|
241
241
|
|
|
242
242
|
- [Get笔记官网](https://biji.com)
|
|
243
|
-
- [Get笔记 OpenClaw Skill](https://github.com/iswalle/getnote-openclaw) — 在飞书/Telegram 等消息渠道用自然语言操作笔记
|
|
244
|
-
- [Get笔记 MCP](https://github.com/iswalle/getnote-mcp) — MCP 协议接入,适配 Claude Desktop 等工具
|
|
245
243
|
- [开放平台文档](https://openapi.biji.com/docs)
|
|
246
244
|
- [问题反馈](https://github.com/iswalle/getnote-cli/issues)
|
|
247
245
|
|
package/package.json
CHANGED
|
@@ -97,6 +97,8 @@ getnote kb remove vnrOAaGY 1234567890
|
|
|
97
97
|
## Agent Usage Notes
|
|
98
98
|
|
|
99
99
|
- Use `-o json` when parsing results programmatically.
|
|
100
|
-
-
|
|
100
|
+
- `kbs -o json` returns `{"success":true,"data":{"topics":[...],"total":N}}`
|
|
101
|
+
- `kb <topic_id> -o json` returns `{"success":true,"data":{"notes":[...],"has_more":...}}`
|
|
102
|
+
- Get `topic_id` from `getnote kbs -o json` → `data.topics[].topic_id` field (not `id`).
|
|
101
103
|
- `kb add` / `kb remove` accept multiple note IDs — prefer batching over multiple calls.
|
|
102
104
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|
|
@@ -146,6 +146,10 @@ getnote note delete 1234567890 -y
|
|
|
146
146
|
## Agent Usage Notes
|
|
147
147
|
|
|
148
148
|
- Use `-o json` when parsing responses programmatically.
|
|
149
|
+
- All JSON responses follow `{"success":true,"data":{...}}` structure, **except**:
|
|
150
|
+
- `save` (text): returns `{"note_id":"..."}` directly
|
|
151
|
+
- `save` (link/image): returns `{"data":{"tasks":[{"task_id":"..."}],...}}`
|
|
152
|
+
- `task`: returns `{"success":true,"data":{"status":"...","note_id":"..."}}`
|
|
149
153
|
- `notes` list returns **20 per page** (no `--limit`); paginate with `--since-id`.
|
|
150
154
|
- Note IDs are int64 — always handle as strings to avoid precision loss in JavaScript.
|
|
151
155
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|
|
@@ -45,7 +45,9 @@ getnote search "机器学习" --limit 5 -o json
|
|
|
45
45
|
## Agent Usage Notes
|
|
46
46
|
|
|
47
47
|
- Use `-o json` when parsing results programmatically.
|
|
48
|
-
-
|
|
48
|
+
- JSON response: `{"success":true,"results":[{"note_id":"...","title":"...","content":"...","created_at":"...","note_type":"..."}]}`
|
|
49
|
+
- Note: `results` is at the top level, not nested under `data`.
|
|
50
|
+
- Get `topic_id` for `--kb` from `getnote kbs -o json` → `data.topics[].topic_id`.
|
|
49
51
|
- For `NOTE` type results, use `getnote note <note_id>` to get the full content.
|
|
50
52
|
- Max `--limit` is 10; use `getnote notes` for browsing without a query.
|
|
51
53
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|
|
@@ -67,6 +67,7 @@ getnote tag remove 1896830231705320746 123
|
|
|
67
67
|
|
|
68
68
|
## Agent Usage Notes
|
|
69
69
|
|
|
70
|
+
- `tag list -o json` returns `{"note_id":"...","tags":[{"id":"...","name":"...","type":"..."}]}` (flat, no `success` wrapper).
|
|
70
71
|
- `tag remove` takes a **numeric tag ID**, not a name — always call `tag list` first.
|
|
71
72
|
- To replace all tags at once, use `getnote note update --tag "tag1,tag2"` instead.
|
|
72
73
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|