@getnote/cli 0.1.7 → 0.1.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: getnote-auth
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.3.0
|
|
4
4
|
description: Manage authentication for Get笔记 CLI
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,11 +18,11 @@ getnote auth login [--api-key <key>] [--client-id <id>]
|
|
|
18
18
|
|
|
19
19
|
| Mode | Command | Description |
|
|
20
20
|
|------|---------|-------------|
|
|
21
|
-
| OAuth (recommended) | `getnote auth login` | Opens browser to authorize |
|
|
22
|
-
| API Key | `getnote auth login --api-key <key>` | Saves key directly, no browser |
|
|
21
|
+
| OAuth (recommended) | `getnote auth login` | Opens browser to authorize; saves credentials automatically |
|
|
22
|
+
| API Key | `getnote auth login --api-key <key>` | Saves key directly, no browser needed |
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
# OAuth flow
|
|
25
|
+
# OAuth flow (opens browser)
|
|
26
26
|
getnote auth login
|
|
27
27
|
|
|
28
28
|
# API key directly
|
|
@@ -32,7 +32,7 @@ getnote auth login --api-key gk_live_xxx
|
|
|
32
32
|
getnote auth login --api-key gk_live_xxx --client-id cli_xxx
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Get your API key at: https://www.biji.com/settings/developer (keys start with `gk_live_`)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -42,6 +42,8 @@ API keys start with `gk_live_`. Get yours at: https://www.biji.com/settings/deve
|
|
|
42
42
|
getnote auth status
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
Shows whether authenticated and which API key is active.
|
|
46
|
+
|
|
45
47
|
```bash
|
|
46
48
|
getnote auth status
|
|
47
49
|
```
|
|
@@ -54,7 +56,7 @@ getnote auth status
|
|
|
54
56
|
getnote auth logout
|
|
55
57
|
```
|
|
56
58
|
|
|
57
|
-
Removes saved credentials from
|
|
59
|
+
Removes saved credentials from `~/.getnote/config.json`.
|
|
58
60
|
|
|
59
61
|
```bash
|
|
60
62
|
getnote auth logout
|
|
@@ -66,5 +68,5 @@ getnote auth logout
|
|
|
66
68
|
|
|
67
69
|
- Always run `getnote auth status` first to verify authentication before other commands.
|
|
68
70
|
- If not authenticated, prompt the user to run `getnote auth login`.
|
|
69
|
-
- `--api-key` on any command is a temporary override and does not save credentials.
|
|
70
|
-
- Credentials
|
|
71
|
+
- `--api-key` on any command is a temporary per-invocation override and does not save credentials.
|
|
72
|
+
- Credentials saved at `~/.getnote/config.json`; env vars `GETNOTE_API_KEY` / `GETNOTE_CLIENT_ID` take higher priority.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: getnote-kb
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.3.0
|
|
4
4
|
description: Manage knowledge bases in Get笔记 via the getnote CLI
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# getnote-kb Skill
|
|
8
8
|
|
|
9
|
-
Manage knowledge bases
|
|
9
|
+
Manage knowledge bases — list, create, browse notes, add/remove notes.
|
|
10
10
|
|
|
11
11
|
## Prerequisites
|
|
12
12
|
|
|
@@ -20,6 +20,8 @@ Manage knowledge bases in Get笔记 — list, create, browse notes, add/remove n
|
|
|
20
20
|
getnote kbs
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Returns all knowledge bases. Each item includes: `topic_id`, `name`, `description`, `note_count`, `created_at`.
|
|
24
|
+
|
|
23
25
|
```bash
|
|
24
26
|
getnote kbs
|
|
25
27
|
getnote kbs -o json
|
|
@@ -33,6 +35,8 @@ getnote kbs -o json
|
|
|
33
35
|
getnote kb <topic_id> [--limit <n>] [--all]
|
|
34
36
|
```
|
|
35
37
|
|
|
38
|
+
Returns 20 notes per page by default.
|
|
39
|
+
|
|
36
40
|
| Flag | Default | Description |
|
|
37
41
|
|------|---------|-------------|
|
|
38
42
|
| `--limit` | 20 | Notes per page |
|
|
@@ -40,7 +44,6 @@ getnote kb <topic_id> [--limit <n>] [--all]
|
|
|
40
44
|
|
|
41
45
|
```bash
|
|
42
46
|
getnote kb vnrOAaGY
|
|
43
|
-
getnote kb vnrOAaGY --limit 5
|
|
44
47
|
getnote kb vnrOAaGY --all
|
|
45
48
|
getnote kb vnrOAaGY -o json
|
|
46
49
|
```
|
|
@@ -55,9 +58,11 @@ getnote kb create <name> [--desc <description>]
|
|
|
55
58
|
|
|
56
59
|
```bash
|
|
57
60
|
getnote kb create "Research Papers"
|
|
58
|
-
getnote kb create "Project Docs" --desc "Documentation links
|
|
61
|
+
getnote kb create "Project Docs" --desc "Documentation links"
|
|
59
62
|
```
|
|
60
63
|
|
|
64
|
+
> Max 50 knowledge bases per day (resets at 00:00 Beijing time).
|
|
65
|
+
|
|
61
66
|
---
|
|
62
67
|
|
|
63
68
|
### Add notes to a knowledge base
|
|
@@ -66,13 +71,15 @@ getnote kb create "Project Docs" --desc "Documentation links for the main projec
|
|
|
66
71
|
getnote kb add <topic_id> <note_id> [note_id...]
|
|
67
72
|
```
|
|
68
73
|
|
|
69
|
-
Supports multiple note IDs
|
|
74
|
+
Supports multiple note IDs. Max 20 per call.
|
|
70
75
|
|
|
71
76
|
```bash
|
|
72
77
|
getnote kb add vnrOAaGY 1234567890
|
|
73
78
|
getnote kb add vnrOAaGY 1234567890 9876543210
|
|
74
79
|
```
|
|
75
80
|
|
|
81
|
+
> Already-existing notes are silently skipped.
|
|
82
|
+
|
|
76
83
|
---
|
|
77
84
|
|
|
78
85
|
### Remove notes from a knowledge base
|
|
@@ -83,7 +90,6 @@ getnote kb remove <topic_id> <note_id> [note_id...]
|
|
|
83
90
|
|
|
84
91
|
```bash
|
|
85
92
|
getnote kb remove vnrOAaGY 1234567890
|
|
86
|
-
getnote kb remove vnrOAaGY 1234567890 9876543210
|
|
87
93
|
```
|
|
88
94
|
|
|
89
95
|
---
|
|
@@ -91,6 +97,6 @@ getnote kb remove vnrOAaGY 1234567890 9876543210
|
|
|
91
97
|
## Agent Usage Notes
|
|
92
98
|
|
|
93
99
|
- Use `-o json` when parsing results programmatically.
|
|
94
|
-
- Get `topic_id` from `getnote kbs -o json` (the `
|
|
100
|
+
- Get `topic_id` from `getnote kbs -o json` (the `topic_id` field, not `id`).
|
|
95
101
|
- `kb add` / `kb remove` accept multiple note IDs — prefer batching over multiple calls.
|
|
96
102
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: getnote-note
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.3.0
|
|
4
4
|
description: Manage notes in Get笔记 via the getnote CLI
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# getnote-note Skill
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Save, list, view, update, and delete notes in Get笔记.
|
|
10
10
|
|
|
11
11
|
## Prerequisites
|
|
12
12
|
|
|
@@ -25,19 +25,17 @@ getnote save <url|text|image_path> [--title <title>] [--tag <tag>]...
|
|
|
25
25
|
| `--title` | Optional title |
|
|
26
26
|
| `--tag` | Tag to apply; may be repeated |
|
|
27
27
|
|
|
28
|
-
- URL (`http://` or `https://`) →
|
|
29
|
-
- Local image path →
|
|
30
|
-
- Otherwise →
|
|
28
|
+
- URL (`http://` or `https://`) → link note (async, auto-polls until done)
|
|
29
|
+
- Local image path → image note (async, auto-polls until done)
|
|
30
|
+
- Otherwise → text note (sync)
|
|
31
31
|
|
|
32
|
-
**Examples:**
|
|
33
32
|
```bash
|
|
34
33
|
getnote save https://example.com --title "Great article"
|
|
35
34
|
getnote save "Remember to review the docs" --tag work --tag important
|
|
36
35
|
getnote save ./screenshot.png --title "Design mockup"
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
In `-o json` mode, silently polls and returns the final note JSON.
|
|
38
|
+
In `-o json` mode, silently polls and returns the final note JSON (including `title`, `content`/summary, `note_type`, `tags`, `created_at`).
|
|
41
39
|
|
|
42
40
|
---
|
|
43
41
|
|
|
@@ -47,35 +45,38 @@ In `-o json` mode, silently polls and returns the final note JSON.
|
|
|
47
45
|
getnote task <task_id>
|
|
48
46
|
```
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
Manually check progress of an async save task.
|
|
51
49
|
|
|
52
50
|
```bash
|
|
53
|
-
getnote task task_xyz789
|
|
54
51
|
getnote task task_xyz789 -o json
|
|
55
52
|
```
|
|
56
53
|
|
|
54
|
+
Returns `status` (`pending` / `processing` / `success` / `failed`) and `note_id` when done.
|
|
55
|
+
|
|
57
56
|
---
|
|
58
57
|
|
|
59
58
|
### List recent notes
|
|
60
59
|
|
|
61
60
|
```
|
|
62
|
-
getnote notes [--
|
|
61
|
+
getnote notes [--since-id <id>] [--all]
|
|
63
62
|
```
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
| `--
|
|
64
|
+
Returns 20 notes per page (fixed). No `--limit` flag.
|
|
65
|
+
|
|
66
|
+
| Flag | Description |
|
|
67
|
+
|------|-------------|
|
|
68
|
+
| `--since-id` | Pagination cursor (last note ID seen) |
|
|
69
|
+
| `--all` | Fetch all notes (auto-paginate, streams output) |
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
getnote notes
|
|
73
|
-
getnote notes --limit 5
|
|
74
73
|
getnote notes --all
|
|
75
74
|
getnote notes --since-id 1234567890
|
|
76
75
|
getnote notes -o json
|
|
77
76
|
```
|
|
78
77
|
|
|
78
|
+
**Note types**: `plain_text` / `img_text` / `link` / `audio` / `meeting` / `local_audio` / `internal_record` / `class_audio` / `recorder_audio` / `recorder_flash_audio`
|
|
79
|
+
|
|
79
80
|
---
|
|
80
81
|
|
|
81
82
|
### Get note details
|
|
@@ -84,9 +85,18 @@ getnote notes -o json
|
|
|
84
85
|
getnote note <id> [--field <field>]
|
|
85
86
|
```
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
Returns full note including content, tags, attachments. Use `--field` to extract a single value.
|
|
89
|
+
|
|
90
|
+
| `--field` values | Description |
|
|
88
91
|
|------|-------------|
|
|
89
|
-
|
|
|
92
|
+
| `id` | Note ID |
|
|
93
|
+
| `title` | Title |
|
|
94
|
+
| `content` | Content / AI summary |
|
|
95
|
+
| `type` | Note type |
|
|
96
|
+
| `created_at` | Creation time |
|
|
97
|
+
| `updated_at` | Last updated time |
|
|
98
|
+
| `url` | Source URL (link notes) |
|
|
99
|
+
| `excerpt` | Excerpt |
|
|
90
100
|
|
|
91
101
|
```bash
|
|
92
102
|
getnote note 1234567890
|
|
@@ -107,13 +117,16 @@ getnote note update <id> [--title <title>] [--content <content>] [--tag <tags>]
|
|
|
107
117
|
|------|-------------|
|
|
108
118
|
| `--title` | New title |
|
|
109
119
|
| `--content` | New content (plain_text notes only) |
|
|
110
|
-
| `--tag` | Comma-separated tags
|
|
120
|
+
| `--tag` | Comma-separated tags — **replaces all existing tags** |
|
|
111
121
|
|
|
112
122
|
```bash
|
|
113
123
|
getnote note update 1234567890 --title "Updated title"
|
|
114
124
|
getnote note update 1234567890 --tag "work,important"
|
|
115
125
|
```
|
|
116
126
|
|
|
127
|
+
> ⚠️ `--tag` replaces all tags. For partial tag changes use `getnote tag add/remove`.
|
|
128
|
+
> ⚠️ Content update only works on `plain_text` notes.
|
|
129
|
+
|
|
117
130
|
---
|
|
118
131
|
|
|
119
132
|
### Delete a note
|
|
@@ -124,12 +137,7 @@ getnote note delete <id> [-y]
|
|
|
124
137
|
|
|
125
138
|
Moves note to trash.
|
|
126
139
|
|
|
127
|
-
| Flag | Description |
|
|
128
|
-
|------|-------------|
|
|
129
|
-
| `-y` | Skip confirmation prompt |
|
|
130
|
-
|
|
131
140
|
```bash
|
|
132
|
-
getnote note delete 1234567890
|
|
133
141
|
getnote note delete 1234567890 -y
|
|
134
142
|
```
|
|
135
143
|
|
|
@@ -138,6 +146,6 @@ getnote note delete 1234567890 -y
|
|
|
138
146
|
## Agent Usage Notes
|
|
139
147
|
|
|
140
148
|
- Use `-o json` when parsing responses programmatically.
|
|
141
|
-
- `
|
|
142
|
-
-
|
|
149
|
+
- `notes` list returns **20 per page** (no `--limit`); paginate with `--since-id`.
|
|
150
|
+
- Note IDs are int64 — always handle as strings to avoid precision loss in JavaScript.
|
|
143
151
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: getnote-search
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.3.0
|
|
4
4
|
description: Semantic search across notes in Get笔记 via the getnote CLI
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -22,9 +22,13 @@ getnote search <query> [--kb <topic_id>] [--limit <n>]
|
|
|
22
22
|
|
|
23
23
|
| Flag | Default | Description |
|
|
24
24
|
|------|---------|-------------|
|
|
25
|
-
| `--kb` | — | Limit search to a knowledge base (topic_id) |
|
|
25
|
+
| `--kb` | — | Limit search to a knowledge base (`topic_id`) |
|
|
26
26
|
| `--limit` | 10 | Max results (max 10) |
|
|
27
27
|
|
|
28
|
+
Results are ranked by semantic relevance (high → low). Each result includes: `note_id`, `title`, `content` (excerpt), `created_at`, `note_type`.
|
|
29
|
+
|
|
30
|
+
> Note: `note_id` is only populated for `NOTE` type results. Other types (`FILE`, `BLOGGER`, `LIVE`, etc.) return an empty `note_id`.
|
|
31
|
+
|
|
28
32
|
```bash
|
|
29
33
|
# Search across all notes
|
|
30
34
|
getnote search "大模型 API"
|
|
@@ -42,6 +46,6 @@ getnote search "机器学习" --limit 5 -o json
|
|
|
42
46
|
|
|
43
47
|
- Use `-o json` when parsing results programmatically.
|
|
44
48
|
- Get `topic_id` for `--kb` from `getnote kbs -o json`.
|
|
45
|
-
-
|
|
46
|
-
- Max `--limit` is 10; use `getnote notes` for
|
|
49
|
+
- For `NOTE` type results, use `getnote note <note_id>` to get the full content.
|
|
50
|
+
- Max `--limit` is 10; use `getnote notes` for browsing without a query.
|
|
47
51
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: getnote-tag
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.3.0
|
|
4
4
|
description: Manage note tags in Get笔记 via the getnote CLI
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -20,7 +20,12 @@ Add, list, and remove tags on notes.
|
|
|
20
20
|
getnote tag list <note_id>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Returns all tags
|
|
23
|
+
Returns all tags with their IDs and types.
|
|
24
|
+
|
|
25
|
+
Tag types:
|
|
26
|
+
- `ai` — auto-generated by AI
|
|
27
|
+
- `manual` — added by the user
|
|
28
|
+
- `system` — system tag (**cannot be deleted**)
|
|
24
29
|
|
|
25
30
|
```bash
|
|
26
31
|
getnote tag list 1896830231705320746
|
|
@@ -47,14 +52,14 @@ getnote tag add 1896830231705320746 工作
|
|
|
47
52
|
getnote tag remove <note_id> <tag_id>
|
|
48
53
|
```
|
|
49
54
|
|
|
50
|
-
> ⚠️ Requires **tag ID** (integer
|
|
51
|
-
>
|
|
55
|
+
> ⚠️ Requires **tag ID** (integer from `tag list`), not tag name.
|
|
56
|
+
> ⚠️ `system` type tags cannot be removed.
|
|
52
57
|
|
|
53
58
|
```bash
|
|
54
|
-
#
|
|
59
|
+
# Step 1: get tag IDs
|
|
55
60
|
getnote tag list 1896830231705320746 -o json
|
|
56
61
|
|
|
57
|
-
#
|
|
62
|
+
# Step 2: remove by tag ID
|
|
58
63
|
getnote tag remove 1896830231705320746 123
|
|
59
64
|
```
|
|
60
65
|
|
|
@@ -62,6 +67,6 @@ getnote tag remove 1896830231705320746 123
|
|
|
62
67
|
|
|
63
68
|
## Agent Usage Notes
|
|
64
69
|
|
|
65
|
-
- `tag remove` takes a **tag ID**, not a name — always call `tag list` first
|
|
66
|
-
-
|
|
70
|
+
- `tag remove` takes a **numeric tag ID**, not a name — always call `tag list` first.
|
|
71
|
+
- To replace all tags at once, use `getnote note update --tag "tag1,tag2"` instead.
|
|
67
72
|
- Exit code `0` = success; non-zero = error. Error details go to stderr.
|