본문으로 건너뛰기
Skillpedia
글쓰기58k · #3247

cli-anything-siyuan

하는 일

이 스킬은 AI 에이전트가 지식 베이스를 만드는 로컬 메모 앱 SiYuan을 다루도록 합니다. SiYuan에 노트를 보관하고 에이전트가 정리와 검색을 도와주기를 원하는 사람에게 맞습니다.

사용하는 경우

  • ✓SiYuan에서 새 노트북이나 새 문서를 만들고 싶을 때.
  • ✓지식 베이스 전체에서 한 주제에 관한 노트를 검색해야 할 때.
  • ✓기존 문서에 있는 텍스트 블록을 바꾸거나 추가하고 싶을 때.

스킬 링크

https://github.com/HKUDS/CLI-Anything/blob/main/siyuan/agent-harness/cli_anything/siyuan/skills/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/CLI-Anything/blob/main/siyuan/agent-harness/cli_anything/siyuan/skills/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“SiYuan 노트에서 봄 프로젝트에 관한 내용을 검색하고, 요약을 새 문서로 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 API 토큰을 사용해 컴퓨터의 SiYuan 앱에 로컬 API로 연결합니다. 노트북, 문서, 블록을 읽고 씁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

Subcommand Description
list List 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

Subcommand Description
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

Subcommand Description
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

Command Description
sql <stmt> Execute SQL on the block database
search <query> Full-text search across blocks
export md <doc-id> Export document as Markdown
tag list List all tags
version Show SiYuan kernel version
status Show connection and session status
repl Start 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

# 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
자주 묻는 질문

SiYuan이 실행 중이어야 하나요?

네. SiYuan 커널이 실행 중이어야 하며, API 토큰은 설정의 About 항목에서 찾을 수 있습니다.

노트를 내보낼 수 있나요?

네. 문서를 내보내는 옵션이 포함되어 있습니다.

노트를 삭제할 수 있나요?

네. 노트북과 문서를 제거하는 명령이 있으니 신중하게 사용해야 합니다.

상세 정보

작성자의 원본 설명

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

repo: HKUDS/CLI-Anything

인기도

GitHub 스타
58k
순위
#3247
라이선스
Apache-2.0
업데이트
2026. 9. 21.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬