← 返回 Skills 市场
kxindot

Obsidian WSL

作者 kxindot · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
155
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install obsidian-wsl
功能描述
通过 notesmd-cli 操作 Obsidian 知识库 — 搜索、创建、编辑、移动、删除笔记及管理 frontmatter,无需 Obsidian 运行。
使用说明 (SKILL.md)

Obsidian WSL Skill

基于 notesmd-cli(v0.3.0+,原 obsidian-cli)操作 Obsidian 知识库。notesmd-cli 无需 Obsidian 运行即可工作,适合脚本、自动化和纯终端环境。

环境配置

知识库发现

notesmd-cli 通过 ~/.config/obsidian/obsidian.json 发现知识库。在有 Obsidian 桌面端的系统上会自动生成;在无头服务器或无 GUI 的环境中需手动创建:

{
  "vaults": {
    "my-brain": {
      "path": "/home/user/vaults/my-brain"
    }
  }
}
  • 键名可以是任意唯一 ID,CLI 使用目录名作为知识库名称
  • 路径必须为绝对路径,不支持 ~ 展开
  • 支持多个知识库:
{
  "vaults": {
    "personal": {
      "path": "/home/user/vaults/personal"
    },
    "work": {
      "path": "/home/user/vaults/work"
    }
  }
}

设置默认知识库

notesmd-cli set-default "my-brain"
notesmd-cli set-default --open-type editor

编辑器配置

无 Obsidian GUI 时,建议配置默认使用终端编辑器:

export EDITOR="vim"   # 或 code、nano 等
notesmd-cli set-default --open-type editor

所有支持 --open 的命令均可加 --editor(或 -e)在终端编辑器中打开。

常用命令速查

查看状态

notesmd-cli print-default              # 查看默认知识库名称和路径
notesmd-cli print-default --path-only  # 仅输出路径
notesmd-cli list-vaults                # 列出所有已注册知识库

搜索

notesmd-cli search                     # 交互式模糊搜索笔记名称
notesmd-cli search --editor            # 搜索并在编辑器中打开
notesmd-cli search-content "关键词"     # 搜索笔记内容
notesmd-cli search-content "关键词" --no-interactive  # 非交互,输出 grep 风格结果
notesmd-cli search-content "关键词" --format json      # JSON 输出,适合脚本

列出目录

notesmd-cli list                       # 列出知识库根目录
notesmd-cli list "子目录名"             # 列出子目录内容

读取笔记

notesmd-cli print "笔记名"             # 输出笔记内容
notesmd-cli print "路径/笔记名"         # 按路径输出

创建笔记

notesmd-cli create "笔记名"            # 创建空笔记
notesmd-cli create "文件夹/笔记名" --content "内容"  # 创建带内容的笔记
notesmd-cli create "笔记名" --content "内容" --append   # 追加内容
notesmd-cli create "笔记名" --content "内容" --overwrite  # 覆盖已有笔记
notesmd-cli create "笔记名" --content "内容" --open --editor  # 创建并在编辑器中打开

中间目录会自动创建。

移动/重命名

notesmd-cli move "旧路径" "新路径"      # 移动或重命名,自动更新知识库内所有链接
notesmd-cli move "旧路径" "新路径" --open --editor  # 移动后在编辑器中打开

删除

notesmd-cli delete "笔记路径"           # 删除笔记(谨慎使用)

Daily Notes

notesmd-cli daily                      # 创建/打开今日笔记
notesmd-cli daily --editor             # 在编辑器中打开

如果知识库中存在 .obsidian/daily-notes.json,CLI 会读取其中的 folder、format、template 配置。

Frontmatter 管理

notesmd-cli frontmatter "笔记名" --print                    # 查看 frontmatter
notesmd-cli frontmatter "笔记名" --edit --key "status" --value "done"  # 编辑字段
notesmd-cli frontmatter "笔记名" --delete --key "draft"     # 删除字段

直接操作文件系统

对于简单读写操作,直接操作知识库中的 .md 文件同样有效,Obsidian 会自动检测变更:

  • 读取:直接读取知识库中的 .md 文件
  • 编辑:直接修改文件
  • 注意:直接文件操作不会自动更新 wikilinks,如需重命名请使用 notesmd-cli move

排除文件

CLI 尊重 Obsidian 的排除设置(Settings -> Files & Links -> Excluded Files):

  • search:排除的笔记不出现在模糊搜索中
  • search-content:排除的文件夹不会被搜索
  • 其他命令(open、move、print、frontmatter)仍可访问排除的文件
安全使用建议
This skill is coherent with its stated purpose, but it performs direct reads/writes/deletes in your Obsidian vault(s). Before installing: (1) verify you trust the notesmd-cli Homebrew tap (yakitrak) — review the formula/source if possible; (2) back up your vault(s) (or test in a copy) because commands like create/overwrite/move/delete will modify files; (3) note that the skill expects a vault registry at ~/.config/obsidian/obsidian.json — create it carefully with absolute paths; (4) the skill itself doesn't request network credentials or exfiltrate data in its instructions, but any tool that can write files should be used cautiously. If you want extra assurance, inspect the notesmd-cli source or install notesmd-cli manually and run commands in a safe test vault first.
功能分析
Type: OpenClaw Skill Name: obsidian-wsl Version: 1.0.0 The skill provides a legitimate interface for managing Obsidian vaults using the 'notesmd-cli' tool. It includes standard installation steps via Homebrew (yakitrak/yakitrak/notesmd-cli) and documents common note-taking operations like searching, creating, and editing notes. No evidence of malicious intent, data exfiltration, or prompt injection was found in SKILL.md or _meta.json.
能力评估
Purpose & Capability
Name/description match the required binary (notesmd-cli). The skill is instruction-only and documents using notesmd-cli to search, create, edit, move, delete notes and manage frontmatter — exactly what the binary provides.
Instruction Scope
SKILL.md instructs the agent to read and modify files inside the user's vault(s) (e.g., .md files) and to create/modify ~/.config/obsidian/obsidian.json to register vaults. These filesystem actions are expected for this purpose but are material: the skill can overwrite/delete notes, so users should expect file writes and deletions.
Install Mechanism
Install uses a Homebrew formula (yakitrak/yakitrak/notesmd-cli). Brew formulas are a standard install mechanism, but this is a third-party tap (yakitrak) rather than the official Homebrew/core; that increases review burden compared with an official formula or a well-known project page.
Credentials
The skill declares no required environment variables or credentials. The SKILL.md suggests setting EDITOR for convenience, which is reasonable and optional. No unrelated secrets or external service credentials are requested.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request permanent elevated privileges or modify other skills' config. Autonomous invocation (disable-model-invocation false) is the normal platform default.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install obsidian-wsl
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /obsidian-wsl 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
基于内置 obsidian skill 改写,适配 notesmd-cli(原 obsidian-cli),支持 Linux/WSL2 纯终端环境操作 Obsidian 知识库
元数据
Slug obsidian-wsl
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Obsidian WSL 是什么?

通过 notesmd-cli 操作 Obsidian 知识库 — 搜索、创建、编辑、移动、删除笔记及管理 frontmatter,无需 Obsidian 运行。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 155 次。

如何安装 Obsidian WSL?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install obsidian-wsl」即可一键安装,无需额外配置。

Obsidian WSL 是免费的吗?

是的,Obsidian WSL 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Obsidian WSL 支持哪些平台?

Obsidian WSL 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Obsidian WSL?

由 kxindot(@kxindot)开发并维护,当前版本 v1.0.0。

💬 留言讨论