getnote-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

getnote-search Skill

getnote-search Skill

Semantic search across all notes or within a specific knowledge base.
可在所有笔记中或者指定知识库内执行语义搜索。

Prerequisites

前置条件

  • getnote
    CLI installed and authenticated (
    getnote auth status
    should show "Authenticated")
  • 已安装
    getnote
    CLI并完成认证(执行
    getnote auth status
    应显示"Authenticated")

Commands

命令

Search notes

搜索笔记

getnote search <query> [--kb <topic_id>] [--limit <n>]
FlagDefaultDescription
--kb
Limit search to a knowledge base (
topic_id
)
--limit
10Max results (max 10)
Results are ranked by semantic relevance (high → low). Each result includes:
note_id
,
title
,
content
(excerpt),
created_at
,
note_type
.
Note:
note_id
is only populated for
NOTE
type results. Other types (
FILE
,
BLOGGER
,
LIVE
, etc.) return an empty
note_id
.
bash
undefined
getnote search <query> [--kb <topic_id>] [--limit <n>]
选项标识默认值说明
--kb
限定在指定知识库(
topic_id
)内搜索
--limit
10最大返回结果数(最高10条)
搜索结果按语义相关性从高到低排序,每条结果包含:
note_id
title
content
(摘要)、
created_at
note_type
注意:仅
NOTE
类型的结果会填充
note_id
,其他类型(
FILE
BLOGGER
LIVE
等)的
note_id
返回为空。
bash
undefined

Search across all notes

搜索所有笔记

getnote search "大模型 API"
getnote search "大模型 API"

Search within a knowledge base

在指定知识库内搜索

getnote search "RAG" --kb qnNX75j0
getnote search "RAG" --kb qnNX75j0

Limit results + JSON output

限定结果数量 + JSON格式输出

getnote search "机器学习" --limit 5 -o json

---
getnote search "机器学习" --limit 5 -o json

---

Agent Usage Notes

Agent使用说明

  • Use
    -o json
    when parsing results programmatically.
  • JSON response:
    {"success":true,"results":[{"note_id":"...","title":"...","content":"...","created_at":"...","note_type":"..."}]}
  • Note:
    results
    is at the top level, not nested under
    data
    .
  • Get
    topic_id
    for
    --kb
    from
    getnote kbs -o json
    data.topics[].topic_id
    .
  • For
    NOTE
    type results, use
    getnote note <note_id>
    to get the full content.
  • Max
    --limit
    is 10; use
    getnote notes
    for browsing without a query.
  • Exit code
    0
    = success; non-zero = error. Error details go to stderr.
  • 程序自动解析结果时请使用
    -o json
    参数。
  • JSON响应格式:
    {"success":true,"results":[{"note_id":"...","title":"...","content":"...","created_at":"...","note_type":"..."}]}
  • 注意:
    results
    字段在响应最顶层,没有嵌套在
    data
    下。
  • 可通过
    getnote kbs -o json
    返回的
    data.topics[].topic_id
    获取
    --kb
    参数需要的
    topic_id
  • 对于
    NOTE
    类型的结果,可使用
    getnote note <note_id>
    获取完整内容。
  • --limit
    的最大值是10;无搜索查询时可使用
    getnote notes
    浏览笔记。
  • 退出码
    0
    代表执行成功;非0值代表出错,错误详情会输出到stderr。