Agent skill

CLI Anything Siyuan

by HKUDS in HKUDS/CLI-Anything

SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.

Apache-2.0Auto-check passedKnowledge Management

Install CLI Anything Siyuan

skills CLI
$ npx skills add HKUDS/CLI-Anything --skill cli-anything-siyuan -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/CLI-Anything cli-anything-siyuan --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/CLI-Anything.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cli-anything-siyuan .claude/skills/cli-anything-siyuan && rm -rf skills-src

Use ~/.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/

Facts

Skill name
cli-anything-siyuan
GitHub stars
52k
Token cost
~875 tokens
SKILL.md length
293 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.

  • Tasks that involve Knowledge bases
  • SKILL.md covers Prerequisites, Command Groups, Agent Guidance and Examples, plus 1 more section
  • Calls pip; needs SIYUAN_TOKEN

What it does

CLI Anything Siyuan is an agent skill from HKUDS/CLI-Anything. SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.

Its SKILL.md is about 880 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: "CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Knowledge bases

Example prompts

  • “/cli-anything-siyuan”

Requirements

  • Python 3
  • A credential in SIYUAN_TOKEN

What it can do on your machine

Read from SKILL.md and the folder at commit 34f5195. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SIYUAN_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CLI Anything Siyuan loads about 875 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 293 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~875

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.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

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.

SKILL.md

The full file from HKUDS/CLI-Anything at commit 34f5195, republished under its Apache-2.0 licence (© HKUDS). 293 words, ~875 tokens.

Download SKILL.mdSave it as .claude/skills/cli-anything-siyuan/SKILL.md (or your agent's skills folder).
name
cli-anything-siyuan
description
SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.

cli-anything-siyuan

CLI harness for SiYuan (思源笔记), a local-first knowledge management and note-taking application.

This CLI connects to a running SiYuan kernel via its HTTP API (http://127.0.0.1:6806) and provides structured access to notebooks, documents, blocks, search, and export.

Prerequisites

  • SiYuan must be running (Settings → About shows the API token)
  • Python 3.10+
  • Install: pip install cli-anything-siyuan or pip install -e . from agent-harness/

Command Groups

notebook — Notebook management
SubcommandDescription
listList all notebooks
create <name>Create a new notebook
rename <id> <name>Rename a notebook
remove <id>Delete a notebook
open <id>Open a notebook
doc — Document management
SubcommandDescription
create <notebook> <path> [--md "content"]Create a document
list <notebook> [path]List documents
tree <notebook> [--path / --depth]Show doc tree
get <id>Get document path by ID
rename <id> <title>Rename a document
remove <id>Delete a document
block — Block operations
SubcommandDescription
insert <data> [--previous / --parent]Insert a block
update <id> <data>Update a block
delete <id>Delete a block
get <id>Get block kramdown source
children <id>Get child blocks
Other commands
CommandDescription
sql <stmt>Execute SQL on the block database
search <query>Full-text search across blocks
export md <doc-id>Export document as Markdown
tag listList all tags
versionShow SiYuan kernel version
statusShow connection and session status
replStart interactive REPL

Agent Guidance

  • Always use --json for machine-readable output
  • Power search: use sql "SELECT * FROM blocks WHERE content LIKE '%keyword%'" for SQL-level access
  • Document IDs look like 20210817205410-2kvfpfn (timestamp-based)
  • API token can be found in SiYuan Settings → About
  • Connection defaults: http://127.0.0.1:6806

Examples

bash
# List notebooks (JSON)
cli-anything-siyuan --json notebook list

# Create a document with Markdown (--md flag, watch shell escaping)
cli-anything-siyuan doc create nb1 /projects/new --md "## Title\n\nContent"

# Create a document — pipe Markdown via stdin (avoids shell escaping)
# PowerShell here-string (literal, no escaping needed):
@'
## Title
Content with `backticks` and (parentheses) and "quotes"
'@ | cli-anything-siyuan doc create nb1 /projects/new --md -

# Bash heredoc:
# cat <<'EOF' | cli-anything-siyuan doc create nb1 /projects/new --md -
# ## Title
# Content with `backticks` and (parentheses)
# EOF

# SQL search
cli-anything-siyuan sql "SELECT id, content FROM blocks WHERE content LIKE '%meeting%' LIMIT 5"

# Export
cli-anything-siyuan export md doc123

# Enter REPL
cli-anything-siyuan

Error Handling

  • Connection errors: check that SiYuan is running and the API token is correct
  • API errors: returned as {"code": N, "msg": "..."} — check the message field
  • Auth errors: verify the token in ~/.siyuan-cli.json or SIYUAN_TOKEN env var

© HKUDS, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cli-anything-siyuan of HKUDS/CLI-Anything.

Open the folder on GitHubat commit 34f5195

Compare with similar skills

CLI Anything 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.

CLI Anything Siyuan compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLI Anything Siyuan this skillHKUDS/CLI-Anything52k—~875Automated safety check: PassApache-2.0
SiyuanTommy-yw/RunbookHermes5463 repos~2.3kAutomated safety check: NotesMIT
Knowledge Searchdataelement/bisheng12k—~1.1kAutomated safety check: PassApache-2.0
Capture Conversationoutline/outline41k—~474Automated safety check: PassCustom licence
Find And Citeoutline/outline41k—~537Automated safety check: PassCustom licence
Xhs Virtual Productchenjin-cmd/xhs-virtual-product729—~862Automated safety check: PassMIT

Similar skills

  • Siyuan

    Tommy-yw/RunbookHermes

    SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.

    546 GitHub starsUsed in 3 repos~2.3k tokens
    Knowledge ManagementAuto-check: notes
  • Knowledge Search

    dataelement/bisheng

    Search the user's knowledge bases and knowledge spaces (企业知识库检索).

    12k GitHub stars~1.1k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Capture Conversation

    outline/outline

    Save the current conversation, a decision, or a set of notes as a document in an Outline collection; use when the user wants to keep what was discussed in their knowledge base.

    41k GitHub stars~474 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Find And Cite

    outline/outline

    Answer questions from the Outline knowledge base with quotes and links to the source documents; use when the user asks what the team knows, documented, or decided about a topic.

    41k GitHub stars~537 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Xhs Virtual Product

    chenjin-cmd/xhs-virtual-product

    This skill helps plan, select, produce, and market Xiaohongshu (RED) virtual/digital products — templates, knowledge bases, test tools, study materials.

    729 GitHub stars~862 tokensUpdated 10 days ago
    Knowledge ManagementAuto-check passed
  • Openkb

    VectifyAI/OpenKB

    A skill your agent uses when the user asks about content in their OpenKB knowledge base — research topics, concepts compiled from their documents, cross-document synthesis — or mentions openkb, an…

    4.8k GitHub starsUsed in 1 repo~2k tokens
    Knowledge ManagementAuto-check: warnings

More from HKUDS/CLI-Anything

All 78 skills in this repo
  • CLI-Anything for Codex

    HKUDS/CLI-Anything

    Lets Codex build, refine, test, validate and list CLI-Anything harnesses for GUI applications or source repositories, following the project's full methodology.

    52k GitHub stars~1.5k tokensUpdated 19 days ago
    Auto-check passed
  • CLI-Anything for Reasonix

    HKUDS/CLI-Anything

    Adapts the CLI-Anything methodology so Reasonix can build, refine, test and validate a command-line harness for an existing GUI application or source repository.

    52k GitHub stars~1.8k tokensUpdated 19 days ago
    Auto-check passed
  • Guides Hermes Agent through building, refining and testing a CLI-Anything harness that wraps a GUI application or source repository in a scriptable command line.

    52k GitHub stars~1.1k tokensUpdated 19 days ago
    Auto-check passed
  • Builds, refines, tests or validates a CLI-Anything harness that wraps a GUI application or source repository as a stateful Click CLI with JSON output and a REPL mode.

    52k GitHub stars~839 tokensUpdated 19 days ago
    Auto-check passed
  • Krita CLI Harness

    HKUDS/CLI-Anything

    Drives Krita from the command line to create projects, add layers, apply filters, resize the canvas and export images, with JSON output for agents.

    52k GitHub stars~931 tokensUpdated 19 days ago
    Auto-check passed
  • MacroCLI GUI Macros

    HKUDS/CLI-Anything

    Defines, lists, inspects and runs parameterized GUI macros from the command line, with the runtime choosing the execution backend.

    52k GitHub stars~1.4k tokensUpdated 19 days ago
    Auto-check passed

Works with

Questions about CLI Anything Siyuan

What does CLI Anything Siyuan do?

SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal. CLI Anything Siyuan is an agent skill from HKUDS/CLI-Anything. SiYuan (思源笔记) CLI — manage notebooks, documents, blocks, and search your knowledge base from the terminal.

When should I use CLI Anything Siyuan?

CLI Anything Siyuan fits situations like: tasks that involve Knowledge bases.

How do I install CLI Anything Siyuan in Claude Code?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-siyuan -a claude-code`. Or copy the skill folder (skills/cli-anything-siyuan in HKUDS/CLI-Anything) into .claude/skills/cli-anything-siyuan in your project. Claude Code loads it when a task matches its description.

How do I install CLI Anything Siyuan in Codex?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-siyuan -a codex`. Or copy the skill folder (skills/cli-anything-siyuan in HKUDS/CLI-Anything) into .agents/skills/cli-anything-siyuan in your project. Codex loads it when a task matches its description.

Can I use CLI Anything Siyuan in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/CLI-Anything --skill cli-anything-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/cli-anything-siyuan, .gemini/skills/cli-anything-siyuan, .github/skills/cli-anything-siyuan and .opencode/skills/cli-anything-siyuan in your project.

What does CLI Anything Siyuan need to run?

Going by SKILL.md and its folder, CLI Anything Siyuan needs the command-line tools its instructions call (pip) and credentials named SIYUAN_TOKEN. Our summary lists: Python 3; A credential in SIYUAN_TOKEN.

Does CLI Anything Siyuan access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is CLI Anything Siyuan safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CLI Anything Siyuan use?

CLI Anything Siyuan is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CLI Anything Siyuan use?

About 875 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CLI Anything Siyuan?

Skills that share tags, products or a category with CLI Anything Siyuan: Siyuan (Tommy-yw/RunbookHermes, 546 stars), Knowledge Search (dataelement/bisheng, 12k stars), Capture Conversation (outline/outline, 41k stars) and Find And Cite (outline/outline, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLI Anything Siyuan?

HKUDS (a GitHub organization) maintains it in HKUDS/CLI-Anything, which has 51,809 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on September 22, 2026.

Source: HKUDS/CLI-Anything on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.