@getnote/cli 0.1.6 → 0.1.7

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/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "CLI tool for Get笔记 — manage notes and knowledge bases from the terminal",
5
5
  "keywords": [
6
6
  "getnote",
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: getnote-auth
3
- version: 0.1.0
3
+ version: 0.2.0
4
4
  description: Manage authentication for Get笔记 CLI
5
5
  ---
6
6
 
7
7
  # getnote-auth Skill
8
8
 
9
- Log in, log out, and check authentication status for the `getnote` CLI.
9
+ Log in, log out, and check authentication status.
10
10
 
11
11
  ## Commands
12
12
 
@@ -16,19 +16,16 @@ Log in, log out, and check authentication status for the `getnote` CLI.
16
16
  getnote auth login [--api-key <key>] [--client-id <id>]
17
17
  ```
18
18
 
19
- Two modes:
20
-
21
19
  | Mode | Command | Description |
22
20
  |------|---------|-------------|
23
- | OAuth (recommended) | `getnote auth login` | Opens browser to authorize; saves credentials automatically |
24
- | API Key | `getnote auth login --api-key <key>` | Saves API key directly, no browser needed |
21
+ | OAuth (recommended) | `getnote auth login` | Opens browser to authorize |
22
+ | API Key | `getnote auth login --api-key <key>` | Saves key directly, no browser |
25
23
 
26
- **Examples:**
27
24
  ```bash
28
- # OAuth flow (opens browser)
25
+ # OAuth flow
29
26
  getnote auth login
30
27
 
31
- # Direct API key
28
+ # API key directly
32
29
  getnote auth login --api-key gk_live_xxx
33
30
 
34
31
  # API key + Client ID
@@ -45,9 +42,6 @@ API keys start with `gk_live_`. Get yours at: https://www.biji.com/settings/deve
45
42
  getnote auth status
46
43
  ```
47
44
 
48
- Shows whether the CLI is authenticated and which API key is in use.
49
-
50
- **Example:**
51
45
  ```bash
52
46
  getnote auth status
53
47
  ```
@@ -60,9 +54,8 @@ getnote auth status
60
54
  getnote auth logout
61
55
  ```
62
56
 
63
- Removes the saved API key from local config.
57
+ Removes saved credentials from local config.
64
58
 
65
- **Example:**
66
59
  ```bash
67
60
  getnote auth logout
68
61
  ```
@@ -71,7 +64,7 @@ getnote auth logout
71
64
 
72
65
  ## Agent Usage Notes
73
66
 
74
- - Always run `getnote auth status` before other commands to verify authentication.
67
+ - Always run `getnote auth status` first to verify authentication before other commands.
75
68
  - If not authenticated, prompt the user to run `getnote auth login`.
76
- - The `--api-key` flag on any command overrides the saved config temporarily (does not save).
77
- - Credentials are stored locally; `auth logout` removes them.
69
+ - `--api-key` on any command is a temporary override and does not save credentials.
70
+ - Credentials are stored in `~/.getnote/config.json`; `auth logout` removes them.
@@ -1,77 +1,61 @@
1
1
  ---
2
2
  name: getnote-kb
3
- version: 0.1.0
3
+ version: 0.2.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 (话题/topic) in Get笔记 — list, create, and add or remove notes.
9
+ Manage knowledge bases in Get笔记 — list, create, browse notes, add/remove notes.
10
10
 
11
11
  ## Prerequisites
12
12
 
13
13
  - `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
14
- - API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable
15
14
 
16
15
  ## Commands
17
16
 
18
- ### List knowledge bases
17
+ ### List all knowledge bases
19
18
 
20
19
  ```
21
- getnote kb list [--output json|table]
20
+ getnote kbs
22
21
  ```
23
22
 
24
- Returns all knowledge bases accessible to the authenticated user.
25
-
26
- **Examples:**
27
23
  ```bash
28
- # Human-friendly table
29
- getnote kb list
30
-
31
- # Machine-readable JSON
32
- getnote kb list --output json
24
+ getnote kbs
25
+ getnote kbs -o json
33
26
  ```
34
27
 
35
28
  ---
36
29
 
37
- ### Create a knowledge base
30
+ ### List notes in a knowledge base
38
31
 
39
32
  ```
40
- getnote kb create <name> [--desc <description>]
33
+ getnote kb <topic_id> [--limit <n>] [--all]
41
34
  ```
42
35
 
43
- | Flag | Description |
44
- |------|-------------|
45
- | `--desc` | Optional description for the knowledge base |
36
+ | Flag | Default | Description |
37
+ |------|---------|-------------|
38
+ | `--limit` | 20 | Notes per page |
39
+ | `--all` | — | Fetch all notes (auto-paginate) |
46
40
 
47
- **Examples:**
48
41
  ```bash
49
- getnote kb create "Research Papers"
50
- getnote kb create "Project Docs" --desc "Documentation links for the main project"
42
+ getnote kb vnrOAaGY
43
+ getnote kb vnrOAaGY --limit 5
44
+ getnote kb vnrOAaGY --all
45
+ getnote kb vnrOAaGY -o json
51
46
  ```
52
47
 
53
48
  ---
54
49
 
55
- ### List notes in a knowledge base
50
+ ### Create a knowledge base
56
51
 
57
52
  ```
58
- getnote kb notes <topic_id> [--limit <n>] [--output json|table]
53
+ getnote kb create <name> [--desc <description>]
59
54
  ```
60
55
 
61
- | Flag | Default | Description |
62
- |------|---------|-------------|
63
- | `--limit` | 20 | Maximum number of notes to return |
64
-
65
- **Examples:**
66
56
  ```bash
67
- # List notes in a knowledge base
68
- getnote kb notes kb_abc123
69
-
70
- # Get more results
71
- getnote kb notes kb_abc123 --limit 50
72
-
73
- # Machine-readable output
74
- getnote kb notes kb_abc123 --output json
57
+ getnote kb create "Research Papers"
58
+ getnote kb create "Project Docs" --desc "Documentation links for the main project"
75
59
  ```
76
60
 
77
61
  ---
@@ -82,15 +66,11 @@ getnote kb notes kb_abc123 --output json
82
66
  getnote kb add <topic_id> <note_id> [note_id...]
83
67
  ```
84
68
 
85
- Supports adding multiple notes in a single call.
69
+ Supports multiple note IDs in one call.
86
70
 
87
- **Examples:**
88
71
  ```bash
89
- # Add a single note
90
- getnote kb add kb_abc123 note_xyz789
91
-
92
- # Add multiple notes at once
93
- getnote kb add kb_abc123 note_xyz789 note_def456 note_ghi012
72
+ getnote kb add vnrOAaGY 1234567890
73
+ getnote kb add vnrOAaGY 1234567890 9876543210
94
74
  ```
95
75
 
96
76
  ---
@@ -101,23 +81,16 @@ getnote kb add kb_abc123 note_xyz789 note_def456 note_ghi012
101
81
  getnote kb remove <topic_id> <note_id> [note_id...]
102
82
  ```
103
83
 
104
- Supports removing multiple notes in a single call.
105
-
106
- **Examples:**
107
84
  ```bash
108
- # Remove a single note
109
- getnote kb remove kb_abc123 note_xyz789
110
-
111
- # Remove multiple notes at once
112
- getnote kb remove kb_abc123 note_xyz789 note_def456
85
+ getnote kb remove vnrOAaGY 1234567890
86
+ getnote kb remove vnrOAaGY 1234567890 9876543210
113
87
  ```
114
88
 
115
89
  ---
116
90
 
117
91
  ## Agent Usage Notes
118
92
 
119
- - Use `--output json` for all commands when parsing responses programmatically.
120
- - To get a `topic_id`, first call `getnote kb list --output json` and extract the `id` field.
121
- - `kb add` and `kb remove` accept multiple note IDs in a single call — prefer batching over multiple calls.
93
+ - Use `-o json` when parsing results programmatically.
94
+ - Get `topic_id` from `getnote kbs -o json` (the `id` field).
95
+ - `kb add` / `kb remove` accept multiple note IDs — prefer batching over multiple calls.
122
96
  - Exit code `0` = success; non-zero = error. Error details go to stderr.
123
- - Combine with `getnote note list --output json` to get note IDs before adding them to a knowledge base.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: getnote-note
3
- version: 0.1.0
3
+ version: 0.2.0
4
4
  description: Manage notes in Get笔记 via the getnote CLI
5
5
  ---
6
6
 
@@ -11,146 +11,133 @@ Manage individual notes in Get笔记 — save, list, get, update, delete, and tr
11
11
  ## Prerequisites
12
12
 
13
13
  - `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
14
- - API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable
15
14
 
16
15
  ## Commands
17
16
 
18
17
  ### Save a note
19
18
 
20
19
  ```
21
- getnote note save <url|text> [--title <title>] [--tag <tag>]...
20
+ getnote save <url|text|image_path> [--title <title>] [--tag <tag>]...
22
21
  ```
23
22
 
24
23
  | Flag | Description |
25
24
  |------|-------------|
26
- | `--title` | Optional title for the note |
25
+ | `--title` | Optional title |
27
26
  | `--tag` | Tag to apply; may be repeated |
28
27
 
29
- - If the argument starts with `http://` or `https://`, it is saved as a **link note**.
30
- - Otherwise it is saved as a **text note**.
28
+ - URL (`http://` or `https://`) → saved as link note
29
+ - Local image path → saved as image note
30
+ - Otherwise → saved as text note
31
31
 
32
32
  **Examples:**
33
33
  ```bash
34
- # Save a URL
35
- getnote note save https://example.com/article --title "Interesting article" --tag reading
36
-
37
- # Save plain text
38
- getnote note save "Remember to review the API docs" --tag todo
39
-
40
- # Save with multiple tags
41
- getnote note save https://docs.example.com --tag docs --tag reference
34
+ getnote save https://example.com --title "Great article"
35
+ getnote save "Remember to review the docs" --tag work --tag important
36
+ getnote save ./screenshot.png --title "Design mockup"
42
37
  ```
43
38
 
44
- The response includes a `task_id` you can use to track progress:
45
- ```bash
46
- getnote note task <task_id>
47
- ```
39
+ URL saves are async; the CLI auto-polls until done, then shows the result.
40
+ In `-o json` mode, silently polls and returns the final note JSON.
48
41
 
49
42
  ---
50
43
 
51
- ### List notes
44
+ ### Track save task
52
45
 
53
46
  ```
54
- getnote note list [--limit <n>] [--since-id <id>] [--output json|table]
47
+ getnote task <task_id>
55
48
  ```
56
49
 
57
- | Flag | Default | Description |
58
- |------|---------|-------------|
59
- | `--limit` | 20 | Maximum number of notes to return |
60
- | `--since-id` | — | Cursor for pagination (ID of last note seen) |
61
- | `--output` | table | Output format: `table` or `json` |
50
+ Check progress of an async save task (returned by `save` for URLs).
62
51
 
63
- **Examples:**
64
52
  ```bash
65
- # List recent 20 notes
66
- getnote note list
67
-
68
- # List 50 notes
69
- getnote note list --limit 50
70
-
71
- # Paginate using cursor
72
- getnote note list --since-id note_abc123
73
-
74
- # Machine-readable JSON output
75
- getnote note list --output json
53
+ getnote task task_xyz789
54
+ getnote task task_xyz789 -o json
76
55
  ```
77
56
 
78
57
  ---
79
58
 
80
- ### Get note details
59
+ ### List recent notes
81
60
 
82
61
  ```
83
- getnote note get <note_id>
62
+ getnote notes [--limit <n>] [--since-id <id>] [--all]
84
63
  ```
85
64
 
86
- **Example:**
65
+ | Flag | Default | Description |
66
+ |------|---------|-------------|
67
+ | `--limit` | 20 | Notes per page |
68
+ | `--since-id` | — | Pagination cursor (last note ID seen) |
69
+ | `--all` | — | Fetch all notes (auto-paginate, streams output) |
70
+
87
71
  ```bash
88
- getnote note get note_abc123
89
- getnote note get note_abc123 --output json
72
+ getnote notes
73
+ getnote notes --limit 5
74
+ getnote notes --all
75
+ getnote notes --since-id 1234567890
76
+ getnote notes -o json
90
77
  ```
91
78
 
92
79
  ---
93
80
 
94
- ### Update a note
81
+ ### Get note details
95
82
 
96
83
  ```
97
- getnote note update <note_id> [--title <title>] [--content <content>] [--tags <tag1,tag2>]
84
+ getnote note <id> [--field <field>]
98
85
  ```
99
86
 
100
87
  | Flag | Description |
101
88
  |------|-------------|
102
- | `--title` | New title |
103
- | `--content` | New content body |
104
- | `--tags` | Comma-separated tags (replaces all existing tags) |
89
+ | `--field` | Output a single field: `id` / `title` / `content` / `type` / `created_at` / `updated_at` / `url` / `excerpt` |
105
90
 
106
- **Example:**
107
91
  ```bash
108
- getnote note update note_abc123 --title "Updated title" --tags "work,important"
92
+ getnote note 1234567890
93
+ getnote note 1234567890 --field content
94
+ getnote note 1234567890 --field url
95
+ getnote note 1234567890 -o json
109
96
  ```
110
97
 
111
98
  ---
112
99
 
113
- ### Delete a note
100
+ ### Update a note
114
101
 
115
102
  ```
116
- getnote note delete <note_id> [--yes]
103
+ getnote note update <id> [--title <title>] [--content <content>] [--tag <tags>]
117
104
  ```
118
105
 
119
106
  | Flag | Description |
120
107
  |------|-------------|
121
- | `--yes` | Skip the confirmation prompt |
108
+ | `--title` | New title |
109
+ | `--content` | New content (plain_text notes only) |
110
+ | `--tag` | Comma-separated tags (replaces all existing tags) |
122
111
 
123
- **Examples:**
124
112
  ```bash
125
- # Interactive confirmation
126
- getnote note delete note_abc123
127
-
128
- # Skip confirmation (useful in scripts)
129
- getnote note delete note_abc123 --yes
113
+ getnote note update 1234567890 --title "Updated title"
114
+ getnote note update 1234567890 --tag "work,important"
130
115
  ```
131
116
 
132
117
  ---
133
118
 
134
- ### Query task progress
119
+ ### Delete a note
135
120
 
136
121
  ```
137
- getnote note task <task_id>
122
+ getnote note delete <id> [-y]
138
123
  ```
139
124
 
140
- Use this after `note save` to check whether a URL has been processed.
125
+ Moves note to trash.
126
+
127
+ | Flag | Description |
128
+ |------|-------------|
129
+ | `-y` | Skip confirmation prompt |
141
130
 
142
- **Example:**
143
131
  ```bash
144
- getnote note task task_xyz789
145
- getnote note task task_xyz789 --output json
132
+ getnote note delete 1234567890
133
+ getnote note delete 1234567890 -y
146
134
  ```
147
135
 
148
136
  ---
149
137
 
150
138
  ## Agent Usage Notes
151
139
 
152
- - Use `--output json` for all commands when parsing responses programmatically.
153
- - `note save` may be async for URLs; poll `note task <task_id>` until `status` is `done`.
154
- - `note list --output json` returns a JSON array suitable for further processing with `jq`.
155
- - Pass `--yes` to `note delete` to avoid interactive prompts in automated workflows.
140
+ - Use `-o json` when parsing responses programmatically.
141
+ - `save` for URLs is async; in `-o json` mode the CLI auto-polls and returns the final note — no manual `task` polling needed.
142
+ - `note update --tag` replaces **all** existing tags; use `getnote tag add/remove` for partial updates.
156
143
  - Exit code `0` = success; non-zero = error. Error details go to stderr.
@@ -1,50 +1,47 @@
1
1
  ---
2
2
  name: getnote-search
3
- version: 0.1.0
3
+ version: 0.2.0
4
4
  description: Semantic search across notes in Get笔记 via the getnote CLI
5
5
  ---
6
6
 
7
7
  # getnote-search Skill
8
8
 
9
- Semantic search across all notes or within a specific knowledge base in Get笔记.
9
+ Semantic search across all notes or within a specific knowledge base.
10
10
 
11
11
  ## Prerequisites
12
12
 
13
13
  - `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
14
- - API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable
15
14
 
16
15
  ## Commands
17
16
 
18
17
  ### Search notes
19
18
 
20
19
  ```
21
- getnote search <query> [--kb <topic_id>] [--limit <n>] [--output json|table]
20
+ getnote search <query> [--kb <topic_id>] [--limit <n>]
22
21
  ```
23
22
 
24
23
  | Flag | Default | Description |
25
24
  |------|---------|-------------|
26
- | `--kb` | — | Limit search to a specific knowledge base (topic_id) |
27
- | `--limit` | 10 | Max results to return (max 10) |
28
- | `--output` | table | Output format: `table` or `json` |
25
+ | `--kb` | — | Limit search to a knowledge base (topic_id) |
26
+ | `--limit` | 10 | Max results (max 10) |
29
27
 
30
- **Examples:**
31
28
  ```bash
32
29
  # Search across all notes
33
30
  getnote search "大模型 API"
34
31
 
35
- # Search within a specific knowledge base
32
+ # Search within a knowledge base
36
33
  getnote search "RAG" --kb qnNX75j0
37
34
 
38
- # Limit results and get JSON output
39
- getnote search "机器学习" --limit 5 --output json
35
+ # Limit results + JSON output
36
+ getnote search "机器学习" --limit 5 -o json
40
37
  ```
41
38
 
42
39
  ---
43
40
 
44
41
  ## Agent Usage Notes
45
42
 
46
- - Use `--output json` when parsing results programmatically.
47
- - To search within a knowledge base, first get the `topic_id` via `getnote kb list --output json`.
43
+ - Use `-o json` when parsing results programmatically.
44
+ - Get `topic_id` for `--kb` from `getnote kbs -o json`.
48
45
  - Results are ranked by semantic relevance, not recency.
49
- - Max `--limit` is 10; for broader discovery use `getnote notes list` instead.
46
+ - Max `--limit` is 10; use `getnote notes` for broader browsing.
50
47
  - Exit code `0` = success; non-zero = error. Error details go to stderr.
@@ -1,65 +1,60 @@
1
1
  ---
2
2
  name: getnote-tag
3
- version: 0.1.0
3
+ version: 0.2.0
4
4
  description: Manage note tags in Get笔记 via the getnote CLI
5
5
  ---
6
6
 
7
7
  # getnote-tag Skill
8
8
 
9
- Add, list, and remove tags on notes in Get笔记.
9
+ Add, list, and remove tags on notes.
10
10
 
11
11
  ## Prerequisites
12
12
 
13
13
  - `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
14
- - API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable
15
14
 
16
15
  ## Commands
17
16
 
18
17
  ### List tags on a note
19
18
 
20
19
  ```
21
- getnote tag list <note_id> [--output json|table]
20
+ getnote tag list <note_id>
22
21
  ```
23
22
 
24
- **Examples:**
23
+ Returns all tags including their IDs (needed for `tag remove`).
24
+
25
25
  ```bash
26
26
  getnote tag list 1896830231705320746
27
- getnote tag list 1896830231705320746 --output json
27
+ getnote tag list 1896830231705320746 -o json
28
28
  ```
29
29
 
30
- Returns tag list including tag IDs (needed for `tag remove`).
31
-
32
30
  ---
33
31
 
34
- ### Add a tag to a note
32
+ ### Add a tag
35
33
 
36
34
  ```
37
35
  getnote tag add <note_id> <tag>
38
36
  ```
39
37
 
40
- **Examples:**
41
38
  ```bash
42
39
  getnote tag add 1896830231705320746 工作
43
- getnote tag add 1896830231705320746 阅读
44
40
  ```
45
41
 
46
42
  ---
47
43
 
48
- ### Remove a tag from a note
44
+ ### Remove a tag
49
45
 
50
46
  ```
51
47
  getnote tag remove <note_id> <tag_id>
52
48
  ```
53
49
 
54
- > ⚠️ Requires **tag ID** (not tag name). Use `getnote tag list <note_id>` to find the tag ID first.
50
+ > ⚠️ Requires **tag ID** (integer), not tag name. Run `getnote tag list <note_id>` first to get the ID.
55
51
  > System tags cannot be removed.
56
52
 
57
- **Examples:**
58
53
  ```bash
59
- # First, find the tag ID
60
- getnote tag list 1896830231705320746 --output json
54
+ # Get tag IDs first
55
+ getnote tag list 1896830231705320746 -o json
61
56
 
62
- # Then remove by tag ID
57
+ # Remove by tag ID
63
58
  getnote tag remove 1896830231705320746 123
64
59
  ```
65
60
 
@@ -67,7 +62,6 @@ getnote tag remove 1896830231705320746 123
67
62
 
68
63
  ## Agent Usage Notes
69
64
 
70
- - Use `--output json` on `tag list` to get tag IDs for use with `tag remove`.
71
- - `tag remove` takes a **tag ID** (integer), not a tag name — always call `tag list` first if you only have the name.
72
- - System tags cannot be deleted; the CLI will return an error if attempted.
65
+ - `tag remove` takes a **tag ID**, not a name — always call `tag list` first if you only have the name.
66
+ - For bulk tag replacement, use `getnote note update --tag` instead (replaces all tags at once).
73
67
  - Exit code `0` = success; non-zero = error. Error details go to stderr.