CLI Anything Siyuan
HKUDS/CLI-Anything
SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.
SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.
$ npx skills add Tommy-yw/RunbookHermes --skill siyuan -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Tommy-yw/RunbookHermes siyuan --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Tommy-yw/RunbookHermes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/optional-skills/productivity/siyuan .claude/skills/siyuan && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "siyuan" agent skill from https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuan into .claude/skills/siyuan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "siyuan", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuanType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Tommy-yw/RunbookHermes --skill siyuan -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Tommy-yw/RunbookHermes siyuan --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Tommy-yw/RunbookHermes.git skills-src && mkdir -p .agents/skills && cp -r skills-src/optional-skills/productivity/siyuan .agents/skills/siyuan && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "siyuan" agent skill from https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuan into .agents/skills/siyuan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "siyuan", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Tommy-yw/RunbookHermes --skill siyuan -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Tommy-yw/RunbookHermes siyuan --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Tommy-yw/RunbookHermes.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/optional-skills/productivity/siyuan .cursor/skills/siyuan && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "siyuan" agent skill from https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuan into .cursor/skills/siyuan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "siyuan", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Tommy-yw/RunbookHermes.git --path optional-skills/productivity/siyuan--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Tommy-yw/RunbookHermes --skill siyuan -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Tommy-yw/RunbookHermes siyuan --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Tommy-yw/RunbookHermes.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/optional-skills/productivity/siyuan .gemini/skills/siyuan && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "siyuan" agent skill from https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuan into .gemini/skills/siyuan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "siyuan", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Tommy-yw/RunbookHermes siyuanInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Tommy-yw/RunbookHermes --skill siyuan -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Tommy-yw/RunbookHermes.git skills-src && mkdir -p .github/skills && cp -r skills-src/optional-skills/productivity/siyuan .github/skills/siyuan && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "siyuan" agent skill from https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuan into .github/skills/siyuan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "siyuan", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Tommy-yw/RunbookHermes --skill siyuan -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Tommy-yw/RunbookHermes siyuan --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Tommy-yw/RunbookHermes.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/optional-skills/productivity/siyuan .opencode/skills/siyuan && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "siyuan" agent skill from https://github.com/Tommy-yw/RunbookHermes/tree/main/optional-skills/productivity/siyuan into .opencode/skills/siyuan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "siyuan", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
siyuanSiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.
Siyuan is an agent skill from Tommy-yw/RunbookHermes. SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Knowledge Management, covering Knowledge bases. It works with SQL. The repository describes itself as: Hermes-native AIOps agent for evidence-driven incident response, approval-gated remediation, and runbook learning. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 7fd2b9a. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
curljqFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
SIYUAN_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Siyuan loads about 2.3k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 441 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
3. Store it in `~/.hermes/.env`:Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Tommy-yw/RunbookHermes at commit 7fd2b9a, republished under its MIT licence (© Tommy-yw). 441 words, ~2,315 tokens.
.claude/skills/siyuan/SKILL.md (or your agent's skills folder).Use the SiYuan kernel API via curl to search, read, create, update, and delete blocks and documents in a self-hosted knowledge base. No extra tools needed -- just curl and an API token.
~/.hermes/.env:SIYUAN_TOKEN=your_token_here
SIYUAN_URL=http://127.0.0.1:6806SIYUAN_URL defaults to http://127.0.0.1:6806 if not set.All SiYuan API calls are POST with JSON body. Every request follows this pattern:
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/..." \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"param": "value"}'Responses are JSON with this structure:
{"code": 0, "msg": "", "data": { ... }}code: 0 means success. Any other value is an error -- check msg for details.
ID format: SiYuan IDs look like 20210808180117-6v0mkxr (14-digit timestamp + 7 alphanumeric chars).
| Operation | Endpoint |
|---|---|
| Full-text search | /api/search/fullTextSearchBlock |
| SQL query | /api/query/sql |
| Read block | /api/block/getBlockKramdown |
| Read children | /api/block/getChildBlocks |
| Get path | /api/filetree/getHPathByID |
| Get attributes | /api/attr/getBlockAttrs |
| List notebooks | /api/notebook/lsNotebooks |
| List documents | /api/filetree/listDocsByPath |
| Create notebook | /api/notebook/createNotebook |
| Create document | /api/filetree/createDocWithMd |
| Append block | /api/block/appendBlock |
| Update block | /api/block/updateBlock |
| Rename document | /api/filetree/renameDocByID |
| Set attributes | /api/attr/setBlockAttrs |
| Delete block | /api/block/deleteBlock |
| Delete document | /api/filetree/removeDocByID |
| Export as Markdown | /api/export/exportMdContent |
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/search/fullTextSearchBlock" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "meeting notes", "page": 0}' | jq '.data.blocks[:5]'Query the blocks database directly. Only SELECT statements are safe.
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/query/sql" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"stmt": "SELECT id, content, type, box FROM blocks WHERE content LIKE '\''%keyword%'\'' AND type='\''p'\'' LIMIT 20"}' | jq '.data'Useful columns: id, parent_id, root_id, box (notebook ID), path, content, type, subtype, created, updated.
Returns block content in Kramdown (Markdown-like) format.
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/block/getBlockKramdown" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "20210808180117-6v0mkxr"}' | jq '.data.kramdown'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/block/getChildBlocks" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "20210808180117-6v0mkxr"}' | jq '.data'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/filetree/getHPathByID" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "20210808180117-6v0mkxr"}' | jq '.data'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/attr/getBlockAttrs" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "20210808180117-6v0mkxr"}' | jq '.data'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/notebook/lsNotebooks" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{}' | jq '.data.notebooks[] | {id, name, closed}'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/filetree/listDocsByPath" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"notebook": "NOTEBOOK_ID", "path": "/"}' | jq '.data.files[] | {id, name}'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/filetree/createDocWithMd" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"notebook": "NOTEBOOK_ID",
"path": "/Meeting Notes/2026-03-22",
"markdown": "# Meeting Notes\n\n- Discussed project timeline\n- Assigned tasks"
}' | jq '.data'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/notebook/createNotebook" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My New Notebook"}' | jq '.data.notebook.id'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/block/appendBlock" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"parentID": "DOCUMENT_OR_BLOCK_ID",
"data": "New paragraph added at the end.",
"dataType": "markdown"
}' | jq '.data'Also available: /api/block/prependBlock (same params, inserts at the beginning) and /api/block/insertBlock (uses previousID instead of parentID to insert after a specific block).
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/block/updateBlock" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "BLOCK_ID",
"data": "Updated content here.",
"dataType": "markdown"
}' | jq '.data'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/filetree/renameDocByID" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "DOCUMENT_ID", "title": "New Title"}'Custom attributes must be prefixed with custom-:
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/attr/setBlockAttrs" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "BLOCK_ID",
"attrs": {
"custom-status": "reviewed",
"custom-priority": "high"
}
}'curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/block/deleteBlock" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "BLOCK_ID"}'To delete a whole document: use /api/filetree/removeDocByID with {"id": "DOC_ID"}.
To delete a notebook: use /api/notebook/removeNotebook with {"notebook": "NOTEBOOK_ID"}.
curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/export/exportMdContent" \
-H "Authorization: Token $SIYUAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "DOCUMENT_ID"}' | jq -r '.data.content'Common type values in SQL queries:
| Type | Description |
|---|---|
d | Document (root block) |
p | Paragraph |
h | Heading |
l | List |
i | List item |
c | Code block |
m | Math block |
t | Table |
b | Blockquote |
s | Super block |
html | HTML block |
YYYYMMDDHHmmss-xxxxxxx. Reject anything else.code != 0 in responses before processing data.LIMIT in SQL and pipe through jq to extract only what you need.lsNotebooks.If you prefer a native integration instead of curl, install the SiYuan MCP server:
# In ~/.hermes/config.yaml under mcp_servers:
mcp_servers:
siyuan:
command: npx
args: ["-y", "@porkll/siyuan-mcp"]
env:
SIYUAN_TOKEN: "your_token"
SIYUAN_URL: "http://127.0.0.1:6806"© Tommy-yw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in optional-skills/productivity/siyuan of Tommy-yw/RunbookHermes.
Open the folder on GitHubat commit 7fd2b9a
We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in Tommy-yw/RunbookHermes, which our catalogue first saw on October 7, 2026.
Siyuan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Siyuan this skillTommy-yw/RunbookHermes | 546 | 3 repos | ~2.3k | Automated safety check: Notes | MIT | |
| CLI Anything SiyuanHKUDS/CLI-Anything | 52k | — | ~875 | Automated safety check: Pass | Apache-2.0 | |
| Ima Knowledge Basecountbot-ai/CountBot | 784 | — | ~506 | Automated safety check: Pass | MIT | |
| HypatiaMarchLiu/hypatia | 239 | — | ~7.9k | Automated safety check: Notes | MIT | |
| Migrateguhcostan/claude-mega-brain | 126 | — | ~975 | Automated safety check: Pass | MIT | |
| Psr Autoloading Knowledgedykyi-roman/awesome-claude-code | 104 | — | ~2.1k | Automated safety check: Pass | MIT |
HKUDS/CLI-Anything
SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.
countbot-ai/CountBot
通过 IMA OpenAPI 处理知识库任务。支持知识库内容搜索、命中详情查看、条目浏览、列出知识库、上传文件、导入网页。用户提到知识库、资料库、上传到知识库、导入网页、搜知识库时使用。
MarchLiu/hypatia
Interact with the Hypatia AI memory system using natural language.
guhcostan/claude-mega-brain
Scan the project and migrate existing documentation into OKF format.
dykyi-roman/awesome-claude-code
PSR-4 autoloading standard knowledge base for PHP 8.4 projects.
dykyi-roman/awesome-claude-code
PHP Standards Recommendations (PSR) overview knowledge base.
Tommy-yw/RunbookHermes
Build, test, inspect, install, and deploy MCP servers with FastMCP in Python.
Tommy-yw/RunbookHermes
Pharmaceutical research assistant for drug discovery workflows.
Tommy-yw/RunbookHermes
Fetch YouTube video transcripts and transform them into structured content (chapters, summaries, threads, blog posts).
Tommy-yw/RunbookHermes
Supply chain investigation, evidence recovery, and forensic analysis for GitHub repositories.
Tommy-yw/RunbookHermes
Production pipeline for interactive and generative visual art using p5.js.
Tommy-yw/RunbookHermes
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals.
Works with
Categories
SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl. Siyuan is an agent skill from Tommy-yw/RunbookHermes. SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.
Siyuan fits situations like: tasks that involve Knowledge bases.
Run `npx skills add Tommy-yw/RunbookHermes --skill siyuan -a claude-code`. Or copy the skill folder (optional-skills/productivity/siyuan in Tommy-yw/RunbookHermes) into .claude/skills/siyuan in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Tommy-yw/RunbookHermes --skill siyuan -a codex`. Or copy the skill folder (optional-skills/productivity/siyuan in Tommy-yw/RunbookHermes) into .agents/skills/siyuan in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Tommy-yw/RunbookHermes --skill siyuan -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/siyuan, .gemini/skills/siyuan, .github/skills/siyuan and .opencode/skills/siyuan in your project.
Going by SKILL.md and its folder, Siyuan needs the command-line tools its instructions call (curl and jq) and credentials named SIYUAN_TOKEN. Our summary lists: Node.js; Docker; A credential in SIYUAN_TOKEN.
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Siyuan is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Siyuan: CLI Anything Siyuan (HKUDS/CLI-Anything, 52k stars), Ima Knowledge Base (countbot-ai/CountBot, 784 stars), Hypatia (MarchLiu/hypatia, 239 stars) and Migrate (guhcostan/claude-mega-brain, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Tommy-yw (a GitHub user) maintains it in Tommy-yw/RunbookHermes, which has 546 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on May 18, 2026.
Source: Tommy-yw/RunbookHermes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.