🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@getnote/cli

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getnote/cli - npm Package Compare versions

Comparing version
0.1.6
to
0.1.7
+1
-1
package.json
{
"name": "@getnote/cli",
"version": "0.1.6",
"version": "0.1.7",
"description": "CLI tool for Get笔记 — manage notes and knowledge bases from the terminal",

@@ -5,0 +5,0 @@ "keywords": [

---
name: getnote-auth
version: 0.1.0
version: 0.2.0
description: Manage authentication for Get笔记 CLI

@@ -9,3 +9,3 @@ ---

Log in, log out, and check authentication status for the `getnote` CLI.
Log in, log out, and check authentication status.

@@ -20,15 +20,12 @@ ## Commands

Two modes:
| Mode | Command | Description |
|------|---------|-------------|
| OAuth (recommended) | `getnote auth login` | Opens browser to authorize; saves credentials automatically |
| API Key | `getnote auth login --api-key <key>` | Saves API key directly, no browser needed |
| OAuth (recommended) | `getnote auth login` | Opens browser to authorize |
| API Key | `getnote auth login --api-key <key>` | Saves key directly, no browser |
**Examples:**
```bash
# OAuth flow (opens browser)
# OAuth flow
getnote auth login
# Direct API key
# API key directly
getnote auth login --api-key gk_live_xxx

@@ -50,5 +47,2 @@

Shows whether the CLI is authenticated and which API key is in use.
**Example:**
```bash

@@ -66,5 +60,4 @@ getnote auth status

Removes the saved API key from local config.
Removes saved credentials from local config.
**Example:**
```bash

@@ -78,5 +71,5 @@ getnote auth logout

- Always run `getnote auth status` before other commands to verify authentication.
- Always run `getnote auth status` first to verify authentication before other commands.
- If not authenticated, prompt the user to run `getnote auth login`.
- The `--api-key` flag on any command overrides the saved config temporarily (does not save).
- Credentials are stored locally; `auth logout` removes them.
- `--api-key` on any command is a temporary override and does not save credentials.
- Credentials are stored in `~/.getnote/config.json`; `auth logout` removes them.
---
name: getnote-kb
version: 0.1.0
version: 0.2.0
description: Manage knowledge bases in Get笔记 via the getnote CLI

@@ -9,3 +9,3 @@ ---

Manage knowledge bases (话题/topic) in Get笔记 — list, create, and add or remove notes.
Manage knowledge bases in Get笔记 — list, create, browse notes, add/remove notes.

@@ -15,21 +15,14 @@ ## Prerequisites

- `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
- API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable
## Commands
### List knowledge bases
### List all knowledge bases
```
getnote kb list [--output json|table]
getnote kbs
```
Returns all knowledge bases accessible to the authenticated user.
**Examples:**
```bash
# Human-friendly table
getnote kb list
# Machine-readable JSON
getnote kb list --output json
getnote kbs
getnote kbs -o json
```

@@ -39,16 +32,18 @@

### Create a knowledge base
### List notes in a knowledge base
```
getnote kb create <name> [--desc <description>]
getnote kb <topic_id> [--limit <n>] [--all]
```
| Flag | Description |
|------|-------------|
| `--desc` | Optional description for the knowledge base |
| Flag | Default | Description |
|------|---------|-------------|
| `--limit` | 20 | Notes per page |
| `--all` | — | Fetch all notes (auto-paginate) |
**Examples:**
```bash
getnote kb create "Research Papers"
getnote kb create "Project Docs" --desc "Documentation links for the main project"
getnote kb vnrOAaGY
getnote kb vnrOAaGY --limit 5
getnote kb vnrOAaGY --all
getnote kb vnrOAaGY -o json
```

@@ -58,22 +53,11 @@

### List notes in a knowledge base
### Create a knowledge base
```
getnote kb notes <topic_id> [--limit <n>] [--output json|table]
getnote kb create <name> [--desc <description>]
```
| Flag | Default | Description |
|------|---------|-------------|
| `--limit` | 20 | Maximum number of notes to return |
**Examples:**
```bash
# List notes in a knowledge base
getnote kb notes kb_abc123
# Get more results
getnote kb notes kb_abc123 --limit 50
# Machine-readable output
getnote kb notes kb_abc123 --output json
getnote kb create "Research Papers"
getnote kb create "Project Docs" --desc "Documentation links for the main project"
```

@@ -89,11 +73,7 @@

Supports adding multiple notes in a single call.
Supports multiple note IDs in one call.
**Examples:**
```bash
# Add a single note
getnote kb add kb_abc123 note_xyz789
# Add multiple notes at once
getnote kb add kb_abc123 note_xyz789 note_def456 note_ghi012
getnote kb add vnrOAaGY 1234567890
getnote kb add vnrOAaGY 1234567890 9876543210
```

@@ -109,11 +89,5 @@

Supports removing multiple notes in a single call.
**Examples:**
```bash
# Remove a single note
getnote kb remove kb_abc123 note_xyz789
# Remove multiple notes at once
getnote kb remove kb_abc123 note_xyz789 note_def456
getnote kb remove vnrOAaGY 1234567890
getnote kb remove vnrOAaGY 1234567890 9876543210
```

@@ -125,6 +99,5 @@

- Use `--output json` for all commands when parsing responses programmatically.
- To get a `topic_id`, first call `getnote kb list --output json` and extract the `id` field.
- `kb add` and `kb remove` accept multiple note IDs in a single call — prefer batching over multiple calls.
- Use `-o json` when parsing results programmatically.
- Get `topic_id` from `getnote kbs -o json` (the `id` field).
- `kb add` / `kb remove` accept multiple note IDs — prefer batching over multiple calls.
- Exit code `0` = success; non-zero = error. Error details go to stderr.
- Combine with `getnote note list --output json` to get note IDs before adding them to a knowledge base.
---
name: getnote-note
version: 0.1.0
version: 0.2.0
description: Manage notes in Get笔记 via the getnote CLI

@@ -14,3 +14,2 @@ ---

- `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
- API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable

@@ -22,3 +21,3 @@ ## Commands

```
getnote note save <url|text> [--title <title>] [--tag <tag>]...
getnote save <url|text|image_path> [--title <title>] [--tag <tag>]...
```

@@ -28,23 +27,32 @@

|------|-------------|
| `--title` | Optional title for the note |
| `--title` | Optional title |
| `--tag` | Tag to apply; may be repeated |
- If the argument starts with `http://` or `https://`, it is saved as a **link note**.
- Otherwise it is saved as a **text note**.
- URL (`http://` or `https://`) → saved as link note
- Local image path → saved as image note
- Otherwise → saved as text note
**Examples:**
```bash
# Save a URL
getnote note save https://example.com/article --title "Interesting article" --tag reading
getnote save https://example.com --title "Great article"
getnote save "Remember to review the docs" --tag work --tag important
getnote save ./screenshot.png --title "Design mockup"
```
# Save plain text
getnote note save "Remember to review the API docs" --tag todo
URL saves are async; the CLI auto-polls until done, then shows the result.
In `-o json` mode, silently polls and returns the final note JSON.
# Save with multiple tags
getnote note save https://docs.example.com --tag docs --tag reference
---
### Track save task
```
getnote task <task_id>
```
The response includes a `task_id` you can use to track progress:
Check progress of an async save task (returned by `save` for URLs).
```bash
getnote note task <task_id>
getnote task task_xyz789
getnote task task_xyz789 -o json
```

@@ -54,6 +62,6 @@

### List notes
### List recent notes
```
getnote note list [--limit <n>] [--since-id <id>] [--output json|table]
getnote notes [--limit <n>] [--since-id <id>] [--all]
```

@@ -63,19 +71,12 @@

|------|---------|-------------|
| `--limit` | 20 | Maximum number of notes to return |
| `--since-id` | — | Cursor for pagination (ID of last note seen) |
| `--output` | table | Output format: `table` or `json` |
| `--limit` | 20 | Notes per page |
| `--since-id` | — | Pagination cursor (last note ID seen) |
| `--all` | — | Fetch all notes (auto-paginate, streams output) |
**Examples:**
```bash
# List recent 20 notes
getnote note list
# List 50 notes
getnote note list --limit 50
# Paginate using cursor
getnote note list --since-id note_abc123
# Machine-readable JSON output
getnote note list --output json
getnote notes
getnote notes --limit 5
getnote notes --all
getnote notes --since-id 1234567890
getnote notes -o json
```

@@ -88,9 +89,14 @@

```
getnote note get <note_id>
getnote note <id> [--field <field>]
```
**Example:**
| Flag | Description |
|------|-------------|
| `--field` | Output a single field: `id` / `title` / `content` / `type` / `created_at` / `updated_at` / `url` / `excerpt` |
```bash
getnote note get note_abc123
getnote note get note_abc123 --output json
getnote note 1234567890
getnote note 1234567890 --field content
getnote note 1234567890 --field url
getnote note 1234567890 -o json
```

@@ -103,3 +109,3 @@

```
getnote note update <note_id> [--title <title>] [--content <content>] [--tags <tag1,tag2>]
getnote note update <id> [--title <title>] [--content <content>] [--tag <tags>]
```

@@ -110,8 +116,8 @@

| `--title` | New title |
| `--content` | New content body |
| `--tags` | Comma-separated tags (replaces all existing tags) |
| `--content` | New content (plain_text notes only) |
| `--tag` | Comma-separated tags (replaces all existing tags) |
**Example:**
```bash
getnote note update note_abc123 --title "Updated title" --tags "work,important"
getnote note update 1234567890 --title "Updated title"
getnote note update 1234567890 --tag "work,important"
```

@@ -124,16 +130,14 @@

```
getnote note delete <note_id> [--yes]
getnote note delete <id> [-y]
```
Moves note to trash.
| Flag | Description |
|------|-------------|
| `--yes` | Skip the confirmation prompt |
| `-y` | Skip confirmation prompt |
**Examples:**
```bash
# Interactive confirmation
getnote note delete note_abc123
# Skip confirmation (useful in scripts)
getnote note delete note_abc123 --yes
getnote note delete 1234567890
getnote note delete 1234567890 -y
```

@@ -143,24 +147,7 @@

### Query task progress
```
getnote note task <task_id>
```
Use this after `note save` to check whether a URL has been processed.
**Example:**
```bash
getnote note task task_xyz789
getnote note task task_xyz789 --output json
```
---
## Agent Usage Notes
- Use `--output json` for all commands when parsing responses programmatically.
- `note save` may be async for URLs; poll `note task <task_id>` until `status` is `done`.
- `note list --output json` returns a JSON array suitable for further processing with `jq`.
- Pass `--yes` to `note delete` to avoid interactive prompts in automated workflows.
- Use `-o json` when parsing responses programmatically.
- `save` for URLs is async; in `-o json` mode the CLI auto-polls and returns the final note — no manual `task` polling needed.
- `note update --tag` replaces **all** existing tags; use `getnote tag add/remove` for partial updates.
- Exit code `0` = success; non-zero = error. Error details go to stderr.
---
name: getnote-search
version: 0.1.0
version: 0.2.0
description: Semantic search across notes in Get笔记 via the getnote CLI

@@ -9,3 +9,3 @@ ---

Semantic search across all notes or within a specific knowledge base in Get笔记.
Semantic search across all notes or within a specific knowledge base.

@@ -15,3 +15,2 @@ ## Prerequisites

- `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
- API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable

@@ -23,3 +22,3 @@ ## Commands

```
getnote search <query> [--kb <topic_id>] [--limit <n>] [--output json|table]
getnote search <query> [--kb <topic_id>] [--limit <n>]
```

@@ -29,7 +28,5 @@

|------|---------|-------------|
| `--kb` | — | Limit search to a specific knowledge base (topic_id) |
| `--limit` | 10 | Max results to return (max 10) |
| `--output` | table | Output format: `table` or `json` |
| `--kb` | — | Limit search to a knowledge base (topic_id) |
| `--limit` | 10 | Max results (max 10) |
**Examples:**
```bash

@@ -39,7 +36,7 @@ # Search across all notes

# Search within a specific knowledge base
# Search within a knowledge base
getnote search "RAG" --kb qnNX75j0
# Limit results and get JSON output
getnote search "机器学习" --limit 5 --output json
# Limit results + JSON output
getnote search "机器学习" --limit 5 -o json
```

@@ -51,6 +48,6 @@

- Use `--output json` when parsing results programmatically.
- To search within a knowledge base, first get the `topic_id` via `getnote kb list --output json`.
- Use `-o json` when parsing results programmatically.
- Get `topic_id` for `--kb` from `getnote kbs -o json`.
- Results are ranked by semantic relevance, not recency.
- Max `--limit` is 10; for broader discovery use `getnote notes list` instead.
- Max `--limit` is 10; use `getnote notes` for broader browsing.
- Exit code `0` = success; non-zero = error. Error details go to stderr.
---
name: getnote-tag
version: 0.1.0
version: 0.2.0
description: Manage note tags in Get笔记 via the getnote CLI

@@ -9,3 +9,3 @@ ---

Add, list, and remove tags on notes in Get笔记.
Add, list, and remove tags on notes.

@@ -15,3 +15,2 @@ ## Prerequisites

- `getnote` CLI installed and authenticated (`getnote auth status` should show "Authenticated")
- API key configured via `getnote auth login --api-key <key>` or the `GETNOTE_API_KEY` environment variable

@@ -23,16 +22,15 @@ ## Commands

```
getnote tag list <note_id> [--output json|table]
getnote tag list <note_id>
```
**Examples:**
Returns all tags including their IDs (needed for `tag remove`).
```bash
getnote tag list 1896830231705320746
getnote tag list 1896830231705320746 --output json
getnote tag list 1896830231705320746 -o json
```
Returns tag list including tag IDs (needed for `tag remove`).
---
### Add a tag to a note
### Add a tag

@@ -43,6 +41,4 @@ ```

**Examples:**
```bash
getnote tag add 1896830231705320746 工作
getnote tag add 1896830231705320746 阅读
```

@@ -52,3 +48,3 @@

### Remove a tag from a note
### Remove a tag

@@ -59,11 +55,10 @@ ```

> ⚠️ Requires **tag ID** (not tag name). Use `getnote tag list <note_id>` to find the tag ID first.
> ⚠️ Requires **tag ID** (integer), not tag name. Run `getnote tag list <note_id>` first to get the ID.
> System tags cannot be removed.
**Examples:**
```bash
# First, find the tag ID
getnote tag list 1896830231705320746 --output json
# Get tag IDs first
getnote tag list 1896830231705320746 -o json
# Then remove by tag ID
# Remove by tag ID
getnote tag remove 1896830231705320746 123

@@ -76,5 +71,4 @@ ```

- Use `--output json` on `tag list` to get tag IDs for use with `tag remove`.
- `tag remove` takes a **tag ID** (integer), not a tag name — always call `tag list` first if you only have the name.
- System tags cannot be deleted; the CLI will return an error if attempted.
- `tag remove` takes a **tag ID**, not a name — always call `tag list` first if you only have the name.
- For bulk tag replacement, use `getnote note update --tag` instead (replaces all tags at once).
- Exit code `0` = success; non-zero = error. Error details go to stderr.