| name | xinzhi |
| description | Manage notes, containers, tags, and authors on Xinzhi (xinzhi.zone) via the xinzhi CLI. Use when the user asks to save a link, create a memo, write a document, search notes, manage tags or containers, list authors, archive or move notes, or anything related to knowledge management, bookmarking, or note-taking with Xinzhi. |
Xinzhi Knowledge Manager
Interact with the user's Xinzhi account via the xinzhi CLI (v0.0.9+) to manage notes, containers, tags, and authors.
Prerequisites
xinzhi CLI installed globally: npm install -g @xinzhi-zone/cli
- Logged in:
xinzhi login <token> (token from Xinzhi web Settings -> AI Agent -> CLI AccessToken)
- Node.js >= 20
Quick Reference
All commands output JSON. Parse and present results in a user-friendly format.
Containers (folders for organizing notes)
xinzhi container list --page-size 50
xinzhi container create --title "AI Inbox" --description "Agent Inbox"
xinzhi container get --name "AI Inbox"
xinzhi container get --id "<container-id>"
xinzhi container update --id "<id>" --title "New Title" --description "New Desc"
Tags
xinzhi tag list --keyword "AI" --page-size 50
xinzhi tag create --name "AI/Product"
xinzhi tag get --name "AI/Product"
xinzhi tag update --id "<id>" --name "AI/Engineering"
Authors
xinzhi author list --keyword "张" --page-size 20
Notes
Creating Notes
xinzhi note create-link --url "https://example.com" \
--container-name "AI Inbox" --tag-names "AI/Product"
xinzhi note create-memo --content "Today's idea..." \
--container-name "AI Inbox" --tag-names "AI/Product,Thinking"
xinzhi note create-document --title "Weekly Summary" \
--content "$(cat ./weekly-summary.md)" \
--container-name "AI Inbox" --tag-names "AI/Product"
xinzhi note create-highlight --note-id "<document-note-id>" \
--text "selected text" --prefix "text before" --suffix "text after" \
--highlight default --highlight-color yellow
xinzhi note create-annotation --note-id "<note-id>" --content "My thoughts"
xinzhi note create-annotation --note-id "<note-id>" \
--content "My annotation" \
--text "selected text" --prefix "text before" --suffix "text after"
Querying Notes
xinzhi note list --container-name "AI Inbox" --tag-name "AI/Product" --page-size 20
xinzhi note list --start-time "2026-01-01" --end-time "2026-03-31" \
--time-field publishTime --type ARTICLE --sort-by publishTime --sort desc
xinzhi note search --keyword "Agent" --type ARTICLE --page-size 20
xinzhi note search --keyword "参考答案" --type SUBSCRIBE --page-size 50
xinzhi note aggregate-search --keyword "Agent" --page-size 20
xinzhi note get --id "<note-id>"
Managing Note Tags
xinzhi note add-tag --id "<note-id>" --tag-name "AI/Product"
xinzhi note remove-tag --id "<note-id>" --tag-name "AI/Product"
xinzhi note set-tags --id "<note-id>" --tag-names "AI/Product,Thinking"
xinzhi note set-tags --id "<note-id>" --clear-tags
Organizing Notes
xinzhi note move --id "<note-id>" --to-container-name "Inbox"
xinzhi note archive --id "<note-id>"
xinzhi note unarchive --id "<note-id>"
Workflow Patterns
Save and Tag a Link
- Create the link note:
xinzhi note create-link --url "<url>" --container-name "<container>"
- Parse the returned JSON for the note
id
- If additional tags needed:
xinzhi note add-tag --id "<id>" --tag-name "<tag>"
Batch Tag Management
- Search for notes:
xinzhi note search --keyword "<keyword>"
- For each matching note, apply tags:
xinzhi note set-tags --id "<id>" --tag-names "<tags>"
Find Notes by Author
- Find the author:
xinzhi author list --keyword "<name>"
- Extract
authorId from results
- List their notes:
xinzhi note list --author-id "<authorId>"
Search Subscription Articles
To find articles from a specific newsletter/subscription source:
- Search by source name with SUBSCRIBE type:
xinzhi note search --keyword "<source-name>" --type SUBSCRIBE --page-size 50
- Or use aggregate search:
xinzhi note aggregate-search --keyword "<source-name>" and check subscribeSearchResult
- Distinguish ownership:
oneself=true means user-created notes, oneself=false means subscription-sourced articles
Create a Document from Content
When the user provides long-form content or asks to save a document:
- Format content as markdown
- Use
$'...' quoting or "$(cat file.md)" for multi-line content
- Create:
xinzhi note create-document --title "<title>" --content "$content" --container-name "<container>"
Important Notes
- All output is JSON; parse it before presenting to the user
- Container and tag options support both
--*-id and --*-name (mutually exclusive)
- Tag names support hierarchy via
/ separator (e.g., "AI/Product")
- Note types for search
--type: ARTICLE (own links/documents), MEMO, HIGHLIGHT, SUBSCRIBE (newsletter articles)
oneself field in results: true = user-created, false = from subscriptions
aggregate-search returns separate result sets: articleSearchResult, memoSearchResult, highlightSearchResult, subscribeSearchResult
- Time fields for filtering: createTime, editTime, publishTime
- Sort fields: title, createTime, editTime, publishTime, readProgress
- For markdown content in shell, use
$'...' syntax or read from a file to handle newlines correctly
- Highlight and annotation commands require an existing note ID
- Highlight text must be an exact fragment from the original document