← 返回 Skills 市场
jieszs

obsidian-rest-api

作者 Jieszs · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
68
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

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:

  1. Check TOOLS.md for existing OBSIDIAN_API_URL and OBSIDIAN_API_KEY
  2. 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>
      
  3. 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

  1. Install Local REST API plugin in Obsidian
  2. Enable "Bind to all interfaces" in plugin settings
  3. Allow port in Windows firewall
  4. Generate API key
安全使用建议
Install/use this only if you are comfortable letting the agent access and modify your Obsidian vault through the Local REST API. Keep the API key private, restrict the REST API to trusted network paths, and confirm any write, delete, or command-execution request before allowing it.
功能分析
Type: OpenClaw Skill Name: obsidian-rest-api Version: 1.0.1 The skill facilitates interaction between an AI agent in a WSL/remote environment and the Obsidian Local REST API on a Windows host. It includes automated setup logic in SKILL.md to detect the host IP via /etc/resolv.conf and stores API credentials in a local workspace file (TOOLS.md). While it utilizes insecure curl flags (-k) to accommodate the plugin's default self-signed certificates, the behavior is transparent, well-documented in references/api.md, and strictly aligned with the stated purpose without any signs of malicious intent or data exfiltration.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose matches the documented capabilities: reading, searching, creating, updating, opening, and commanding Obsidian notes through the Local REST API.
Instruction Scope
The instructions are mostly user-directed examples, but they include high-impact REST operations such as note updates, appends, command execution, and referenced delete endpoints.
Install Mechanism
There is no code or install script in the skill; setup relies on the user installing Obsidian's Local REST API plugin and adjusting firewall/plugin settings.
Credentials
For WSL/remote use, the skill instructs binding the API to all interfaces, opening a Windows firewall port, and using curl with certificate verification disabled; this is purpose-aligned but should be limited to trusted networks.
Persistence & Privilege
The skill persists the Obsidian API endpoint and API key in ~/.openclaw/workspace/TOOLS.md so future invocations can reuse them.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install obsidian-rest-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /obsidian-rest-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- No changes detected in this release. - Version number updated to 1.0.1.
v1.0.0
obsidian-rest-api 1.0.0 - Initial release. - Enables remote operation of Obsidian via its Local REST API plugin from WSL or remote environments when direct filesystem access is unavailable. - Provides step-by-step setup instructions for API connection, key storage, and firewall configuration. - Includes ready-to-use command examples for creating, editing, searching, and managing notes via API. - Offers troubleshooting tips for common connectivity and SSL issues. - Documents configuration format and quick start for seamless integration.
元数据
Slug obsidian-rest-api
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

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。

💬 留言讨论