Artur

Obsidian CLI

知识管理v2.0.0
作者:Artur更新于 2026-05-17共 3 个版本 · 最新版本发布于 2026-02-15obsidian-cli@clawhub_adolago/obsidian-cli
资料整理信息检索笔记整理#CLI#Obsidian#Notes#Vault#Sync

据 AlphaMoat 统计,截至 2026-10,Obsidian CLI 累计下载 19,631 次、获 11 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 1,433 位,在「知识管理」分类(745 个)中排名第 90 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
2.0万
星标
11
全站下载量排名
#1,433
全站前 14% · 「知识管理」前 13%
平台累计下载星标评论
ClawHub ↗6,2099-
SkillHub ↗2.0万11—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

需要启用 CLI 并在 PATH 可用,通过 IPC 通信。示例涵盖笔记、搜索、任务、属性、链接、模板及工作区、同步、发布和开发操作。应确认库与准确路径,先做限定只读查询;破坏性、发布、同步、插件主题、受限模式、JavaScript 与原始 CDP 动作需显式批准。

资料发布于 2026-10-27

可以用来做什么

  • 检查库并准备范围明确的笔记操作

什么时候用

  • 已授权本地 Obsidian 库需要 CLI 指导时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

确认库和路径,先检查相关笔记,再说明拟变更及所需批准。

月度数据趋势

累计下载2.0万
1,5891.1万2.1万2026-03 · 累计下载 2,9252026-05 · 累计下载 4,7722026-06 · 累计下载 5,3842026-07 · 累计下载 6,1752026-08 · 累计下载 7,3392026-09 · 累计下载 9,7662026-10 · 累计下载 2.0万26-0326-0926-10
星标11
69112026-03 · 星标 62026-05 · 星标 72026-06 · 星标 92026-07 · 星标 112026-08 · 星标 112026-09 · 星标 112026-10 · 星标 1126-0326-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。 该技能有同名的其他版本,调整前的数据归属当前下载量最大的这一个。

月份累计下载环比星标
2026-102.0万—11
2026-099,766—11
2026-087,339+18.9%11
2026-076,175+14.7%11
2026-065,384+12.8%9
2026-054,772—7
2026-032,925—6

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

20 KB · ClawHub v2.0.0
---
name: obsidian-cli
description: Skill for the official Obsidian CLI (v1.12+). Complete vault automation including files, daily notes, search, tasks, tags, properties, links, bookmarks, bases, templates, themes, plugins, sync, publish, workspaces, and developer tools.
version: 2.0.0
author: adolago
tags:
  - obsidian
  - cli
  - notes
  - automation
展开全部(共 442 行)
  - vault
triggers:
  - obsidian
  - vault
  - daily note
  - obsidian cli
---

# Obsidian CLI (Official, v1.12+)

The official Obsidian CLI connects to a running Obsidian instance via IPC.
Requires Obsidian 1.12+ with CLI enabled in Settings > General.

## Prerequisites

- **Obsidian 1.12+** installed and running
- CLI enabled: Settings > General > Enable CLI
- The `obsidian` binary must be in your PATH

**Important**: Obsidian must be running for CLI commands to work. The CLI communicates
with the running instance via IPC.

### Platform Notes

- **macOS/Windows**: The Obsidian installer typically places the CLI binary in PATH automatically.
- **Linux**: You may need a wrapper script to avoid Electron flag injection that breaks CLI arg parsing. Ensure your wrapper is in PATH before the system `obsidian` binary. If running as a service, ensure `PrivateTmp=false` for IPC to work.

## Complete Command Reference

### Basics

```bash
obsidian version                            # Show Obsidian version
obsidian help                               # List all available commands
obsidian vault                              # Show vault info (name, path, files, size)
obsidian vault info=name                    # Just vault name
obsidian vault info=path                    # Just vault path
obsidian reload                             # Reload the vault
obsidian restart                            # Restart the app
```

### Daily Notes

```bash
obsidian daily                              # Open today's daily note
obsidian daily silent                       # Open without focusing
obsidian daily:read                         # Read daily note contents
obsidian daily:append content="- [ ] Task"  # Append to daily note
obsidian daily:prepend content="# Header"   # Prepend to daily note
obsidian daily paneType=tab                 # Open in new tab (tab|split|window)
```

### Files

```bash
obsidian read file=Recipe                   # Read by name (wikilink resolution)
obsidian read path="Work/notes.md"          # Read by exact path
obsidian file file=Recipe                   # Show file info (path, size, dates)
obsidian create name=Note content="Hello"   # Create a new note
obsidian create name=Note template=Travel   # Create from template
obsidian create path="Work/note.md" content="text"  # Create at exact path
obsidian create name=Note overwrite         # Overwrite if exists
obsidian create name=Note silent newtab     # Create silently in new tab
obsidian open file=Recipe                   # Open in Obsidian
obsidian open file=Recipe newtab            # Open in new tab
obsidian delete file=Old                    # Delete (to trash)
obsidian delete file=Old permanent          # Delete permanently
obsidian move file=Old to="Archive/Old.md"  # Move/rename (include .md in target)
obsidian append file=Log content="Entry"    # Append to file
obsidian append file=Log content="text" inline  # Append inline (no newline)
obsidian prepend file=Log content="Header"  # Prepend to file
obsidian unique name="Meeting" content="notes"  # Create note with unique timestamp
obsidian wordcount file=Note                # Word and character count
obsidian wordcount file=Note words          # Words only
obsidian wordcount file=Note characters     # Characters only
obsidian random                             # Open a random note
obsidian random:read                        # Read a random note
obsidian random folder="Work"               # Random note from folder
obsidian recents                            # List recently opened files
obsidian recents total                      # Count of recent files
```

### Search

```bash
obsidian search query="meeting notes"               # Search vault
obsidian search query="TODO" matches                 # Show match context
obsidian search query="project" path="Work" limit=10 # Scoped search
obsidian search query="test" format=json             # JSON output
obsidian search query="Bug" case                     # Case-sensitive search
obsidian search query="error" total                  # Count matches only
obsidian search:open query="TODO"                    # Open search view in Obsidian
```

### Tasks

```bash
obsidian tasks daily                        # Tasks from daily note
obsidian tasks daily todo                   # Incomplete daily tasks
obsidian tasks daily done                   # Completed daily tasks
obsidian tasks all todo                     # All incomplete tasks in vault
obsidian tasks file=Recipe done             # Completed tasks in file
obsidian tasks verbose                      # Tasks with file paths + line numbers
obsidian tasks total                        # Count of tasks
obsidian tasks status="/"                   # Tasks with custom status character
obsidian task daily line=3 toggle           # Toggle task completion
obsidian task daily line=3 done             # Mark task done
obsidian task daily line=3 todo             # Mark task incomplete
obsidian task ref="Work/todo.md:5" toggle   # Toggle by file:line reference
obsidian task daily line=3 status="/"       # Set custom status
```

### Tags & Properties

```bash
# Tags
obsidian tags all counts                    # All tags with counts
obsidian tags all counts sort=count         # Sorted by frequency
obsidian tags file=Note                     # Tags in specific file
obsidian tags total                         # Total tag count
obsidian tag name=project verbose           # Tag details with file list
obsidian tag name=project total             # Count of files with tag

# Properties (frontmatter)
obsidian properties all counts              # All properties with counts
obsidian properties all counts sort=count   # Sorted by frequency
obsidian properties file=Note               # Properties of specific file
obsidian properties name=status             # Files with specific property
obsidian properties format=yaml             # YAML output
obsidian properties format=tsv              # TSV output
obsidian property:read name=status file=Note       # Read a property value
obsidian property:set name=status value=done file=Note  # Set a property
obsidian property:set name=due value="2026-03-01" type=date file=Note  # Set with type
obsidian property:remove name=status file=Note     # Remove a property

# Aliases
obsidian aliases                            # List all aliases in vault
obsidian aliases all                        # Include files without aliases
obsidian aliases file=Note                  # Aliases for specific file
obsidian aliases total                      # Count of aliases
obsidian aliases verbose                    # With file paths
```

### Links & Structure

```bash
obsidian backlinks file=Note                # Files linking to Note
obsidian backlinks file=Note counts         # With link counts
obsidian backlinks file=Note total          # Count of backlinks
obsidian links file=Note                    # Outgoing links from Note
obsidian links file=Note total              # Count of outgoing links
obsidian orphans                            # Files with no incoming links
obsidian orphans total                      # Count of orphans
obsidian orphans all                        # Include non-markdown files
obsidian deadends                           # Files with no outgoing links
obsidian deadends total                     # Count of deadends
obsidian unresolved                         # Broken/unresolved links
obsidian unresolved total                   # Count of unresolved
obsidian unresolved counts                  # With reference counts
obsidian unresolved verbose                 # With source file details
obsidian outline file=Note                  # Headings tree
obsidian outline file=Note format=md        # Headings as markdown
obsidian outline file=Note total            # Count of headings
```

### Vault Info

```bash
obsidian files total                        # File count
obsidian files folder="Work" ext=md         # Filter by folder and extension
obsidian folders                            # List all folders
obsidian folders total                      # Folder count
obsidian folders folder="Work"              # Subfolders of path
obsidian folder path="Work" info=size       # Folder size in bytes
obsidian folder path="Work" info=files      # File count in folder
obsidian folder path="Work" info=folders    # Subfolder count
```

### Bookmarks

```bash
obsidian bookmarks                          # List all bookmarks
obsidian bookmarks total                    # Count of bookmarks
obsidian bookmarks verbose                  # With details
obsidian bookmark file="Work/note.md"       # Bookmark a file
obsidian bookmark file="note.md" subpath="#heading"  # Bookmark a heading
obsidian bookmark folder="Work"             # Bookmark a folder
obsidian bookmark search="TODO"             # Bookmark a search query
obsidian bookmark url="https://example.com" title="Example"  # Bookmark a URL
```

### Bases (Database Views)

```bash
obsidian bases                              # List all base files
obsidian base:views                         # List views in current base
obsidian base:query file=MyBase             # Query base, default format
obsidian base:query file=MyBase format=json # JSON output
obsidian base:query file=MyBase format=csv  # CSV output
obsidian base:query file=MyBase format=tsv  # TSV output
obsidian base:query file=MyBase format=md   # Markdown table
obsidian base:query file=MyBase format=paths  # Just file paths
obsidian base:query file=MyBase view="View Name"  # Query specific view
obsidian base:create name="New Item"        # Create item in current base view
obsidian base:create content="text" silent  # Create silently
```

### Templates

```bash
obsidian templates                          # List available templates
obsidian templates total                    # Count of templates
obsidian template:read name=Daily           # Read template content
obsidian template:read name=Daily resolve   # Read with variables resolved
obsidian template:read name=Daily resolve title="My Note"  # Resolve with title
obsidian template:insert name=Daily         # Insert template into active file
```

### Commands & Hotkeys

```bash
obsidian commands                           # List all command IDs
obsidian commands filter="editor"           # Filter by prefix
obsidian command id=app:open-settings       # Execute a command
obsidian hotkeys                            # List assigned hotkeys
obsidian hotkeys all                        # Include unassigned
obsidian hotkeys total                      # Count of hotkeys
obsidian hotkeys verbose                    # With command details
obsidian hotkey id=app:open-settings        # Hotkey for specific command
obsidian hotkey id=app:open-settings verbose # With full details
```

### Tabs & Workspaces

```bash
# Tabs
obsidian tabs                               # List open tabs
obsidian tabs ids                           # With tab IDs
obsidian tab:open                           # Open new empty tab
obsidian tab:open file="Work/note.md"       # Open file in new tab
obsidian tab:open group=2                   # Open in specific tab group

# Workspaces
obsidian workspaces                         # List saved workspaces
obsidian workspaces total                   # Count of workspaces
obsidian workspace                          # Show current workspace tree
obsidian workspace ids                      # With element IDs
obsidian workspace:save name="coding"       # Save current layout
obsidian workspace:load name="coding"       # Load saved workspace
obsidian workspace:delete name="old"        # Delete saved workspace
```

### History & Diff (File Recovery)

```bash
obsidian history file=Note                  # List version history for file
obsidian history:list                       # List all files with history
obsidian history:read file=Note             # Read latest history version
obsidian history:read file=Note version=3   # Read specific version
obsidian history:restore file=Note version=3  # Restore a version
obsidian history:open file=Note             # Open file recovery UI
obsidian diff file=Note                     # List/diff local versions
obsidian diff file=Note from=1 to=3         # Diff between versions
obsidian diff file=Note filter=local        # Local versions only
obsidian diff file=Note filter=sync         # Sync versions only
```

### Sync (Obsidian Sync)

```bash
obsidian sync:status                        # Show sync status
obsidian sync on                            # Resume sync
obsidian sync off                           # Pause sync
obsidian sync:history file=Note             # Sync version history
obsidian sync:history file=Note total       # Count of sync versions
obsidian sync:read file=Note version=2      # Read a sync version
obsidian sync:restore file=Note version=2   # Restore a sync version
obsidian sync:deleted                       # List files deleted in sync
obsidian sync:deleted total                 # Count of deleted files
obsidian sync:open file=Note               # Open sync history UI
```

### Publish (Obsidian Publish)

```bash
obsidian publish:site                       # Show publish site info
obsidian publish:status                     # List all publish changes
obsidian publish:status new                 # New files to publish
obsidian publish:status changed             # Changed files
obsidian publish:status deleted             # Deleted files
obsidian publish:status total               # Count of changes
obsidian publish:list                       # List published files
obsidian publish:list total                 # Count of published files
obsidian publish:add file=Note              # Publish a file
obsidian publish:add changed                # Publish all changed files
obsidian publish:remove file=Note           # Unpublish a file
obsidian publish:open file=Note             # Open on published site
```

### Themes & CSS Snippets

```bash
# Themes
obsidian theme                              # Show active theme
obsidian theme name="Minimal"               # Get theme info
obsidian themes                             # List installed themes
obsidian themes versions                    # With version numbers
obsidian theme:set name="Minimal"           # Set active theme
obsidian theme:install name="Minimal"       # Install community theme
obsidian theme:install name="Minimal" enable  # Install and activate
obsidian theme:uninstall name="Minimal"     # Uninstall theme

# CSS Snippets
obsidian snippets                           # List installed snippets
obsidian snippets:enabled                   # List enabled snippets
obsidian snippet:enable name="custom"       # Enable a snippet
obsidian snippet:disable name="custom"      # Disable a snippet
```

### Plugins

```bash
obsidian plugins                            # List all installed
obsidian plugins filter=core                # Core plugins only
obsidian plugins filter=community           # Community plugins only
obsidian plugins versions                   # With version numbers
obsidian plugins:enabled                    # List enabled plugins
obsidian plugins:enabled filter=community versions  # Enabled community with versions
obsidian plugins:restrict                   # Check restricted mode status
obsidian plugins:restrict on                # Enable restricted mode
obsidian plugins:restrict off               # Disable restricted mode
obsidian plugin id=dataview                 # Get plugin info
obsidian plugin:enable id=dataview          # Enable plugin
obsidian plugin:disable id=dataview         # Disable plugin
obsidian plugin:install id=dataview         # Install community plugin
obsidian plugin:install id=dataview enable  # Install and enable
obsidian plugin:uninstall id=dataview       # Uninstall community plugin
obsidian plugin:reload id=my-plugin         # Reload plugin (dev)
```

### Web Viewer

```bash
obsidian web url="https://example.com"      # Open URL in web viewer
obsidian web url="https://example.com" newtab  # Open in new tab
```

### Developer Tools

```bash
# JavaScript evaluation
obsidian eval code="app.vault.getFiles().length"  # Run JS in Obsidian context

# Screenshots
obsidian dev:screenshot                     # Screenshot to default path
obsidian dev:screenshot path=screenshot.png # Screenshot to file

# DevTools
obsidian devtools                           # Toggle Electron devtools

# Console & Errors (requires dev:debug on)
obsidian dev:debug on                       # Attach CDP debugger (required for console)
obsidian dev:debug off                      # Detach debugger
obsidian dev:console                        # Show captured console messages
obsidian dev:console limit=10               # Last 10 messages
obsidian dev:console level=error            # Filter by level (log|warn|error|info|debug)
obsidian dev:console clear                  # Clear captured messages
obsidian dev:errors                         # Show captured JS errors
obsidian dev:errors clear                   # Clear errors

# DOM inspection
obsidian dev:dom selector=".workspace"      # Query DOM elements
obsidian dev:dom selector=".nav-file" total # Count matching elements
obsidian dev:dom selector=".nav-file" text  # Get text content
obsidian dev:dom selector=".nav-file" inner # Get innerHTML
obsidian dev:dom selector=".nav-file" all   # All matches
obsidian dev:dom selector="h1" attr=class   # Get attribute
obsidian dev:dom selector="h1" css=color    # Get CSS property

# CSS inspection
obsidian dev:css selector=".workspace"      # Inspect CSS with source locations
obsidian dev:css selector=".workspace" prop=background  # Specific property

# Chrome DevTools Protocol
obsidian dev:cdp method="Page.getLayoutMetrics"  # Raw CDP command
obsidian dev:cdp method="Runtime.evaluate" params='{"expression":"1+1"}'

# Mobile emulation
obsidian dev:mobile on                      # Enable mobile emulation
obsidian dev:mobile off                     # Disable mobile emulation
```

### Multi-Vault

```bash
obsidian vaults                             # List known vaults
obsidian vaults verbose                     # With paths
obsidian vaults total                       # Count of vaults
obsidian vault=Notes daily                  # Target specific vault
obsidian vault=Notes search query="test"    # Search in specific vault
```

## Parameter Syntax

- `param=value` for parameters (quote spaces: `content="Hello world"`)
- Bare words for flags: `obsidian tasks daily todo verbose`
- Multiline: use `\n` for newline, `\t` for tab
- `file=<name>` resolves like wikilinks (name only, no path/extension needed)
- `path=<path>` requires exact path from vault root
- `vault=<name>` must be the FIRST parameter to target a specific vault

## Targeting Vaults

- If CWD is inside a vault, that vault is used
- Otherwise, the active vault is used
- Use `vault=<name>` as FIRST parameter to target a specific vault

## Troubleshooting

- **"Cannot connect"**: Ensure Obsidian is running and CLI is enabled in Settings > General.
- **"Command not found"**: Ensure the `obsidian` binary is in your PATH.
- **Linux IPC issues**: If running headless or as a service, ensure the IPC socket is accessible (no `PrivateTmp`, correct user context).
- **Electron flag conflicts (Linux)**: Use a wrapper script that omits electron-flags.conf for CLI invocations.

## Notes

- CLI connects to running Obsidian via IPC singleton lock
- For non-interactive use (scripts/cron), ensure Obsidian is running first
- `move` requires the full target path including `.md` extension
- `folders` can be slow on large vaults (19k+ files)
- `dev:console` requires `dev:debug on` to be run first

「知识管理」分类下的热门技能

搜索引擎知识管理

通过公开搜索URL在16个搜索引擎(7个国内直连+9个国际)中做跨引擎检索、结果去重与多源交叉验证,无需API Key,内置零依赖Python脚本。Use when 用户要求“搜一下/查资料/多找几个来源/核实消息/找公众号文章/排查报错/找论文或开源项目”时。输入自然语言查询词,输出带来源链接与可信度标注的结构化结果。不适用于私有数据检索、批量抓取、需要登录后可见的内容。

↓ 1075.9万★ 147u_8ee34d77
ima-skills知识管理

通过 IMA OpenAPI 管理笔记与知识库内容。

↓ 108.4万★ 566u_1742680f
Summarize知识管理

把长文本、文档与网页内容压缩成要点和关键词的摘要工具。

↓ 87.6万★ 1,048paudyyin
全网搜索知识管理

通过“查一下、搜一下、搜索、找一下”等自然语言检索公开网页,整理来源并交付横版 PDF、Markdown 与标题链接表。支持用户主动开启、查看和取消技能收藏,保留原报告取回。

↓ 50.9万★ 2u_32d99f8a
web-tools-guide知识管理

规定如何为网页请求选择合适工具的必读指引。

↓ 40.0万★ 220user_ec205dbb
Aihot Skill Lite知识管理

AI HOT(aihot.virxact.com)中文 AI 资讯查询 Skill,帮助用户获取今日 AI 圈动态、AI 日报、AI 热点、最新 AI 资讯以及 OpenAI、Anthropic、Google 等公司的最新发布信息。

↓ 32.1万★ 92Khazix
全球12亿文献知识库(8千万中文期刊可下载)知识管理

全球12亿文献知识库(8千万中文期刊可下载)——通过 SmartLib 开放平台 API 提供中外文学术文献检索与下载能力,覆盖 8000 万篇授权中文期刊全文 + 12.28 亿条全球文献元数据(期刊 7.19 亿 / 专利 2.15 亿 / 会议 7155 万 / 学位论文 2473 万 / 标准 268 万)。 能力:中英文关键词检索、文献详情、中文期刊 PDF 全文下载、外文 OA 文献十级渠道免费下载(不消耗配额)、智能关键词扩展、核心期刊优先排序、相关性重排、引文追溯、分类号检索。 配额:首次使用自动注册,免费 100 次检索 + 10 次下载 / 月;耗尽自动弹出套餐(体验卡 / 个人版月 / 专业版月 / 单篇下载 / 下载包),可说「升级 / 充值」唤起;企业 / 机构定制联系 [email protected]。 触发:用户表达"查论文""找文献""检索学术""搜期刊""查专利""找标准""下论文""写文献综述""找参考文献""查 SCI/EI"等意图时启用;也适用"帮我找关于 XX 的论文""写文献综述""找几篇引用支撑论点"。英文:"find papers" "search literature" "write literature review" "find supporting citations"。 调用前必须先用 /consume 获取 consume_token,再凭 token 调 /search(每次计费接口调用都需一次 /consume)。

↓ 30.3万★ 189user_164f4c1f
Markdown Converter知识管理

用 uvx 直接调用 markitdown,把各类文件转成 Markdown。

↓ 20.4万★ 256Peter Steinberger

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。