From forge-obsidian
[DEPRECATED] Use /ObsidianCLI instead. Obsidian Local REST API — list vault files, search content, check note existence, read/write files via HTTPS. USE WHEN Obsidian REST API, local REST, vault API.
npx claudepluginhub n4m3z/forge-obsidianThis skill uses the workspace's default tool permissions.
> **Deprecated** — The official Obsidian CLI (1.12+) replaces this functionality. See `/ObsidianCLI` for the current reference. This skill remains for users on Obsidian < 1.12 or headless/remote environments where the CLI is unavailable.
Runs Obsidian CLI commands for vault ops: search, backlinks, tags, tasks, properties, daily notes, file read/write/create/move. Use for indexed features; fallback to file tools otherwise.
Automates Obsidian Markdown vaults with obsidian-cli: find active vaults, search/create/move/delete notes, refactor wikilinks.
Manages Obsidian vaults using obsidian-cli: creates daily notes, moves/renames notes preserving [[wiki-links]], searches content, organizes notes with templates.
Share bugs, ideas, or general feedback.
Deprecated — The official Obsidian CLI (1.12+) replaces this functionality. See
/ObsidianCLIfor the current reference. This skill remains for users on Obsidian < 1.12 or headless/remote environments where the CLI is unavailable.
Reference for the Obsidian Local REST API plugin. Provides an HTTPS server inside Obsidian for vault queries — list files, search content, check existence, read/write. Returns JSON to curl.
Falls back to file-system operations (Glob, Grep, safe-read) when unavailable.
Modules/forge-obsidian/.env (gitignored):OBSIDIAN_REST_API_KEY=<your-api-key>
HTTPS on port 27124. Insecure HTTP (27123) is disabled by default. All requests require -k for the self-signed certificate.
export $(cat Modules/forge-obsidian/.env 2>/dev/null | xargs 2>/dev/null)
curl -sk "https://localhost:27124/..." -H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
curl -sk "https://localhost:27124/" -H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
# { "authenticated": true, "service": "Obsidian Local REST API", ... }
# Vault root (trailing slash = directory listing)
curl -sk "https://localhost:27124/vault/" -H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
# { "files": ["Topics/", "Resources/", "Orchestration/", "Vault.md", ...] }
# Subdirectory
curl -sk "https://localhost:27124/vault/Topics/" -H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
# { "files": ["Security.md", "Proton.md", ...] }
Trailing slash distinguishes directory listing from file access. Without trailing slash, the path is treated as a filename.
curl -sk -o /dev/null -w "%{http_code}" \
"https://localhost:27124/vault/Resources/Applications/Obsidian.md" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
# 200 = exists, 404 = doesn't
# Raw markdown
curl -sk "https://localhost:27124/vault/Topics/Security.md" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
# Structured JSON (frontmatter parsed, tags extracted)
curl -sk "https://localhost:27124/vault/Topics/Security.md" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY" \
-H "Accept: application/vnd.olrapi.note+json"
# Simple text search (POST method, query in URL params)
curl -sk -X POST \
"https://localhost:27124/search/simple/?query=forge-tlp&contextLength=100" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
# [{ "filename": "...", "score": N, "matches": [{ "match": { "start": N, "end": N }, "context": "..." }] }]
# Dataview DQL query (POST, body is the query)
curl -sk -X POST "https://localhost:27124/search/" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY" \
-H "Content-Type: application/vnd.olrapi.dataview.dql+txt" \
-d 'TABLE file.name FROM "Topics" WHERE contains(file.name, "Security")'
# JsonLogic query (POST, JSON body)
curl -sk -X POST "https://localhost:27124/search/" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY" \
-H "Content-Type: application/vnd.olrapi.jsonlogic+json" \
-d '{"glob": ["*.md", {"var": "path"}]}'
curl -sk -X PUT "https://localhost:27124/vault/Topics/NewNote.md" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY" \
-H "Content-Type: text/markdown" \
-d '---
title: New Note
---
Content here.'
curl -sk -X POST "https://localhost:27124/open/Topics/Security.md" \
-H "Authorization: Bearer $OBSIDIAN_REST_API_KEY"
export $(cat Modules/forge-obsidian/.env 2>/dev/null | xargs 2>/dev/null)
if curl -sk --max-time 2 "https://localhost:27124/" \
-H "Authorization: Bearer ${OBSIDIAN_REST_API_KEY:-none}" 2>/dev/null \
| grep -q '"authenticated":true'; then
echo "REST API available"
else
echo "REST API unavailable — falling back to file system"
fi
| REST API operation | File-system fallback |
|---|---|
GET /vault/{dir}/ (list) | find "$FORGE_USER_ROOT" -name '*.md' or Glob tool |
POST /search/simple/ | Grep tool |
GET /vault/{path} (exists) | Glob **/{name}.md |
GET /vault/{path} (read) | safe-read or Read tool |
PUT /vault/{path} (write) | safe-write write or Write tool |
-k with curl.env gitignored/search/simple/ is POST, not GET (common mistake)