Back to skills
SkillHub ClubShip Full StackFull Stack

obsidian-cli-official

Official Obsidian CLI (v1.12+). Complete command-line interface for Obsidian notes, tasks, search, tags, properties, links, and more.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,087
Hot score
99
Updated
March 20, 2026
Overall rating
C4.0
Composite score
4.0
Best-practice grade
C62.8

Install command

npx @skill-hub/cli install openclaw-skills-obsidian-cli-official

Repository

openclaw/skills

Skill path: skills/alexanderkinging/obsidian-cli-official

Official Obsidian CLI (v1.12+). Complete command-line interface for Obsidian notes, tasks, search, tags, properties, links, and more.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install obsidian-cli-official into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding obsidian-cli-official to shared team environments
  • Use obsidian-cli-official for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: obsidian-cli-official
description: |
  Official Obsidian CLI (v1.12+). Complete command-line interface for 
  Obsidian notes, tasks, search, tags, properties, links, and more.
homepage: https://help.obsidian.md/cli
metadata:
  openclaw:
    emoji: "💎"
    requires:
      bins: ["obsidian"]
    platform: ["macos", "windows", "linux"]
---

# Obsidian Official CLI

Official command-line interface for Obsidian (v1.12+). 115 commands.

## Prerequisites

- **Obsidian 1.12+** (free, public release since v1.12)
- **Obsidian must be running** (CLI connects via IPC)
- **Enable CLI**: Settings → General → Enable CLI

## Setup

Add Obsidian to PATH:

**macOS:**
```bash
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"
```

**Windows:**
```powershell
$env:PATH += ";$env:LOCALAPPDATA\Obsidian"
```

**Linux:**
- Snap: Already in PATH
- Flatpak: `alias obsidian='flatpak run md.obsidian.Obsidian'`
- AppImage: Move to `~/.local/bin` and `chmod +x`

**Test:** `obsidian version`

## Syntax

- **Parameters**: `name=value` or `name="value with spaces"`
- **Flags**: just the name, e.g. `open`, `overwrite`
- **Newlines**: use `\n` in content strings
- **Target vault**: `obsidian vault="My Vault" <command>` (must be first)
- **Target file**: `file=<name>` (wikilink-style) or `path=<folder/file.md>` (exact)
- **Copy output**: append `--copy` to any command

## Common Commands (with examples)

### Daily Notes
```bash
obsidian daily                                    # Open today
obsidian daily:append content="- [ ] Buy milk"    # Add to today
obsidian daily:prepend content="# Important"      # Add to top
obsidian daily:read                               # Read today's content
obsidian daily:path                               # Get daily note path
```

### Files
```bash
obsidian create name="Note" content="# Hello"     # Create note
obsidian create name="Note" template=Meeting       # Create from template
obsidian read file="Note"                          # Read note
obsidian append file="Note" content="More text"    # Append to note
obsidian prepend file="Note" content="Top text"    # Prepend to note
obsidian move file="Note" to="Archive/Note.md"     # Move note
obsidian rename file="Note" name="New Name"        # Rename note
obsidian delete file="Note"                        # Delete note
obsidian open file="Note"                          # Open note
```

### Search
```bash
obsidian search query="meeting notes"              # Search vault
obsidian search:context query="TODO"               # Search with context
obsidian search:open query="project"               # Open search view
```

### Tasks
```bash
obsidian tasks daily todo                          # Incomplete tasks in daily
obsidian tasks todo                                # All incomplete tasks
obsidian task daily line=3 toggle                  # Toggle task at line 3
```

### Tags & Properties
```bash
obsidian tags counts                               # List all tags
obsidian tags counts sort=count                    # Sort by frequency
obsidian property:set name="status" value="done" file="Note"
obsidian property:read name="status" file="Note"
obsidian property:remove name="status" file="Note"
obsidian properties file="Note"                    # List all properties
```

### Links
```bash
obsidian backlinks file="Note"                     # Incoming links
obsidian links file="Note"                         # Outgoing links
obsidian orphans                                   # No incoming links
obsidian deadends                                  # No outgoing links
obsidian unresolved                                # Broken links
```

### Developer
```bash
obsidian devtools                                  # Open dev tools
obsidian eval code="app.vault.getFiles().length"   # Run JavaScript
obsidian dev:screenshot path=screenshot.png         # Screenshot
obsidian plugin:reload id=my-plugin                # Reload plugin
```

## All Commands (115 total)

### General (4)
- `help` - Show help / help for specific command
- `version` - Show Obsidian version
- `reload` - Reload the app window
- `restart` - Restart the app

### Daily Notes (5)
- `daily` - Open daily note
- `daily:path` - Get daily note path
- `daily:read` - Read daily note contents
- `daily:append` - Append content to daily note
- `daily:prepend` - Prepend content to daily note

### Files & Folders (12)
- `file` - Show file info
- `files` - List files in vault
- `folder` - Show folder info
- `folders` - List folders in vault
- `open` - Open a file
- `create` - Create a new file
- `read` - Read file contents
- `append` - Append content to a file
- `prepend` - Prepend content to a file
- `move` - Move or rename a file
- `rename` - Rename a file
- `delete` - Delete a file

### Search (3)
- `search` - Search vault for text
- `search:context` - Search with matching line context
- `search:open` - Open search view

### Tasks (2)
- `tasks` - List tasks in the vault
- `task` - Show or update a task

### Tags (2)
- `tags` - List tags in the vault
- `tag` - Get tag info

### Properties (4)
- `properties` - List properties in the vault
- `property:set` - Set a property on a file
- `property:remove` - Remove a property from a file
- `property:read` - Read a property value

### Aliases (1)
- `aliases` - List aliases in the vault

### Links (5)
- `backlinks` - List backlinks to a file
- `links` - List outgoing links from a file
- `unresolved` - List unresolved links
- `orphans` - Files with no incoming links
- `deadends` - Files with no outgoing links

### Outline (1)
- `outline` - Show headings for a file

### Bookmarks (2)
- `bookmarks` - List bookmarks
- `bookmark` - Add a bookmark

### Bases / Database (4)
- `bases` - List all base files
- `base:views` - List views in a base
- `base:create` - Create a new item in a base
- `base:query` - Query a base and return results

### Templates (3)
- `templates` - List templates
- `template:read` - Read template content
- `template:insert` - Insert template into active file

### Commands & Hotkeys (4)
- `commands` - List available command IDs
- `command` - Execute an Obsidian command
- `hotkeys` - List hotkeys
- `hotkey` - Get hotkey for a command

### Tabs & Workspaces (7)
- `tabs` - List open tabs
- `tab:open` - Open a new tab
- `workspace` - Show workspace tree
- `workspaces` - List saved workspaces
- `workspace:load` - Load a saved workspace
- `workspace:save` - Save current layout
- `workspace:delete` - Delete a saved workspace

### File History & Diff (6)
- `diff` - List or diff local/sync versions
- `history` - List file history versions
- `history:list` - List files with history
- `history:read` - Read a file history version
- `history:restore` - Restore a file history version
- `history:open` - Open file recovery

### Sync (7)
- `sync` - Pause or resume sync (on/off)
- `sync:status` - Show sync status
- `sync:history` - List sync version history
- `sync:read` - Read a sync version
- `sync:restore` - Restore a sync version
- `sync:open` - Open sync history
- `sync:deleted` - List deleted files in sync

### Publish (6)
- `publish:site` - Show publish site info
- `publish:list` - List published files
- `publish:status` - Show publish status
- `publish:add` - Publish files
- `publish:remove` - Unpublish files
- `publish:open` - Open published site

### Themes & Snippets (9)
- `themes` - List installed themes
- `theme` - Show active theme or get info
- `theme:set` - Set active theme
- `theme:install` - Install a community theme
- `theme:uninstall` - Uninstall a theme
- `snippets` - List installed CSS snippets
- `snippets:enabled` - List enabled CSS snippets
- `snippet:enable` - Enable a CSS snippet
- `snippet:disable` - Disable a CSS snippet

### Plugins (9)
- `plugins` - List installed plugins
- `plugins:enabled` - List enabled plugins
- `plugins:restrict` - Toggle restricted mode
- `plugin` - Get plugin info
- `plugin:enable` - Enable a plugin
- `plugin:disable` - Disable a plugin
- `plugin:install` - Install a community plugin
- `plugin:uninstall` - Uninstall a community plugin
- `plugin:reload` - Reload a plugin

### Vault (3)
- `vault` - Show vault info
- `vaults` - List known vaults
- `vault:open` - Open a vault (TUI only)

### Random Notes (2)
- `random` - Open a random note
- `random:read` - Read a random note

### Unique Notes (1)
- `unique` - Create unique note

### Web Viewer (1)
- `web` - Open URL in web viewer

### Word Count (1)
- `wordcount` - Count words and characters

### Recently Opened (1)
- `recents` - List recently opened files

### Developer (10)
- `devtools` - Toggle Electron dev tools
- `eval` - Execute JavaScript
- `dev:screenshot` - Take a screenshot
- `dev:console` - Show captured console messages
- `dev:errors` - Show captured errors
- `dev:css` - Inspect CSS with source locations
- `dev:dom` - Query DOM elements
- `dev:cdp` - Run Chrome DevTools Protocol command
- `dev:debug` - Attach/detach CDP debugger
- `dev:mobile` - Toggle mobile emulation

## Troubleshooting

**"Cannot connect to Obsidian"**
- Ensure Obsidian is running
- Enable CLI in Settings → General → Enable CLI

**"Command not found: obsidian"**
- Add Obsidian to PATH (see Setup above)

**"File not found"**
- `file=Name` resolves like wikilinks (no path, no .md)
- `path=folder/file.md` for exact paths

## 中文说明

### 前置条件
- Obsidian 1.12+(免费公开版本)
- Obsidian 必须运行中
- 启用 CLI:设置 → 通用 → 启用 CLI

### 常用命令
```bash
obsidian daily                    # 打开今日日记
obsidian create name="笔记"       # 创建笔记
obsidian search query="关键词"    # 搜索
obsidian tasks daily todo         # 列出未完成任务
obsidian tags counts              # 列出标签
```


---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### README.md

```markdown
# Obsidian Official CLI Skill

Complete reference for the official Obsidian CLI (v1.12+). All 115 commands documented.

## What is this?

This OpenClaw skill provides **complete access to Obsidian's official CLI** (v1.12+), enabling AI agents to:

- 📝 **Automate note-taking**: Create daily journals, meeting notes, project logs
- ✅ **Manage tasks**: Toggle task status, filter by completion, track progress
- 🔍 **Search and organize**: Find notes, create links, manage tags
- 🗄️ **Work with databases**: Query bases, create items, manage views
- 🎨 **Customize workspace**: Install themes/plugins, manage workspaces

**For OpenClaw users**: Your AI assistant can now read, write, and organize your Obsidian vault automatically.

**For developers**: Complete CLI reference with 115 commands for building Obsidian automation.

## Prerequisites

- **Obsidian 1.12+** (free, public release)
- **Platform**: macOS, Windows, or Linux
- **Obsidian must be running** (CLI connects via IPC)
- **Obsidian Publish subscription** (optional, $8/month for publish commands)

## Installation

### Via ClawHub (OpenClaw) - All Platforms

```bash
clawhub install obsidian-cli-official
```

### Via Homebrew (macOS/Linux) 🍺

```bash
# Add tap
brew tap alexanderkinging/tap

# Install
brew install obsidian-cli-official

# Test
obs help
```

### Manual Setup

#### macOS

**1. Enable CLI in Obsidian**

Settings → General → Enable CLI

**2. Add to PATH**

```bash
echo 'export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"' >> ~/.zprofile
source ~/.zprofile
```

**3. Test**

```bash
obsidian version
obsidian vault
```

---

#### Windows

**1. Enable CLI in Obsidian**

Settings → General → Enable CLI

**2. Add to PATH**

**Option A: System Environment Variables**
1. Press `Win + X` → System → Advanced system settings
2. Environment Variables → PATH → Edit
3. Add: `C:\Users\<YourUsername>\AppData\Local\Obsidian`

**Option B: PowerShell Profile**
```powershell
# Edit profile
notepad $PROFILE

# Add this line
$env:PATH += ";$env:LOCALAPPDATA\Obsidian"

# Reload
. $PROFILE
```

**3. Test**

```powershell
obsidian version
obsidian vault
```

---

#### Linux

**1. Enable CLI in Obsidian**

Settings → General → Enable CLI

**2. Add to PATH**

**Snap:**
```bash
# Already in PATH
obsidian version
```

**Flatpak:**
```bash
# Add alias to ~/.bashrc
echo 'alias obsidian="flatpak run md.obsidian.Obsidian"' >> ~/.bashrc
source ~/.bashrc
```

**AppImage:**
```bash
# Move to ~/.local/bin
mv Obsidian-*.AppImage ~/.local/bin/obsidian
chmod +x ~/.local/bin/obsidian

# Add to PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

**3. Test**

```bash
obsidian version
obsidian vault
```

## OpenClaw Use Cases

### 📅 Daily Journal Automation

Your AI assistant can maintain your daily journal automatically:

```bash
# Create today's daily note
obsidian daily

# Add morning tasks
obsidian daily:append content="## Morning Tasks\n- [ ] Review emails\n- [ ] Plan the day"

# Add meeting notes
obsidian daily:append content="## Meeting with Team\n- Discussed project timeline\n- Next steps: ..."
```

### 📝 Meeting Notes

AI agent creates structured meeting notes from conversations:

```bash
# Create meeting note
obsidian create name="Meeting 2026-03-01" content="# Team Sync\n\n## Attendees\n- Alice\n- Bob\n\n## Discussion\n..."

# Add metadata
obsidian property:set name="type" value="meeting" file="Meeting 2026-03-01"
obsidian property:set name="date" value="2026-03-01" file="Meeting 2026-03-01"

# Bookmark for quick access
obsidian bookmark file="Meeting 2026-03-01.md"
```

### ✅ Task Management

AI agent helps you manage tasks across your vault:

```bash
# List all incomplete tasks
obsidian tasks daily todo

# Toggle task completion
obsidian task daily line=3 toggle

# Find tasks by tag
obsidian search query="- [ ]" path="Projects"
```

### 🔍 Knowledge Search & Organization

AI agent finds and connects relevant information:

```bash
# Search for project notes
obsidian search query="project alpha" path="Work"

# Find related notes
obsidian backlinks file="Project Alpha"

# Check orphaned notes
obsidian orphans
```

### 📊 Database Operations

AI agent manages your Obsidian databases:

```bash
# List all databases
obsidian bases

# Query database
obsidian base:query file="Projects" format=json

# Create new item
obsidian base:create name="New Project" content="Description..."
```

### 🎨 Workspace Customization

AI agent sets up your workspace:

```bash
# Install plugin
obsidian plugin:install id="dataview" enable

# Switch theme
obsidian theme:set name="Minimal"

# Save workspace layout
obsidian workspace:save name="coding"
```

## Quick Examples

```bash
# Daily notes
obsidian daily
obsidian daily:append content="- [ ] Task"

# Files
obsidian create name="Note" content="Hello"
obsidian read file="Recipe"
obsidian search query="meeting"

# Tasks
obsidian tasks daily todo
obsidian task daily line=3 toggle

# Tags & Properties
obsidian tags counts sort=count
obsidian property:set name="status" value="done" file="Note"

# Bookmarks
obsidian bookmark file="important.md"
obsidian bookmarks

# Bases (Database)
obsidian bases
obsidian base:query file="MyBase" format=json

# History
obsidian history file="Note"
obsidian history:restore file="Note" version=3

# Plugins
obsidian plugins filter=community
obsidian plugin:install id="dataview" enable

# Publish (requires subscription)
obsidian publish:status
obsidian publish:add changed

# Developer
obsidian devtools
obsidian eval code="app.vault.getFiles().length"
```

## OpenClaw Integration Tips

### Best Practices

1. **Keep Obsidian running**: CLI requires Obsidian app to be open
2. **Use `file=` for flexibility**: Resolves by name, works across folders
3. **Batch operations**: Combine commands for complex workflows
4. **Error handling**: Check if Obsidian is running before CLI calls

### Common Patterns

**Daily workflow automation:**
```bash
# Morning routine
obsidian daily
obsidian daily:append content="## Today's Goals\n- [ ] Review PRs\n- [ ] Write docs"
obsidian tasks daily todo
```

**Note creation with metadata:**
```bash
# Create note with properties
obsidian create name="Article Idea" content="# New Article\n\nIdea: ..."
obsidian property:set name="status" value="draft" file="Article Idea"
obsidian property:set name="tags" value="writing" file="Article Idea"
obsidian bookmark file="Article Idea.md"
```

**Search and link:**
```bash
# Find related notes and create connections
obsidian search query="machine learning" path="Research"
obsidian backlinks file="ML Overview"
obsidian links file="ML Overview"
```

**Workspace setup:**
```bash
# Set up coding environment
obsidian workspace:load name="coding"
obsidian plugin:enable id="dataview"
obsidian theme:set name="Minimal"
```

### Error Handling

```bash
# Check if Obsidian is running
if pgrep -x "Obsidian" > /dev/null; then
    obsidian daily
else
    echo "Please start Obsidian first"
fi
```

## Complete Documentation

See [SKILL.md](SKILL.md) for all 115 commands with full parameter documentation.

## Troubleshooting

### "Cannot connect to Obsidian"
- Ensure Obsidian is running
- Enable CLI in Settings → General → Enable CLI

### "Command not found: obsidian"
```bash
# Add to PATH
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"

# Or use full path
/Applications/Obsidian.app/Contents/MacOS/obsidian version
```

### "File not found"
- Use `file=<name>` for wikilink-style resolution (no path, no .md)
- Use `path=<path>` for exact paths (include folder and .md)

### Multi-vault
```bash
# Target specific vault (must be FIRST parameter)
obsidian vault="Work" daily
obsidian vault="Notes" search query="test"
```

### Publish commands not working
- Requires **Obsidian Publish subscription** ($8/month or $96/year)
- Without subscription: `Error: Command "publish:status" not found`
- Subscribe at: https://obsidian.md/publish

## Resources

- **Official Docs**: https://help.obsidian.md/cli
- **Obsidian Download**: https://obsidian.md/download
- **GitHub**: https://github.com/alexanderkinging/obsidian-official-cli
- **ClawHub**: https://clawhub.ai/obsidian-cli-official

---

## 中文说明

### 这是什么?

这个 OpenClaw skill 提供了 **Obsidian 官方 CLI 的完整访问**(v1.12+),让 AI agent 能够:

- 📝 **自动化笔记**: 创建日记、会议记录、项目日志
- ✅ **管理任务**: 切换任务状态、筛选、追踪进度
- 🔍 **搜索和整理**: 查找笔记、创建链接、管理标签
- 🗄️ **操作数据库**: 查询 base、创建条目、管理视图
- 🎨 **自定义工作区**: 安装主题/插件、管理工作区

**对于 OpenClaw 用户**: 你的 AI 助手现在可以自动读取、编写和整理你的 Obsidian 库。

**对于开发者**: 完整的 CLI 参考,包含 115 个命令,用于构建 Obsidian 自动化。

### 前置条件

- Obsidian 1.12+(免费公开版本)
- 平台:macOS、Windows 或 Linux
- Obsidian 必须运行中
- Obsidian Publish 订阅(可选,$8/月,用于 publish 命令)

### 安装

**通过 ClawHub(所有平台):**
```bash
clawhub install obsidian-cli-official
```

**通过 Homebrew(macOS/Linux):**
```bash
brew install alexanderkinging/tap/obsidian-cli-official
```

### 配置

**macOS:**
1. 设置 → 通用 → 启用 CLI
2. 添加到 PATH:`export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"`
3. 测试:`obsidian version`

**Windows:**
1. 设置 → 通用 → 启用 CLI
2. 添加到 PATH:系统属性 → 环境变量 → PATH → 添加 `C:\Users\<用户名>\AppData\Local\Obsidian`
3. 测试:`obsidian version`

**Linux:**
1. 设置 → 通用 → 启用 CLI
2. 根据安装方式配置(Snap/Flatpak/AppImage)
3. 测试:`obsidian version`

### OpenClaw 使用场景

**日记自动化:**
```bash
obsidian daily
obsidian daily:append content="## 今日任务\n- [ ] 审查代码\n- [ ] 写文档"
```

**会议记录:**
```bash
obsidian create name="会议 2026-03-01" content="# 团队同步\n\n..."
obsidian property:set name="类型" value="会议" file="会议 2026-03-01"
```

**任务管理:**
```bash
obsidian tasks daily todo
obsidian task daily line=3 toggle
```

**知识搜索:**
```bash
obsidian search query="项目" path="工作"
obsidian backlinks file="项目概览"
```

详细文档见 [SKILL.md](SKILL.md)。

```

### _meta.json

```json
{
  "owner": "alexanderkinging",
  "slug": "obsidian-cli-official",
  "displayName": "Obsidian Official CLI",
  "latest": {
    "version": "4.0.2",
    "publishedAt": 1772687558880,
    "commit": "https://github.com/openclaw/skills/commit/4da400ac2e613b5c6995d568f4e75ddd077af82e"
  },
  "history": [
    {
      "version": "4.0.1",
      "publishedAt": 1772620216862,
      "commit": "https://github.com/openclaw/skills/commit/8590c0de6243a9900500518d77a284521d43fb6e"
    },
    {
      "version": "4.0.0",
      "publishedAt": 1772422207709,
      "commit": "https://github.com/openclaw/skills/commit/e7cd0d78720d35c82fa33cabc93d1164a2d234f1"
    },
    {
      "version": "3.1.0",
      "publishedAt": 1772370079771,
      "commit": "https://github.com/openclaw/skills/commit/7ad10a3ab107dec0cbe7196dd3da9e82b56745a8"
    }
  ]
}

```

### scripts/obs-helper.sh

```bash
#!/bin/bash
# Obsidian CLI Wrapper for AI Agents
# Usage: obs <action> [args...]

set -e

# Check if Obsidian is running
if ! pgrep -x "Obsidian" > /dev/null; then
    echo "Error: Obsidian is not running"
    exit 1
fi

# Ensure CLI is in PATH
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"

ACTION="$1"
shift

case "$ACTION" in
    daily)
        # Create or open today's daily note
        obsidian daily
        ;;
    
    daily-add)
        # Add content to today's daily note
        CONTENT="$1"
        obsidian daily:append content="$CONTENT"
        ;;
    
    note-create)
        # Create a new note
        NAME="$1"
        CONTENT="$2"
        obsidian create name="$NAME" content="$CONTENT"
        ;;
    
    note-read)
        # Read a note
        FILE="$1"
        obsidian read file="$FILE"
        ;;
    
    search)
        # Search notes
        QUERY="$1"
        obsidian search query="$QUERY"
        ;;
    
    tasks)
        # List tasks
        obsidian tasks daily todo
        ;;
    
    task-toggle)
        # Toggle task completion
        LINE="$1"
        obsidian task daily line="$LINE" toggle
        ;;
    
    help)
        cat << 'EOF'
Obsidian CLI Wrapper for AI Agents

Usage: obs <action> [args...]

Actions:
  daily                    Open today's daily note
  daily-add "content"      Add content to today's daily note
  note-create "name" "content"  Create a new note
  note-read "name"         Read a note
  search "query"           Search notes
  tasks                    List incomplete tasks
  task-toggle <line>       Toggle task completion
  help                     Show this help

Examples:
  obs daily
  obs daily-add "## Meeting Notes\n- Discussed project timeline"
  obs note-create "Ideas" "# New Ideas\n\n- Idea 1"
  obs search "project"
  obs tasks
  obs task-toggle 3

Full documentation:
https://github.com/alexanderkinging/obsidian-official-cli
EOF
        ;;
    
    *)
        echo "Unknown action: $ACTION"
        echo "Run 'obs help' for usage"
        exit 1
        ;;
esac

```

### scripts/obs.sh

```bash
#!/bin/bash
# Obsidian CLI wrapper - 确保 PATH 正确
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"
exec obsidian "$@"

```

obsidian-cli-official | SkillHub