@getnote/cli 1.1.9 → 1.2.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
@@ -14,6 +14,14 @@ npm install -g @getnote/cli
14
14
 
15
15
  或者从 [Releases](https://github.com/iswalle/getnote-cli/releases) 下载对应平台的二进制文件,放到 `$PATH` 里。
16
16
 
17
+ **Windows 用户**:推荐直接从 [Releases](https://github.com/iswalle/getnote-cli/releases) 下载 `.exe` 文件,放到 PATH 里。用 `npm install -g` 安装时,如果遇到 `Expand-Archive` 相关报错,可尝试:
18
+
19
+ ```bash
20
+ npm install -g @getnote/cli --ignore-scripts
21
+ ```
22
+
23
+ 然后手动从 Releases 下载对应平台的二进制文件。
24
+
17
25
  ---
18
26
 
19
27
  ## 使用要求
@@ -161,7 +169,8 @@ getnote notes 最近 20 条笔记
161
169
  getnote note <id> 笔记详情
162
170
  --field <字段名> 只输出某个字段的值
163
171
  (id/title/content/type/
164
- created_at/url/excerpt)
172
+ created_at/url/excerpt/
173
+ web_content/audio_original)
165
174
 
166
175
  getnote note update <id> 更新笔记
167
176
  --title <标题>
@@ -172,6 +181,20 @@ getnote note delete <id> 删除笔记(移入回收站)
172
181
  -y 跳过确认
173
182
  ```
174
183
 
184
+ ### 字段语义说明(适合 AI Agent 参考)
185
+
186
+ 不同笔记类型的"原文"字段不同,`content` 通常是 AI 总结而非原文:
187
+
188
+ | 笔记类型 | 原文字段 | AI 总结字段 |
189
+ |---------|---------|------------|
190
+ | 普通文字笔记 | `content` | `content` |
191
+ | 链接/网页笔记 | `web_content` | `content` |
192
+ | 录音笔记 | `audio_original` | `content` |
193
+ | 知识库博主内容 | `post_media_text`(via `kb blogger-content`)| `content` |
194
+ | 知识库直播 | `post_media_text`(via `kb live`)| `post_summary` |
195
+
196
+ > **AI Agent 提示**:用户要求"读原文"时,先用 `getnote note <id> -o json` 查看 `note_type`,再按上表选择对应字段。
197
+
175
198
  ### 搜索
176
199
 
177
200
  ```
@@ -196,6 +219,7 @@ getnote kbs 列出所有知识库
196
219
  getnote kb <topic_id> 知识库内的笔记
197
220
  --limit <n>
198
221
  --all 获取全部
222
+ --no-content JSON 输出时省略 content 字段(节省 AI token)
199
223
 
200
224
  getnote kb create <名称> 新建知识库
201
225
  --desc <描述>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getnote/cli",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "CLI tool for 得到大脑(Get笔记) — manage notes and knowledge bases from the terminal",
5
5
  "keywords": [
6
6
  "getnote",
@@ -101,6 +101,7 @@ Returns full note including content, tags, attachments. Use `--field` to extract
101
101
  | `url` | Source URL (link notes) |
102
102
  | `excerpt` | Excerpt |
103
103
  | `web_content` | Full web page content (link notes only) |
104
+ | `audio_original` | 录音笔记的转写原文(`audio` 类型笔记专用,非 AI 总结) |
104
105
  | `source` | Note source (e.g. `openapi`, `manual`) |
105
106
  | `tags` | Comma-separated tag names |
106
107
 
@@ -178,3 +179,15 @@ Returns: `share_url` (e.g. `https://biji.com/note/share_note/rBzdMlXrzgYVM`)
178
179
  - `notes` list returns **20 per page** (no `--limit`); paginate with `--since-id`.
179
180
  - Note IDs are int64 — always handle as strings to avoid precision loss in JavaScript.
180
181
  - Exit code `0` = success; non-zero = error. Error details go to stderr.
182
+
183
+ ### 字段语义提示("原文" vs AI 总结)
184
+
185
+ 不同笔记类型的"原文"字段不同,`content` 通常是 AI 总结而非原文。用户要求"读原文"时,先用 `getnote note <id> -o json` 查看 `note_type`,再按下表选择对应字段:
186
+
187
+ | 笔记类型 | 原文字段 | AI 总结字段 |
188
+ |---------|---------|------------|
189
+ | 普通文字笔记 | `content` | `content` |
190
+ | 链接/网页笔记 | `web_content` | `content` |
191
+ | 录音笔记 | `audio_original` | `content` |
192
+ | 知识库博主内容 | `post_media_text`(via `kb blogger-content`)| `content` |
193
+ | 知识库直播 | `post_media_text`(via `kb live`)| `post_summary` |