cubox
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecubox-cli
cubox-cli
Manage Cubox bookmarks via the command-line tool.
cubox-cli通过 命令行工具管理Cubox书签。
cubox-cliAuthentication
身份验证
If any command fails with "not logged in", run and follow the interactive prompts.
cubox-cli auth login如果任何命令返回“未登录”错误,请运行 并按照交互式提示操作。
cubox-cli auth loginCommands
命令
All commands output JSON by default. Add for indented JSON, for human-readable output.
-o pretty-o text所有命令默认输出JSON格式。添加 可获得缩进格式的JSON,添加 可获得易读的文本输出。
-o pretty-o textList Folders
列出文件夹
bash
cubox-cli folder listReturns:
[{ "id", "nested_name", "name", "parent_id", "uncategorized" }]bash
cubox-cli folder list返回:
[{ "id", "nested_name", "name", "parent_id", "uncategorized" }]List Tags
列出标签
bash
cubox-cli tag listReturns:
[{ "id", "nested_name", "name", "parent_id" }]bash
cubox-cli tag list返回:
[{ "id", "nested_name", "name", "parent_id" }]Filter / Search Cards
筛选/搜索卡片
bash
cubox-cli card list [flags]Flags:
- — filter by folder IDs
--folder ID,... - — filter by tag IDs
--tag ID,... - — starred cards only
--starred - /
--read— filter by read status--unread - — cards with annotations only
--annotated - — search by keyword
--keyword TEXT - ,
--start-time— filter by time range (see Time filtering below)--end-time - — page size (default 50)
--limit N - — cursor pagination (non-search mode)
--last-id CARD_ID - — page-based pagination (search mode, 1-based)
--page N - — auto-paginate all results
--all
Pagination rules:
- When is set (search mode): use
--keywordfor pagination,--pageis ignored--last-id - When is not set (browse mode): use
--keywordfor cursor-based pagination--last-id
Returns:
[{ "id", "title", "description", "domain", "read", "starred", "tags", "folder", "url", ... }]bash
cubox-cli card list [flags]可选参数:
- — 按文件夹ID筛选
--folder ID,... - — 按标签ID筛选
--tag ID,... - — 仅显示已收藏的卡片
--starred - /
--read— 按阅读状态筛选--unread - — 仅显示带有注释的卡片
--annotated - — 按关键词搜索
--keyword TEXT - ,
--start-time— 按时间范围筛选(见下方时间过滤)--end-time - — 每页数量(默认50)
--limit N - — 游标分页(非搜索模式)
--last-id CARD_ID - — 基于页码的分页(搜索模式,从1开始)
--page N - — 自动分页获取所有结果
--all
分页规则:
- 设置 时(搜索模式):使用
--keyword进行分页,--page会被忽略--last-id - 未设置 时(浏览模式):使用
--keyword进行游标分页--last-id
返回:
[{ "id", "title", "description", "domain", "read", "starred", "tags", "folder", "url", ... }]Get Card Detail
获取卡片详情
bash
cubox-cli card detail --id CARD_IDReturns full card with (markdown), , , and (AI summary + Q&A). Use to output only the markdown content.
contentauthorannotationsinsight-o textbash
cubox-cli card detail --id CARD_ID返回包含 (markdown格式)、、 和 (AI摘要与问答)的完整卡片信息。使用 可仅输出markdown内容。
contentauthorannotationsinsight-o textRAG Semantic Search
RAG语义搜索
bash
cubox-cli card rag --query "QUERY_TEXT"Semantic search via natural language. Unlike , RAG understands intent and returns conceptually relevant cards. Must-read: RAG workflow — covers when to use RAG vs keyword, query refinement, progressive detail fetching, and re-ranking.
--keywordReturns: (same Card shape as )
[{ "id", "title", "description", "domain", "tags", "folder", "url", ... }]card listbash
cubox-cli card rag --query "QUERY_TEXT"通过自然语言进行语义搜索。与 不同,RAG能理解意图并返回概念相关的卡片。必读:RAG工作流 — 涵盖何时使用RAG而非关键词搜索、查询优化、渐进式详情获取以及重排序。
--keyword返回:(与 返回的卡片结构一致)
[{ "id", "title", "description", "domain", "tags", "folder", "url", ... }]card listSave Web Pages
保存网页
bash
cubox-cli save URL [URL...] [--title TEXT] [--desc TEXT] [--folder NAME] [--tag NAME,...]
cubox-cli save --json '[{"url":"...","title":"...","description":"..."}]' [--folder NAME] [--tag NAME,...]Save one or more web pages as bookmarks. Three input modes:
- URL arguments — simple:
cubox-cli save https://example.com https://b.com - Single with metadata —
cubox-cli save https://example.com --title "My Page" --desc "A description" - Batch via JSON —
cubox-cli save --json '[{"url":"https://a.com","title":"Title A"}]'
Folders and tags are specified by name (not ID), including nested paths like .
"parent/child"bash
cubox-cli save URL [URL...] [--title TEXT] [--desc TEXT] [--folder NAME] [--tag NAME,...]
cubox-cli save --json '[{"url":"...","title":"...","description":"..."}]' [--folder NAME] [--tag NAME,...]将一个或多个网页保存为书签。支持三种输入模式:
- URL参数模式 — 简单方式:
cubox-cli save https://example.com https://b.com - 带元数据的单个URL模式 —
cubox-cli save https://example.com --title "我的页面" --desc "一段描述" - JSON批量模式 —
cubox-cli save --json '[{"url":"https://a.com","title":"标题A"}]'
文件夹和标签通过名称指定(而非ID),包括嵌套路径如 。
"parent/child"Update a Card
更新卡片
bash
cubox-cli update --id CARD_ID [flags]Flags:
- /
--star— toggle star--unstar - /
--read— toggle read status--unread - — archive the card
--archive - — move to folder by name (e.g.
--folder NAME;"parent/child"= Uncategorized)"" - — replace all tags (existing tags are removed and replaced)
--tag NAME,... - — add tags without affecting existing ones
--add-tag NAME,... - — remove specific tags only
--remove-tag NAME,... - — update title
--title TEXT - — update description
--description TEXT
Tag operation guide — choose the right flag based on user intent:
| User says | Flag | Behavior |
|---|---|---|
| "刷新/更改/替换/设置 tags" | | Replaces all tags (old tags removed) |
| "添加/新增/加上 tags" | | Appends tags (existing tags kept) |
| "删除/移除/去掉 tags" | | Removes only specified tags |
Folders and tags are specified by name (not ID). No need to query IDs first.
bash
cubox-cli update --id CARD_ID [flags]可选参数:
- /
--star— 切换收藏状态--unstar - /
--read— 切换阅读状态--unread - — 归档卡片
--archive - — 按名称移动到指定文件夹(例如
--folder NAME;"parent/child"= 未分类)"" - — 替换所有标签(现有标签会被移除并替换)
--tag NAME,... - — 添加标签,不影响现有标签
--add-tag NAME,... - — 仅移除指定标签
--remove-tag NAME,... - — 更新标题
--title TEXT - — 更新描述
--description TEXT
标签操作指南 — 根据用户意图选择正确的参数:
| 用户表述 | 参数 | 行为 |
|---|---|---|
| "刷新/更改/替换/设置 tags" | | 替换所有标签(旧标签被移除) |
| "添加/新增/加上 tags" | | 追加标签(保留现有标签) |
| "删除/移除/去掉 tags" | | 仅移除指定标签 |
文件夹和标签通过名称指定(而非ID),无需先查询ID。
Delete Cards
删除卡片
bash
cubox-cli delete --id CARD_ID [--id ID2,...] [--dry-run]Delete cards by ID. Always first. Must-read: Dry Run Policy — agents must preview before deleting.
--dry-runbash
cubox-cli delete --id CARD_ID [--id ID2,...] [--dry-run]按ID删除卡片。请始终先执行 。 必读:试运行规则 — 工具必须在删除前预览操作结果。
--dry-runList Annotations
列出注释
bash
cubox-cli annotation list [flags]Flags:
- — filter by color
--color Yellow,Green,Blue,Pink,Purple - — search annotations
--keyword TEXT - ,
--start-time— filter by time range (same formats and rules as card list)--end-time - — page size (default 50)
--limit N - — cursor pagination
--last-id ID - — auto-paginate all results
--all
Returns:
[{ "id", "text", "note", "color", "card_id", ... }]bash
cubox-cli annotation list [flags]可选参数:
- — 按颜色筛选
--color Yellow,Green,Blue,Pink,Purple - — 搜索注释
--keyword TEXT - ,
--start-time— 按时间范围筛选(格式和规则与卡片列表一致)--end-time - — 每页数量(默认50)
--limit N - — 游标分页
--last-id ID - — 自动分页获取所有结果
--all
返回:
[{ "id", "text", "note", "color", "card_id", ... }]Cubox Deep Links
Cubox深度链接
Construct clickable Cubox links from any resource ID (card, folder, tag). No API call needed — just the ID + server. Must-read: Deep Links — URL patterns, scheme rules, and examples.
Default: — use scheme only when explicitly requested.
https://{server}/web/card/{ID}cubox://通过任意资源ID(卡片、文件夹、标签)构建可点击的Cubox链接。无需调用API — 只需ID和服务器地址即可。必读:深度链接 — 包含URL格式、协议规则和示例。
默认格式: — 仅在明确要求时使用 协议。
https://{server}/web/card/{ID}cubox://Time filtering
时间过滤
--start-time--end-time- resolves to start of day (00:00:00.000)
--start-time - resolves to end of day (23:59:59.999)
--end-time
Accepted formats: , , , (7 days ago), , , or full ISO timestamp.
todayyesterdaynow7d2026-01-012026-01-01 15:04:05Common time query patterns:
| Intent | Command |
|---|---|
| Today's cards | |
| Yesterday's cards | |
| Last 7 days | |
| Since a date | |
| Up to now | |
--start-time--end-time- 解析为当天开始时间(00:00:00.000)
--start-time - 解析为当天结束时间(23:59:59.999)
--end-time
支持的格式:、、、(7天前)、、 或完整的ISO时间戳。
todayyesterdaynow7d2026-01-012026-01-01 15:04:05常见时间查询模式:
| 意图 | 命令 |
|---|---|
| 今日卡片 | |
| 昨日卡片 | |
| 最近7天卡片 | |
| 指定日期之后的卡片 | |
| 截至当前的卡片 | |
Common Workflows
常见工作流
Browse and read a card detail
浏览并查看卡片详情
bash
cubox-cli folder list
cubox-cli card list --folder FOLDER_ID --limit 10
cubox-cli card detail --id CARD_IDbash
cubox-cli folder list
cubox-cli card list --folder FOLDER_ID --limit 10
cubox-cli card detail --id CARD_IDSearch for articles
搜索文章
bash
cubox-cli card list --keyword "machine learning" --page 1bash
cubox-cli card list --keyword "machine learning" --page 1Save a page and star it
保存页面并收藏
bash
cubox-cli save https://example.com --title "Example" --folder "Reading List"
cubox-cli update --id CARD_ID --starbash
cubox-cli save https://example.com --title "示例页面" --folder "阅读清单"
cubox-cli update --id CARD_ID --starList cards with Cubox links
生成带Cubox链接的卡片列表
bash
cubox-cli auth status # determine server (cubox.pro or cubox.cc)
cubox-cli card list --limit 5 # get cards, then append link from IDbash
cubox-cli auth status # 确定服务器地址(cubox.pro 或 cubox.cc)
cubox-cli card list --limit 5 # 获取卡片,然后根据ID拼接链接For card ID 7247925101516031380 on cubox.pro:
对于cubox.pro上的卡片ID 7247925101516031380:
undefinedundefinedExport all annotations
导出所有注释
bash
cubox-cli annotation list --allbash
cubox-cli annotation list --allUpdate Check
版本更新检查
cubox-cli automatically checks for new versions in the background. When a newer version is available, the JSON output will contain a field:
_notice.updatejson
{
"data": [ "..." ],
"_notice": {
"update": {
"current": "0.1.0",
"latest": "0.2.0",
"message": "A new version of cubox-cli is available: 0.1.0 -> 0.2.0",
"command": "npm update -g cubox-cli && npx skills add OLCUBO/cubox-cli -g -y"
}
}
}When you see in output, after completing the user's current request, proactively offer to update:
_notice.update- Tell the user the current and latest version numbers
- Propose running the update (CLI and Skills must be updated together):
bash
npm update -g cubox-cli && npx skills add OLCUBO/cubox-cli -g -y- After the update, remind the user: exit and reopen the AI Agent to load the latest Skills
Rule: Do not silently ignore update notices. Even if the current task is unrelated, mention the available update after completing the user's request.
cubox-cli会在后台自动检查新版本。当有可用更新时,JSON输出中会包含 字段:
_notice.updatejson
{
"data": [ "..." ],
"_notice": {
"update": {
"current": "0.1.0",
"latest": "0.2.0",
"message": "A new version of cubox-cli is available: 0.1.0 -> 0.2.0",
"command": "npm update -g cubox-cli && npx skills add OLCUBO/cubox-cli -g -y"
}
}
}当输出中出现 时,完成用户当前请求后,请主动提示更新:
_notice.update- 告知用户当前版本和最新版本号
- 建议执行以下更新命令(CLI和Skills需同时更新):
bash
npm update -g cubox-cli && npx skills add OLCUBO/cubox-cli -g -y- 更新完成后,提醒用户:退出并重新打开AI Agent以加载最新的Skills
规则:请勿忽略更新提示。即使当前任务无关,完成用户请求后也需告知可用更新。
Security Rules
安全规则
- Never expose sensitive credentials in plain text (API key/token, session data, auth headers).
- Treat Cubox API tokens as local secrets. Do not commit or copy them into repository files, screenshots, or shared notes.
- Before any write/destructive action (,
save,update), confirm user intent first. For deletion, always rundeleteand present the preview before execution.--dry-run - When demonstrating commands, use placeholders (for example ) instead of real values.
YOUR_API_KEY - Avoid leaving secrets in shell history where possible (for example, prefer temporary environment variables and clear them after use).
- If credentials are suspected to be leaked, instruct the user to rotate the Cubox API token from the extensions page immediately.
- 切勿以明文形式暴露敏感凭证(API密钥/令牌、会话数据、认证头)。
- 将Cubox API令牌视为本地机密。请勿将其提交到代码仓库、截图或共享笔记中。
- 在执行任何写入/破坏性操作(、
save、update)前,先确认用户意图。对于删除操作,必须先执行delete并展示预览结果后再执行。--dry-run - 演示命令时,请使用占位符(例如 )而非真实值。
YOUR_API_KEY - 尽可能避免将机密信息留在shell历史中(例如,优先使用临时环境变量并在使用后清除)。
- 如果怀疑凭证泄露,请指导用户立即从扩展页面重置Cubox API令牌。
Notes
注意事项
- Browse pagination uses cursor-based approach (). Search pagination uses page numbers (
--last-id).--page - The field in folders and tags shows the full hierarchy path (e.g.
nested_name)."Parent/Child" - Card detail includes AI-generated with summary and Q&A pairs when available.
insight - Config is stored at .
~/.config/cubox-cli/config.json
- 浏览模式使用游标分页()。搜索模式使用页码分页(
--last-id)。--page - 文件夹和标签中的 字段显示完整的层级路径(例如
nested_name)。"Parent/Child" - 卡片详情包含AI生成的 (摘要与问答对)(如果可用)。
insight - 配置文件存储在 。
~/.config/cubox-cli/config.json