getnote-tag

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

getnote-tag Skill

getnote-tag Skill

Add, list, and remove tags on notes.
实现笔记标签的新增、查询和删除功能。

Prerequisites

前置条件

  • getnote
    CLI installed and authenticated (
    getnote auth status
    should show "Authenticated")
  • 已安装
    getnote
    CLI并完成身份验证(执行
    getnote auth status
    应当显示「Authenticated」)

Commands

命令

List tags on a note

查看单条笔记的标签列表

getnote tag list <note_id>
Returns all tags with their IDs and types.
Tag types:
  • ai
    — auto-generated by AI
  • manual
    — added by the user
  • system
    — system tag (cannot be deleted)
bash
getnote tag list 1896830231705320746
getnote tag list 1896830231705320746 -o json

getnote tag list <note_id>
返回所有标签及其ID和类型。
标签类型:
  • ai
    — AI自动生成
  • manual
    — 用户手动添加
  • system
    — 系统标签(不可删除
bash
getnote tag list 1896830231705320746
getnote tag list 1896830231705320746 -o json

Add a tag

新增标签

getnote tag add <note_id> <tag>
bash
getnote tag add 1896830231705320746 工作

getnote tag add <note_id> <tag>
bash
getnote tag add 1896830231705320746 工作

Remove a tag

删除标签

getnote tag remove <note_id> <tag_id>
⚠️ Requires tag ID (integer from
tag list
), not tag name. ⚠️
system
type tags cannot be removed.
bash
undefined
getnote tag remove <note_id> <tag_id>
⚠️ 需要传入标签ID
tag list
命令返回的整数),而不是标签名称。 ⚠️
system
类型的标签无法删除。
bash
undefined

Step 1: get tag IDs

步骤1:获取标签ID

getnote tag list 1896830231705320746 -o json
getnote tag list 1896830231705320746 -o json

Step 2: remove by tag ID

步骤2:通过标签ID删除

getnote tag remove 1896830231705320746 123

---
getnote tag remove 1896830231705320746 123

---

Agent Usage Notes

Agent使用说明

  • tag list -o json
    returns
    {"note_id":"...","tags":[{"id":"...","name":"...","type":"..."}]}
    (flat, no
    success
    wrapper).
  • tag remove
    takes a numeric tag ID, not a name — always call
    tag list
    first.
  • To replace all tags at once, use
    getnote note update --tag "tag1,tag2"
    instead.
  • Exit code
    0
    = success; non-zero = error. Error details go to stderr.
  • tag list -o json
    返回格式为
    {"note_id":"...","tags":[{"id":"...","name":"...","type":"..."}]}
    (扁平化结构,无
    success
    外层包裹)。
  • tag remove
    接收的是数字类型的标签ID,不是名称 — 务必先调用
    tag list
    获取ID。
  • 如需一次性替换全部标签,请改用
    getnote note update --tag "tag1,tag2"
    命令。
  • 退出码
    0
    表示操作成功;非0值表示出错,错误详情会输出到stderr。