/install obsidian-rest-api
Obsidian REST API
Operate Obsidian via Local REST API plugin from WSL or remote environments.
First-Time Setup
On first use, automatically detect and save configuration:
- Check TOOLS.md for existing
OBSIDIAN_API_URLandOBSIDIAN_API_KEY - If not found:
- Get Windows host IP:
cat /etc/resolv.conf | grep nameserver | awk '{print $2}' - Ask user for API Key
- Save to TOOLS.md:
### Obsidian REST API (WSL → Windows) **API 端点**: https://\x3Cdetected-ip>:27124 **API Key**: \x3Cuser-provided-key>
- Get Windows host IP:
- Test connection with saved config
Configuration Format
Saved in TOOLS.md:
### Obsidian REST API (WSL → Windows)
**API 端点**: https://\x3Cwindows-host-ip>:27124
**API Key**: \x3Cyour-api-key>
Quick Start
# Get URL and KEY from TOOLS.md
URL=$(grep 'API 端点' ~/.openclaw/workspace/TOOLS.md | awk -F': ' '{print $2}')
KEY=$(grep 'API Key' ~/.openclaw/workspace/TOOLS.md | awk -F': ' '{print $2}')
# Test connection
curl -k -H "Authorization: Bearer $KEY" "$URL/"
# List vault files
curl -k -H "Authorization: Bearer $KEY" "$URL/vault/"
# Create note
curl -k -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
-d "# Title\
Content" "$URL/vault/note.md"
Common Tasks
Create/Update Note
curl -k -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
--data "\x3Ccontent>" "$URL/vault/\x3Cfilename>.md"
Append to Note
curl -k -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
--data "\x3Ccontent-to-append>" "$URL/vault/\x3Cfilename>.md"
Get Daily Note
curl -k -H "Authorization: Bearer $KEY" "$URL/periodic/daily/"
# Or specific date:
curl -k -H "Authorization: Bearer $KEY" "$URL/periodic/daily/2026/05/11/"
Search Notes
# Simple text search
curl -k -X POST -H "Authorization: Bearer $KEY" \
"$URL/search/simple/?query=keyword"
# Advanced search (Dataview-style)
curl -k -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"query":"tag:#work"}' "$URL/search/"
Get Active File
curl -k -H "Authorization: Bearer $KEY" "$URL/active/"
Open File in UI
curl -k -X POST -H "Authorization: Bearer $KEY" "$URL/open/note.md"
Execute Command
# List available commands
curl -k -H "Authorization: Bearer $KEY" "$URL/commands/"
# Execute command
curl -k -X POST -H "Authorization: Bearer $KEY" "$URL/commands/daily-notes"
Get All Tags
curl -k -H "Authorization: Bearer $KEY" "$URL/tags/"
API Reference
See references/api.md for complete endpoint documentation.
Troubleshooting
Connection refused: Windows firewall blocking port.
# PowerShell (admin)
New-NetFirewallRule -DisplayName "Obsidian REST API" -Direction Inbound -LocalPort 27124 -Protocol TCP -Action Allow
SSL error: Use -k flag (self-signed cert).
Vault not found: Ensure vault is open in Obsidian.
Windows Setup
- Install
Local REST APIplugin in Obsidian - Enable "Bind to all interfaces" in plugin settings
- Allow port in Windows firewall
- Generate API key
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install obsidian-rest-api - 安装完成后,直接呼叫该 Skill 的名称或使用
/obsidian-rest-api触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
obsidian-rest-api 是什么?
Operate Obsidian via Local REST API plugin from remote/WSL environments. Use when: (1) user asks to operate Obsidian, read/write notes, or manage vault remot... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 68 次。
如何安装 obsidian-rest-api?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install obsidian-rest-api」即可一键安装,无需额外配置。
obsidian-rest-api 是免费的吗?
是的,obsidian-rest-api 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
obsidian-rest-api 支持哪些平台?
obsidian-rest-api 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 obsidian-rest-api?
由 Jieszs(@jieszs)开发并维护,当前版本 v1.0.1。