← Back to Skills Marketplace
paudyyin

Obsidian笔记CLI

by paudyyin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
55
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install obsidian-cli-cn
Description
Obsidian笔记命令行工具,支持笔记搜索、批量处理、统计分析、导出转换、标签管理等功能,直接操作本地Obsidian知识库。
README (SKILL.md)

Obsidian Notesmd CLI 命令行工具

直接操作本地Obsidian知识库(Vault),无需打开Obsidian客户端即可完成批量操作、统计分析、内容搜索等功能。

核心功能

1. 笔记搜索

支持全文搜索、标题搜索、标签搜索、按日期范围筛选:

  • 支持关键词高亮
  • 支持正则表达式搜索
  • 搜索结果按相关度排序

2. 知识库统计

自动生成知识库统计报告:

  • 总笔记数量、总字数、总附件大小
  • 标签数量、标签使用频率排名
  • 近7/30/90天新增笔记数量
  • 文件类型分布统计

3. 批量操作

  • 批量替换所有笔记中的指定文本
  • 批量给符合条件的笔记添加/删除标签
  • 批量导出笔记到指定目录
  • 批量清理空笔记、重复笔记

4. 链接管理

  • 提取所有笔记的双向链接关系
  • 检测孤立笔记(没有任何入链出链的笔记)
  • 检测死链(指向不存在的笔记的链接)
  • 导出链接关系数据用于生成关系图谱

使用方法

基础命令

# 搜索笔记
obsidian-cli search "关键词" --vault "你的知识库路径"

# 生成知识库统计报告
obsidian-cli stats --vault "你的知识库路径"

# 批量替换内容
obsidian-cli replace "旧文本" "新文本" --vault "你的知识库路径"

# 导出所有笔记
obsidian-cli export --output "导出目录路径" --format markdown

# 检测死链
obsidian-cli check-links --vault "你的知识库路径"

常用参数

参数 说明 必填
--vault Obsidian知识库根目录路径
--output 导出结果保存路径
--format 导出格式:markdown/html/txt/json 默认markdown
--case-sensitive 搜索/替换是否区分大小写 默认不区分
--regex 是否启用正则表达式匹配 默认不启用
--include-attachments 导出时是否包含附件 默认不包含

示例

# 统计我的知识库信息
obsidian-cli stats --vault "D:\我的知识库"

# 搜索所有包含"AI大模型"的笔记
obsidian-cli search "AI大模型" --vault "D:\我的知识库"

# 把所有笔记中的"GPT-4"替换为"GPT-4o"
obsidian-cli replace "GPT-4" "GPT-4o" --vault "D:\我的知识库" --case-sensitive

# 导出所有带"工作"标签的笔记
obsidian-cli export --vault "D:\我的知识库" --tag "工作" --output "D:\导出的工作笔记"
Usage Guidance
Review this skill before installation if you may let an agent act on your notes. It appears local-only and purpose-aligned, but back up your Obsidian vault and require explicit approval before using the replace command or any other operation that writes to many notes.
Capability Assessment
Purpose & Capability
The stated purpose matches the code: it searches, summarizes, exports, checks links, and modifies local Obsidian Markdown files. Users should note that this necessarily reads private vault content.
Instruction Scope
The replace workflow applies a user-supplied pattern across all Markdown files under the chosen vault and overwrites files in place, with no confirmation, dry-run, backup, or rollback guidance.
Install Mechanism
No install script, dependency download, shell bootstrap, or network-based installation is shown; the reviewed runnable artifact is a single Python file.
Credentials
Recursive local vault access is proportionate for an Obsidian CLI, but users should choose the vault path carefully because the script processes every .md file below it, excluding hidden directories.
Persistence & Privilege
The artifacts show no credentials, background service, persistence mechanism, privilege escalation, external network calls, or continued operation after a command finishes.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install obsidian-cli-cn
  3. After installation, invoke the skill by name or use /obsidian-cli-cn
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Obsidian笔记搜索/批量处理/统计分析/导出转换
Metadata
Slug obsidian-cli-cn
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Obsidian笔记CLI?

Obsidian笔记命令行工具,支持笔记搜索、批量处理、统计分析、导出转换、标签管理等功能,直接操作本地Obsidian知识库。 It is an AI Agent Skill for Claude Code / OpenClaw, with 55 downloads so far.

How do I install Obsidian笔记CLI?

Run "/install obsidian-cli-cn" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Obsidian笔记CLI free?

Yes, Obsidian笔记CLI is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Obsidian笔记CLI support?

Obsidian笔记CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Obsidian笔记CLI?

It is built and maintained by paudyyin (@paudyyin); the current version is v1.0.0.

💬 Comments