Communitygithub.com

cli-anything-siyuan

SiYuan(思源笔记)CLI — ノートブック、ドキュメント、ブロックを管理し、ターミナルから知識ベースを検索します。

cli-anything-siyuan とは?

cli-anything-siyuan は、ローカルファーストのナレッジ管理・ノート作成アプリケーション「思源笔记(SiYuan)」向けのCLIツールです。HTTP API(デフォルト http://127.0.0.1:6806)を介して動作中のSiYuanカーネルに接続し、ノートブックやドキュメント、ブロックの管理、全文検索、エクスポート機能を提供します。Python 3.10以上が必要で、pipコマンドでインストール可能です。このツールは開発者やパワーユーザーがターミナルから直接ノートベースを操作できるようにし、ジョブの自動化やスクリプト統合を容易にします。SQLによるブロックデータベースへの直接クエリやJSON出力(--jsonフラグ)にも対応しており、機械可読なデータ処理が可能です。エラー処理では接続エラーやAPIエラー、認証エラーを詳細に報告し、APIトークンは設定ファイルまたは環境変数で設定します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-siyuan

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

cli-anything-siyuan は何をしますか?

SiYuan(思源笔记) 用CLIハーネス。ローカライズされたナレッジ管理・ノート作成アプリケーションです。

このCLIは、動作中のSiYuanカーネルにHTTP API(http://127.0.0.1:6806)を介して接続し、ノートブック、ドキュメント、ブロック、検索、エクスポートへの構造化アクセスを提供します。

前提条件

  • SiYuanが実行中であること(設定 → バージョン情報にAPIトークンが表示されます)
  • Python 3.10以上
  • インストール: pip install cli-anything-siyuan または agent-harness/ から pip install -e .

コマンドグループ

notebook — ノートブック管理

サブコマンド説明
listすべてのノートブックを一覧表示
create <name>新しいノートブックを作成
rename <id> <name>ノートブックの名前を変更
remove <id>ノートブックを削除
open <id>ノートブックを開く

doc — ドキュメント管理

サブコマンド説明
create <notebook> <path> [--md "content"]ドキュメントを作成
list <notebook> [path]ドキュメントを一覧表示
tree <notebook> [--path / --depth]ドキュメントツリーを表示
get <id>ドキュメントのパスをIDから取得
rename <id> <title>ドキュメントのタイトルを変更
remove <id>ドキュメントを削除

block — ブロック操作

サブコマンド説明
insert <data> [--previous / --parent]ブロックを挿入
update <id> <data>ブロックを更新
delete <id>ブロックを削除
get <id>ブロックのkramdownソースを取得
children <id>子ブロックを取得

その他のコマンド

コマンド説明
sql <stmt>ブロックデータベースにSQLを実行
search <query>ブロック全体の全文検索
export md <doc-id>ドキュメントをMarkdownとしてエクスポート
tag list全てのタグを一覧表示
versionSiYuanカーネルのバージョンを表示
status接続とセッションの状態を表示
repl対話型REPLを開始

エージェント向けガイダンス

  • 機械可読な出力には常に --json を使用してください
  • パワー検索: SQLレベルでアクセスするには sql "SELECT * FROM blocks WHERE content LIKE '%キーワード%'" を使用
  • ドキュメントIDは 20210817205410-2kvfpfn のようなタイムスタンプベースです
  • APIトークンはSiYuanの設定 → バージョン情報で確認できます
  • 接続のデフォルト: http://127.0.0.1:6806

使用例

# ノートブックの一覧表示(JSON)
cli-anything-siyuan --json notebook list

# Markdown付きでドキュメントを作成(--mdフラグ、シェルエスケープに注意)
cli-anything-siyuan doc create nb1 /projects/new --md "## タイトル\n\n内容"

# ドキュメント作成 — Markdownを標準入力からパイプする(シェルエスケープを回避)
# PowerShell here-string(リテラル、エスケープ不要):
@'
## タイトル
`バッククオート`と(括弧)と"引用符"を含む内容
'@ | cli-anything-siyuan doc create nb1 /projects/new --md -

# Bash heredoc:
# cat <<'EOF' | cli-anything-siyuan doc create nb1 /projects/new --md -
# ## タイトル
# `バッククオート`と(括弧)を含む内容
# EOF

# SQL検索
cli-anything-siyuan sql "SELECT id, content FROM blocks WHERE content LIKE '%ミーティング%' LIMIT 5"

# エクスポート
cli-anything-siyuan export md doc123

# REPLを起動
cli-anything-siyuan

エラー処理

  • 接続エラー: SiYuanが実行中であり、APIトークンが正しいことを確認してください
  • APIエラー: {"code": N, "msg": "..."} として返されます — メッセージフィールドを確認してください
  • 認証エラー: ~/.siyuan-cli.json のトークンまたは SIYUAN_TOKEN 環境変数を確認してください

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

関連スキル