Files
obsidian-api/packages/n8n-nodes-obsidian-api/README.md
T
daniel156161 902a3df8b5
Build and Push Docker Container / build-and-push (push) Successful in 4m26s
feat: add Obsidian CLI API service
- Add Docker image for the official Obsidian desktop app and CLI.

- Start Obsidian headlessly with Xvfb and DBus setup.

- Expose a safe structured HTTP command API without shell execution.

- Add JWT-based vault, path, and command authorization.

- Support single-vault and multi-vault container mounts.

- Add TypeScript SDK helpers for Obsidian CLI commands.

- Add n8n community node package with Obsidian operations.

- Add docs, compose config, tests, and production image workflow.
2026-06-24 09:11:13 +02:00

80 lines
1.8 KiB
Markdown

# n8n-nodes-obsidian-api
n8n community-node package for the Obsidian API Docker service.
It talks to the HTTP API, which then runs the **official Obsidian CLI** against mounted vaults. The node sends structured `args` arrays only. It does not send shell commands.
## Nodes
### Obsidian API
Resources:
- **Note**
- Create
- Read
- Append
- Prepend
- Delete
- Rename
- List Files
- **Daily Note**
- Append
- Prepend
- Read
- Path
- **Search**
- Search
- Search With Context
- **Vault**
- Info
- List Vaults
- **Raw Command**
- Safe args-array escape hatch for any official CLI command
## Credentials
Credential type: **Obsidian API**
Fields:
- **Base URL**: e.g. `http://obsidian-api:8080`
- **API Token**: JWT created with `scripts/create_jwt.py`
- **Default Vault**: optional, e.g. `work`
## Multi-vault
Set the `Vault` field on a node to override the credential default vault.
The node sends this as the official CLI prefix:
```text
vault=work
```
Raw command example:
```json
["vault=work", "read", "path=Inbox/Note.md"]
```
## Local install in self-hosted n8n
From this repo:
```bash
cd packages/n8n-nodes-obsidian-api
npm install --ignore-scripts
npm run build
npm pack
```
Then install the generated `.tgz` in your n8n custom extensions setup.
For Docker-based n8n, one common setup is mounting this package into n8n's custom extensions directory and setting:
```env
N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
```
Exact installation depends on your n8n deployment.
## Development
```bash
npm install --ignore-scripts
npm run typecheck
npm run build
```
`--ignore-scripts` avoids local native builds from n8n transitive dependencies on unsupported bleeding-edge Node versions. Use the Node version recommended by your n8n release for production builds.