mirror of
https://github.com/kepano/obsidian-skills.git
synced 2026-12-05 10:05:18 -08:00
Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85add51f43 | |||
| 96cf4d19ff | |||
| 48a7ca3f32 | |||
| 37a56a6a58 | |||
| 15272076ad | |||
| 9cab7195e3 | |||
| 192500ad0d | |||
| 5153119854 | |||
| 04df0be8a2 | |||
| caf8f550f0 | |||
| ec45905ff2 | |||
| cc56429bb5 | |||
| 95b7225be1 | |||
| 0cff8071f1 | |||
| 3fce00b0d3 | |||
| b178fdfbb7 | |||
| 3436b16881 | |||
| 60b7f25b04 | |||
| 330aed55c3 | |||
| e389391fa6 | |||
| c649fc0aa6 | |||
| d5dde60af0 | |||
| 5f7c648180 | |||
| 2c495a512b | |||
| c1d50cd76c | |||
| 1072e377da | |||
| 51f8f89e28 | |||
| 86ef1200c9 | |||
| 94c423c434 | |||
| ad475e618c | |||
| d55b393fde | |||
| 086e1e95e9 | |||
| 0cb7b09cd9 | |||
| bca2821056 | |||
| 5b451029ba | |||
| d66e2e8a20 | |||
| 1969ad4433 | |||
| 715c6b3ece | |||
| b9dc51eb6b | |||
| f4c0036a69 | |||
| 856640528f | |||
| 5d31732317 | |||
| d9d7a8cacd | |||
| ba8f1a6ffb | |||
| 2dd110c409 | |||
| c2029197d9 | |||
| 47e9b1fde7 | |||
| a652d28755 | |||
| 518818deb7 | |||
| 25817fa4c8 |
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "obsidian-skills",
|
||||||
|
"interface": {
|
||||||
|
"displayName": "Obsidian Skills"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "obsidian",
|
||||||
|
"source": {
|
||||||
|
"source": "local",
|
||||||
|
"path": "./plugins/obsidian"
|
||||||
|
},
|
||||||
|
"policy": {
|
||||||
|
"installation": "AVAILABLE",
|
||||||
|
"authentication": "ON_INSTALL"
|
||||||
|
},
|
||||||
|
"category": "Productivity"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-skills",
|
"name": "obsidian-skills",
|
||||||
|
"description": "Agent Skills for Obsidian Markdown, Bases, JSON Canvas, the Obsidian CLI, Obsidian Headless, Defuddle, and Knap.",
|
||||||
"owner": {
|
"owner": {
|
||||||
"name": "Steph Ango",
|
"name": "Obsidian",
|
||||||
"url": "https://stephango.com/"
|
"url": "https://obsidian.md/"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "obsidian",
|
"name": "obsidian",
|
||||||
"source": "./",
|
"source": "./plugins/obsidian",
|
||||||
"description": "Claude Skills for Obsidian",
|
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, Sync and Publish, web extraction, and templates.",
|
||||||
"version": "1.0.1"
|
"version": "1.2.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "obsidian",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"description": "Create and edit Obsidian vault files including Markdown, Bases, and Canvas. Use when working with .md, .base, or .canvas files in an Obsidian vault.",
|
|
||||||
"author": {
|
|
||||||
"name": "Steph Ango",
|
|
||||||
"url": "https://stephango.com/"
|
|
||||||
},
|
|
||||||
"repository": "https://github.com/kepano/obsidian-skills",
|
|
||||||
"license": "MIT",
|
|
||||||
"keywords": [
|
|
||||||
"obsidian",
|
|
||||||
"markdown",
|
|
||||||
"bases",
|
|
||||||
"canvas",
|
|
||||||
"pkm",
|
|
||||||
"notes"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "obsidian-skills",
|
||||||
|
"owner": {
|
||||||
|
"name": "Obsidian"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"description": "Agent Skills for Obsidian Markdown, Bases, JSON Canvas, the Obsidian CLI, Obsidian Headless, Defuddle, and Knap."
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "obsidian",
|
||||||
|
"source": "./plugins/obsidian",
|
||||||
|
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, Sync and Publish, web extraction, and templates."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,54 +4,88 @@ These skills follow the [Agent Skills specification](https://agentskills.io/spec
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Marketplace
|
### Claude Code marketplace
|
||||||
|
|
||||||
|
From terminal:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
claude plugin marketplace add obsidianmd/obsidian-skills
|
||||||
|
claude plugin install obsidian@obsidian-skills
|
||||||
```
|
```
|
||||||
/plugin marketplace add kepano/obsidian-skills
|
|
||||||
|
From within a Claude Code session:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
/plugin marketplace add obsidianmd/obsidian-skills
|
||||||
/plugin install obsidian@obsidian-skills
|
/plugin install obsidian@obsidian-skills
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To get new skills later, run `claude plugin update obsidian@obsidian-skills`.
|
||||||
|
|
||||||
|
### Codex marketplace
|
||||||
|
|
||||||
|
```sh
|
||||||
|
codex plugin marketplace add obsidianmd/obsidian-skills
|
||||||
|
```
|
||||||
|
|
||||||
|
Then install Obsidian from the plugin directory in Codex or the ChatGPT desktop app.
|
||||||
|
|
||||||
|
### Cursor
|
||||||
|
|
||||||
|
Install Obsidian from the [Cursor Marketplace](https://cursor.com/marketplace).
|
||||||
|
|
||||||
### npx skills
|
### npx skills
|
||||||
|
|
||||||
```
|
```sh
|
||||||
npx skills add git@github.com:kepano/obsidian-skills.git
|
npx skills add https://github.com/obsidianmd/obsidian-skills
|
||||||
```
|
```
|
||||||
|
|
||||||
Instead of ssh, if you prefer to use https:
|
To use ssh instead, if you have a GitHub SSH key set up:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
npx skills add https://github.com/kepano/obsidian-skills
|
npx skills add git@github.com:obsidianmd/obsidian-skills.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Manually
|
### Manually
|
||||||
|
|
||||||
#### Claude Code
|
#### Claude Code
|
||||||
|
|
||||||
Add the contents of this repo to a `/.claude` folder in the root of your Obsidian vault (or whichever folder you're using with Claude Code). See more in the [official Claude Skills documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).
|
Copy the `plugins/obsidian/skills/` directory to `.claude/skills/` in the root of your Obsidian vault (or whichever folder you're using with Claude Code). See more in the [official Claude Skills documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).
|
||||||
|
|
||||||
#### Codex
|
#### Codex
|
||||||
|
|
||||||
Copy the `skills/` directory into your Codex skills path (typically `~/.codex/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format.
|
Copy the `plugins/obsidian/skills/` directory into your Codex skills path (typically `~/.agents/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format.
|
||||||
|
|
||||||
#### OpenCode
|
#### OpenCode
|
||||||
|
|
||||||
Clone the entire repo into the OpenCode skills directory (`~/.opencode/skills/`):
|
Clone the entire repo into the OpenCode skills directory (`~/.opencode/skills/`):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/kepano/obsidian-skills.git ~/.opencode/skills/obsidian-skills
|
git clone https://github.com/obsidianmd/obsidian-skills.git ~/.opencode/skills/obsidian-skills
|
||||||
```
|
```
|
||||||
|
|
||||||
Do not copy only the inner `skills/` folder — clone the full repo so the directory structure is `~/.opencode/skills/obsidian-skills/skills/<skill-name>/SKILL.md`.
|
Do not copy only the inner `skills/` folder — clone the full repo so the directory structure is `~/.opencode/skills/obsidian-skills/plugins/obsidian/skills/<skill-name>/SKILL.md`.
|
||||||
|
|
||||||
OpenCode auto-discovers all `SKILL.md` files under `~/.opencode/skills/`. No changes to `opencode.json` or any config file are needed. Skills become available after restarting OpenCode.
|
OpenCode auto-discovers all `SKILL.md` files under `~/.opencode/skills/`. No changes to `opencode.json` or any config file are needed. Skills become available after restarting OpenCode.
|
||||||
|
|
||||||
|
## Release maintenance
|
||||||
|
|
||||||
|
Update the plugin version in every manifest with:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./scripts/bump.sh patch
|
||||||
|
```
|
||||||
|
|
||||||
|
The script also accepts `major`, `minor`, or an explicit version like `1.1.0`.
|
||||||
|
|
||||||
## Skills
|
## Skills
|
||||||
|
|
||||||
| Skill | Description |
|
| Skill | Description |
|
||||||
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| [obsidian-markdown](skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax |
|
| [obsidian-markdown](plugins/obsidian/skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax |
|
||||||
| [obsidian-bases](skills/obsidian-bases) | Create and edit [Obsidian Bases](https://help.obsidian.md/bases/syntax) (`.base`) with views, filters, formulas, and summaries |
|
| [obsidian-bases](plugins/obsidian/skills/obsidian-bases) | Create and edit [Obsidian Bases](https://help.obsidian.md/bases/syntax) (`.base`) with views, filters, formulas, and summaries |
|
||||||
| [json-canvas](skills/json-canvas) | Create and edit [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) with nodes, edges, groups, and connections |
|
| [json-canvas](plugins/obsidian/skills/json-canvas) | Create and edit [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) with nodes, edges, groups, and connections |
|
||||||
| [obsidian-cli](skills/obsidian-cli) | Interact with Obsidian vaults via the [Obsidian CLI](https://help.obsidian.md/cli) including plugin and theme development |
|
| [obsidian-cli](plugins/obsidian/skills/obsidian-cli) | Interact with Obsidian vaults via the [Obsidian CLI](https://help.obsidian.md/cli) including plugin and theme development |
|
||||||
| [defuddle](skills/defuddle) | Extract clean markdown from web pages using [Defuddle](https://github.com/kepano/defuddle), removing clutter to save tokens |
|
| [obsidian-headless](plugins/obsidian/skills/obsidian-headless) | Sync and publish vaults from the command line with [Obsidian Headless](https://help.obsidian.md/headless), without the desktop app |
|
||||||
| [knap](skills/knap) | Render Markdown templates from JSON or CSV data using [Knap](https://github.com/obsidianmd/knap), including batch file generation |
|
| [defuddle](plugins/obsidian/skills/defuddle) | Extract clean markdown from web pages using [Defuddle](https://github.com/kepano/defuddle), removing clutter to save tokens |
|
||||||
|
| [knap](plugins/obsidian/skills/knap) | Render Markdown templates from JSON or CSV data using [Knap](https://github.com/obsidianmd/knap), including batch file generation |
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "obsidian",
|
||||||
|
"version": "1.2.0",
|
||||||
|
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, Sync and Publish, web extraction, and templates.",
|
||||||
|
"author": {
|
||||||
|
"name": "Obsidian",
|
||||||
|
"url": "https://obsidian.md/"
|
||||||
|
},
|
||||||
|
"homepage": "https://obsidian.md/",
|
||||||
|
"repository": "https://github.com/obsidianmd/obsidian-skills",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"obsidian",
|
||||||
|
"markdown",
|
||||||
|
"bases",
|
||||||
|
"canvas",
|
||||||
|
"pkm",
|
||||||
|
"notes"
|
||||||
|
],
|
||||||
|
"icon": "./assets/icon.png"
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "obsidian",
|
||||||
|
"version": "1.2.0",
|
||||||
|
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, Sync and Publish, web extraction, and templates.",
|
||||||
|
"author": {
|
||||||
|
"name": "Obsidian"
|
||||||
|
},
|
||||||
|
"homepage": "https://obsidian.md/",
|
||||||
|
"repository": "https://github.com/obsidianmd/obsidian-skills",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"obsidian",
|
||||||
|
"markdown",
|
||||||
|
"bases",
|
||||||
|
"canvas",
|
||||||
|
"pkm",
|
||||||
|
"notes"
|
||||||
|
],
|
||||||
|
"logo": "assets/icon.png"
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Steph Ango (@kepano)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# Obsidian
|
||||||
|
|
||||||
|
Skills for working with Obsidian vaults: Obsidian Markdown, Bases, Canvas, the Obsidian CLI, Obsidian Headless, web pages, and templates.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
In Claude Code:
|
||||||
|
|
||||||
|
```
|
||||||
|
/plugin install obsidian --marketplace obsidianmd/obsidian-skills
|
||||||
|
```
|
||||||
|
|
||||||
|
In Codex, run `codex plugin marketplace add obsidianmd/obsidian-skills`, then install Obsidian from the plugin directory.
|
||||||
|
|
||||||
|
In Cursor, install Obsidian from the [Cursor Marketplace](https://cursor.com/marketplace).
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
The CLI skill runs the `obsidian` command, which needs the Obsidian desktop app installed, running, and with the CLI turned on. See https://help.obsidian.md/cli for setup. It needs a host that can run local commands, such as Claude Code, Codex, Cursor, or a desktop app session on your computer.
|
||||||
|
|
||||||
|
The Markdown, Bases, and Canvas skills only describe file formats, so they also work in chat.
|
||||||
|
|
||||||
|
Web extraction uses [Defuddle](https://github.com/kepano/defuddle), which fetches the page you ask for. Template rendering uses [Knap](https://github.com/obsidianmd/knap), which needs Node.js 20 or later. Sync and Publish use [Obsidian Headless](https://help.obsidian.md/headless), which needs Node.js 22 or later and a Sync or Publish subscription, and runs without the desktop app. None of these tools is bundled. When one is missing, the skill asks before installing it from npm.
|
||||||
|
|
||||||
|
## Included skills
|
||||||
|
|
||||||
|
- obsidian-cli: search, read, create, and manage notes through the running app.
|
||||||
|
- obsidian-headless: sync and publish vaults from the command line without the app.
|
||||||
|
- obsidian-markdown: Obsidian links, properties, callouts, and embeds.
|
||||||
|
- obsidian-bases: Bases files, views, filters, formulas, and summaries.
|
||||||
|
- json-canvas: Canvas files with nodes, edges, groups, and connections.
|
||||||
|
- defuddle: extract readable Markdown from public web pages.
|
||||||
|
- knap: render templates from structured data.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This plugin contains skills only, with no MCP server, hooks, or background processes. Using it can bring vault content you ask about into the conversation, and that content is processed by the AI model you use, not only on your computer.
|
||||||
|
|
||||||
|
Source: https://github.com/obsidianmd/obsidian-skills
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
||||||
|
"name": "obsidian",
|
||||||
|
"version": "1.2.0",
|
||||||
|
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, Sync and Publish, web extraction, and templates.",
|
||||||
|
"author": {
|
||||||
|
"name": "Obsidian",
|
||||||
|
"url": "https://obsidian.md/"
|
||||||
|
},
|
||||||
|
"homepage": "https://obsidian.md/",
|
||||||
|
"repository": "https://github.com/obsidianmd/obsidian-skills",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"obsidian",
|
||||||
|
"markdown",
|
||||||
|
"bases",
|
||||||
|
"canvas",
|
||||||
|
"pkm",
|
||||||
|
"notes"
|
||||||
|
],
|
||||||
|
"extensions": {
|
||||||
|
"com.openai": {
|
||||||
|
"requires_local_executor": true,
|
||||||
|
"interface": {
|
||||||
|
"displayName": "Obsidian",
|
||||||
|
"shortDescription": "Work with your local vault",
|
||||||
|
"longDescription": "Search, read, create, and organize notes in a local Obsidian vault. Create and edit Obsidian Markdown with links, properties, and callouts. This plugin also lets you build Bases views, Canvas diagrams, extract web pages to Markdown, render templates, and sync and publish vaults with Obsidian Headless.\n\nThis plugin is currently desktop-only and requires Obsidian to be open and running with the CLI enabled. In the future we will add MCP so you can interact with your vault remotely and in the ChatGPT mobile app.",
|
||||||
|
"category": "Productivity",
|
||||||
|
"developerName": "Obsidian",
|
||||||
|
"defaultPrompt": [
|
||||||
|
"Find notes about my current project and summarize the open tasks.",
|
||||||
|
"Create a reading list Base from the books in my vault.",
|
||||||
|
"Make a Canvas connecting the main ideas in these notes."
|
||||||
|
],
|
||||||
|
"websiteURL": "https://obsidian.md/",
|
||||||
|
"supportURL": "https://obsidian.md/help/",
|
||||||
|
"privacyPolicyURL": "https://obsidian.md/privacy",
|
||||||
|
"termsOfServiceURL": "https://obsidian.md/terms",
|
||||||
|
"logo": "./assets/icon.png",
|
||||||
|
"composerIcon": "./assets/icon.png",
|
||||||
|
"logoDark": "./assets/icon.png",
|
||||||
|
"composerIconDark": "./assets/icon.png",
|
||||||
|
"brandColor": "#6C31E3",
|
||||||
|
"brandColorDark": "#A882FF"
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"commerce": false,
|
||||||
|
"prompts": [
|
||||||
|
"Search my selected vault for project notes and summarize their open tasks with links to the sources.",
|
||||||
|
"Create a note in my selected vault with a summary, related-note links, and a status property.",
|
||||||
|
"Create a reading list Base with table and card views from the books in my selected vault.",
|
||||||
|
"Create a Canvas with three idea cards and labeled connections in my selected vault.",
|
||||||
|
"Extract this public article into Markdown and save it as a note in my selected vault.",
|
||||||
|
"Use my supplied Knap template and JSON data to create a note in my selected vault.",
|
||||||
|
"Read a note using the CLI while Obsidian is closed and explain what is needed to continue."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"publication": {
|
||||||
|
"countries": [],
|
||||||
|
"release_notes": "Adds an Obsidian Headless skill to sync and publish vaults without the desktop app, kanban views in Bases, and fixes for Bases display names and the CLI on WSL."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,9 +5,9 @@ description: Extract clean Markdown from HTML pages with Defuddle CLI.
|
|||||||
|
|
||||||
# Defuddle
|
# Defuddle
|
||||||
|
|
||||||
Use Defuddle CLI to extract clean readable content from web pages. Prefer over WebFetch for standard web pages — it removes navigation, ads, and clutter, reducing token usage.
|
Use Defuddle CLI when the user wants clean Markdown extracted from a web page. It removes navigation, ads, and other page clutter.
|
||||||
|
|
||||||
If not installed: `npm install -g defuddle`
|
Check availability with `defuddle --help`. If it is missing, explain the dependency and offer installation with `npm install -g defuddle`. Do not claim extraction succeeded if the tool is unavailable or returns an error.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -92,6 +92,10 @@ Nodes are objects placed on the canvas. Array order determines z-index: first no
|
|||||||
|
|
||||||
**Newline pitfall**: Use `\n` for line breaks in JSON strings. Do **not** use the literal `\\n` -- Obsidian renders that as the characters `\` and `n`.
|
**Newline pitfall**: Use `\n` for line breaks in JSON strings. Do **not** use the literal `\\n` -- Obsidian renders that as the characters `\` and `n`.
|
||||||
|
|
||||||
|
**Quote escaping pitfall**: Double quotes inside `text` content must be escaped as `\"`. For example, the text `公司的"外交官"` must be stored as `"text": "公司的\"外交官\""`. Unescaped quotes break the JSON parse and the canvas will fail to render. When generating canvas JSON programmatically, always use a JSON serializer rather than manual string concatenation.
|
||||||
|
|
||||||
|
Write `.canvas` files directly. Don't create them with `obsidian create content=`, which turns every `\n` into a raw newline and breaks the JSON.
|
||||||
|
|
||||||
### File Nodes
|
### File Nodes
|
||||||
|
|
||||||
| Attribute | Required | Type | Description |
|
| Attribute | Required | Type | Description |
|
||||||
@@ -99,6 +103,8 @@ Nodes are objects placed on the canvas. Array order determines z-index: first no
|
|||||||
| `file` | Yes | string | Path to file within the system |
|
| `file` | Yes | string | Path to file within the system |
|
||||||
| `subpath` | No | string | Link to heading or block (starts with `#`) |
|
| `subpath` | No | string | Link to heading or block (starts with `#`) |
|
||||||
|
|
||||||
|
**File path escaping**: If a file name contains double quotes, they must be escaped as `\"` in the JSON string. For example, a file named `My "Notes".md` should be referenced as `"file": "My \"Notes\".md"`.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"id": "a1b2c3d4e5f67890",
|
"id": "a1b2c3d4e5f67890",
|
||||||
@@ -211,13 +217,15 @@ Generate 16-character lowercase hexadecimal strings (64-bit random value):
|
|||||||
- Space nodes 50-100px apart; leave 20-50px padding inside groups
|
- Space nodes 50-100px apart; leave 20-50px padding inside groups
|
||||||
- Align to grid (multiples of 10 or 20) for cleaner layouts
|
- Align to grid (multiples of 10 or 20) for cleaner layouts
|
||||||
|
|
||||||
| Node Type | Suggested Width | Suggested Height |
|
| Node Type | Suggested Width | Suggested Height | CJK Width (1.5x) |
|
||||||
|-----------|-----------------|------------------|
|
|-----------|-----------------|------------------|-------------------|
|
||||||
| Small text | 200-300 | 80-150 |
|
| Small text | 200-300 | 80-150 | 300-450 |
|
||||||
| Medium text | 300-450 | 150-300 |
|
| Medium text | 300-450 | 150-300 | 450-675 |
|
||||||
| Large text | 400-600 | 300-500 |
|
| Large text | 400-600 | 300-500 | 600-900 |
|
||||||
| File preview | 300-500 | 200-400 |
|
| File preview | 300-500 | 200-400 | 450-750 |
|
||||||
| Link preview | 250-400 | 100-200 |
|
| Link preview | 250-400 | 100-200 | 375-600 |
|
||||||
|
|
||||||
|
**CJK text sizing**: CJK characters (Chinese, Japanese, Korean) are wider than Latin characters. For content primarily in CJK languages, multiply the suggested width by ~1.5× to avoid cramped layouts and awkward line breaks.
|
||||||
|
|
||||||
## Validation Checklist
|
## Validation Checklist
|
||||||
|
|
||||||
@@ -230,7 +238,8 @@ After creating or editing a canvas file, verify:
|
|||||||
5. `fromSide`/`toSide` values are one of: `top`, `right`, `bottom`, `left`
|
5. `fromSide`/`toSide` values are one of: `top`, `right`, `bottom`, `left`
|
||||||
6. `fromEnd`/`toEnd` values are one of: `none`, `arrow`
|
6. `fromEnd`/`toEnd` values are one of: `none`, `arrow`
|
||||||
7. Color presets are `"1"` through `"6"` or valid hex (e.g., `"#FF0000"`)
|
7. Color presets are `"1"` through `"6"` or valid hex (e.g., `"#FF0000"`)
|
||||||
8. JSON is valid and parseable
|
8. Double quotes in `text` and `file` values are properly escaped as `\"`
|
||||||
|
9. JSON is valid and parseable
|
||||||
|
|
||||||
If validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content).
|
If validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content).
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ description: Render Markdown from templates and structured data using Knap CLI.
|
|||||||
|
|
||||||
Use Knap CLI to render Markdown templates with variables, filters, and logic.
|
Use Knap CLI to render Markdown templates with variables, filters, and logic.
|
||||||
|
|
||||||
If not installed: `npm install -g knap` (requires Node.js 20 or later). Alternatively, use `npx knap`.
|
Check availability with `knap --help`. If it is missing, explain that Knap requires Node.js 20 or later and offer installation with `npm install -g knap` or execution with `npx knap`. Do not claim a template was rendered if the tool is unavailable or returns an error.
|
||||||
|
|
||||||
Run `knap --help` for available commands and options. Discover the language through the CLI's offline reference:
|
Run `knap --help` for available commands and options. Discover the language through the CLI's offline reference:
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: obsidian-bases
|
name: obsidian-bases
|
||||||
description: Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
|
description: Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, kanban boards, filters, or formulas in Obsidian.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Obsidian Bases Skill
|
# Obsidian Bases Skill
|
||||||
@@ -10,9 +10,9 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f
|
|||||||
1. **Create the file**: Create a `.base` file in the vault with valid YAML content
|
1. **Create the file**: Create a `.base` file in the vault with valid YAML content
|
||||||
2. **Define scope**: Add `filters` to select which notes appear (by tag, folder, property, or date)
|
2. **Define scope**: Add `filters` to select which notes appear (by tag, folder, property, or date)
|
||||||
3. **Add formulas** (optional): Define computed properties in the `formulas` section
|
3. **Add formulas** (optional): Define computed properties in the `formulas` section
|
||||||
4. **Configure views**: Add one or more views (`table`, `cards`, `list`, or `map`) with `order` specifying which properties to display
|
4. **Configure views**: Add one or more views (`table`, `cards`, `list`, `map`, or `kanban`) with `order` specifying which properties to display
|
||||||
5. **Validate**: Verify the file is valid YAML with no syntax errors. Check that all referenced properties and formulas exist. Common issues: unquoted strings containing special YAML characters, mismatched quotes in formula expressions, referencing `formula.X` without defining `X` in `formulas`
|
5. **Validate**: Verify the file is valid YAML with no syntax errors. Check that all referenced properties and formulas exist. Common issues: unquoted strings containing special YAML characters, mismatched quotes in formula expressions, referencing `formula.X` without defining `X` in `formulas`
|
||||||
6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below
|
6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below. If it doesn't open as a base at all, check that Bases is turned on in Settings → Core plugins
|
||||||
|
|
||||||
## Schema
|
## Schema
|
||||||
|
|
||||||
@@ -32,9 +32,10 @@ filters:
|
|||||||
formulas:
|
formulas:
|
||||||
formula_name: 'expression'
|
formula_name: 'expression'
|
||||||
|
|
||||||
# Configure display names and settings for properties
|
# Configure display names and settings for properties.
|
||||||
|
# Note properties need the `note.` prefix here, or the setting is ignored.
|
||||||
properties:
|
properties:
|
||||||
property_name:
|
note.property_name:
|
||||||
displayName: "Display Name"
|
displayName: "Display Name"
|
||||||
formula.formula_name:
|
formula.formula_name:
|
||||||
displayName: "Formula Display Name"
|
displayName: "Formula Display Name"
|
||||||
@@ -47,12 +48,18 @@ summaries:
|
|||||||
|
|
||||||
# Define one or more views
|
# Define one or more views
|
||||||
views:
|
views:
|
||||||
- type: table | cards | list | map
|
- type: table | cards | list | map | kanban
|
||||||
name: "View Name"
|
name: "View Name"
|
||||||
limit: 10 # Optional: limit results
|
limit: 10 # Optional: limit results
|
||||||
groupBy: # Optional: group results
|
groupBy: # Optional: group results
|
||||||
property: property_name
|
property: property_name
|
||||||
direction: ASC | DESC
|
direction: ASC | DESC
|
||||||
|
groupOrder: # Optional: only these groups, in this order
|
||||||
|
- value_one
|
||||||
|
- null # Files with no value for the groupBy property
|
||||||
|
sort: # Optional: sort results (supports multiple properties)
|
||||||
|
- property: property_name
|
||||||
|
direction: ASC | DESC
|
||||||
filters: # View-specific filters follow the same rules
|
filters: # View-specific filters follow the same rules
|
||||||
and:
|
and:
|
||||||
- 'status == "active"'
|
- 'status == "active"'
|
||||||
@@ -125,6 +132,8 @@ filters:
|
|||||||
2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
|
2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
|
||||||
3. **Formula properties** - Computed values: `formula.my_formula`
|
3. **Formula properties** - Computed values: `formula.my_formula`
|
||||||
|
|
||||||
|
In `order`, `filters`, `groupBy`, and `sort`, a note property can be written bare (`author`) or prefixed (`note.author`). In the top-level `properties:` section, always write `note.author`, because Obsidian ignores a bare key there and shows the raw name as the column header.
|
||||||
|
|
||||||
### File Properties Reference
|
### File Properties Reference
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
@@ -139,9 +148,10 @@ filters:
|
|||||||
| `file.mtime` | Date | Modified time |
|
| `file.mtime` | Date | Modified time |
|
||||||
| `file.tags` | List | All tags in file |
|
| `file.tags` | List | All tags in file |
|
||||||
| `file.links` | List | Internal links in file |
|
| `file.links` | List | Internal links in file |
|
||||||
| `file.backlinks` | List | Files linking to this file |
|
| `file.backlinks` | List | Files linking to this file. Slow in large vaults and doesn't refresh when the vault changes; prefer reversing the lookup with `file.links` |
|
||||||
| `file.embeds` | List | Embeds in the note |
|
| `file.embeds` | List | Embeds in the note |
|
||||||
| `file.properties` | Object | All frontmatter properties |
|
| `file.properties` | Object | All frontmatter properties. Doesn't refresh when the vault changes |
|
||||||
|
| `file.file` | File | File object, only usable in specific functions |
|
||||||
|
|
||||||
### The `this` Keyword
|
### The `this` Keyword
|
||||||
|
|
||||||
@@ -257,6 +267,26 @@ views:
|
|||||||
- status
|
- status
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Kanban View
|
||||||
|
|
||||||
|
Requires Obsidian 1.14+. Cards are grouped into columns by the `groupBy` property, which a kanban view needs. `groupOrder` sets which columns show and in what order; use `null` to include files with no value. Without `groupOrder`, every value gets a column. Dragging a card to another column updates that property in the note. Only Markdown notes can be moved, except when grouping by `file.folder`, where moving a card moves the file to that folder. When grouping by a formula or by a file property other than `file.folder`, cards and columns can't be moved and notes can't be created from a column.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
views:
|
||||||
|
- type: kanban
|
||||||
|
name: "Projects"
|
||||||
|
groupBy:
|
||||||
|
property: note.status
|
||||||
|
direction: ASC
|
||||||
|
groupOrder:
|
||||||
|
- Planned
|
||||||
|
- In progress
|
||||||
|
- Done
|
||||||
|
order:
|
||||||
|
- file.name
|
||||||
|
- due_date
|
||||||
|
```
|
||||||
|
|
||||||
### Map View
|
### Map View
|
||||||
|
|
||||||
Requires latitude/longitude properties and the Maps community plugin.
|
Requires latitude/longitude properties and the Maps community plugin.
|
||||||
@@ -268,6 +298,35 @@ views:
|
|||||||
# Map-specific settings for lat/lng properties
|
# Map-specific settings for lat/lng properties
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Sorting
|
||||||
|
|
||||||
|
Sort results by one or more properties. Each sort entry specifies a `property` and `direction`, which must be uppercase `ASC` or `DESC`; an entry with any other value, or a sort written as a string, is silently ignored. Multiple sort entries are applied in order — the first entry is the primary sort key, subsequent entries break ties.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
views:
|
||||||
|
- type: table
|
||||||
|
name: "Sorted Tasks"
|
||||||
|
sort:
|
||||||
|
- property: due
|
||||||
|
direction: ASC
|
||||||
|
- property: file.name
|
||||||
|
direction: ASC
|
||||||
|
order:
|
||||||
|
- file.name
|
||||||
|
- due
|
||||||
|
- status
|
||||||
|
```
|
||||||
|
|
||||||
|
Sort options depend on the property type:
|
||||||
|
|
||||||
|
| Property Type | ASC | DESC |
|
||||||
|
|---------------|-----|------|
|
||||||
|
| Text | A→Z | Z→A |
|
||||||
|
| Number | 0→9 | 9→0 |
|
||||||
|
| Date | Old→New | New→Old |
|
||||||
|
|
||||||
|
You can sort by any property including formulas (`formula.my_formula`), file properties (`file.mtime`), and note properties.
|
||||||
|
|
||||||
## Default Summary Formulas
|
## Default Summary Formulas
|
||||||
|
|
||||||
| Name | Input Type | Description |
|
| Name | Input Type | Description |
|
||||||
@@ -304,7 +363,7 @@ formulas:
|
|||||||
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
|
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
status:
|
note.status:
|
||||||
displayName: Status
|
displayName: Status
|
||||||
formula.days_until_due:
|
formula.days_until_due:
|
||||||
displayName: "Days Until Due"
|
displayName: "Days Until Due"
|
||||||
@@ -326,6 +385,11 @@ views:
|
|||||||
groupBy:
|
groupBy:
|
||||||
property: status
|
property: status
|
||||||
direction: ASC
|
direction: ASC
|
||||||
|
sort:
|
||||||
|
- property: due
|
||||||
|
direction: ASC
|
||||||
|
- property: file.name
|
||||||
|
direction: ASC
|
||||||
summaries:
|
summaries:
|
||||||
formula.days_until_due: Average
|
formula.days_until_due: Average
|
||||||
|
|
||||||
@@ -353,10 +417,10 @@ formulas:
|
|||||||
year_read: 'if(finished_date, date(finished_date).year, "")'
|
year_read: 'if(finished_date, date(finished_date).year, "")'
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
author:
|
note.author:
|
||||||
displayName: Author
|
displayName: Author
|
||||||
formula.status_icon:
|
formula.status_icon:
|
||||||
displayName: ""
|
displayName: "Status"
|
||||||
formula.reading_time:
|
formula.reading_time:
|
||||||
displayName: "Est. Time"
|
displayName: "Est. Time"
|
||||||
|
|
||||||
@@ -415,7 +479,9 @@ views:
|
|||||||
|
|
||||||
## Embedding Bases
|
## Embedding Bases
|
||||||
|
|
||||||
Embed in Markdown files:
|
### Embed a `.base` file
|
||||||
|
|
||||||
|
Embed an external `.base` file in any Markdown note:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
![[MyBase.base]]
|
![[MyBase.base]]
|
||||||
@@ -424,6 +490,26 @@ Embed in Markdown files:
|
|||||||
![[MyBase.base#View Name]]
|
![[MyBase.base#View Name]]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Embed inline with a code block
|
||||||
|
|
||||||
|
Bases can also be embedded **inline** directly inside a note using a `base` fenced code block. This is useful for note-level filters (e.g. using `this.file.links`) and avoids creating a separate `.base` file:
|
||||||
|
|
||||||
|
````markdown
|
||||||
|
```base
|
||||||
|
filters:
|
||||||
|
and:
|
||||||
|
- file.hasTag("example")
|
||||||
|
views:
|
||||||
|
- type: table
|
||||||
|
name: Table
|
||||||
|
order:
|
||||||
|
- file.name
|
||||||
|
- status
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
When embedded inline this way, the `this` keyword refers to the containing note, so you can build per-note views such as showing all notes linked from the current file.
|
||||||
|
|
||||||
## YAML Quoting Rules
|
## YAML Quoting Rules
|
||||||
|
|
||||||
- Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'`
|
- Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'`
|
||||||
@@ -434,7 +520,7 @@ Embed in Markdown files:
|
|||||||
|
|
||||||
### YAML Syntax Errors
|
### YAML Syntax Errors
|
||||||
|
|
||||||
**Unquoted special characters**: Strings containing `:`, `{`, `}`, `[`, `]`, `,`, `&`, `*`, `#`, `?`, `|`, `-`, `<`, `>`, `=`, `!`, `%`, `@`, `` ` `` must be quoted.
|
**Unquoted special characters**: Strings containing `:`, `{`, `}`, `[`, `]`, `,`, `&`, `*`, `#`, `?`, `|`, `-`, `<`, `>`, `=`, `%`, `@`, `` ` ``, `!` must be quoted.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# WRONG - colon in unquoted string
|
# WRONG - colon in unquoted string
|
||||||
@@ -478,6 +564,22 @@ formulas:
|
|||||||
'if(due_date, (date(due_date) - today()).days, "")'
|
'if(due_date, (date(due_date) - today()).days, "")'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**`displayName` ignored, column shows the raw name**: prefix note properties with `note.` in the `properties:` section.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# WRONG - displayName ignored, column header shows "status"
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
displayName: Status
|
||||||
|
|
||||||
|
# CORRECT - column header shows "Status"
|
||||||
|
properties:
|
||||||
|
note.status:
|
||||||
|
displayName: Status
|
||||||
|
```
|
||||||
|
|
||||||
|
**Empty `displayName` doesn't hide a header**: `displayName: ""` falls back to the property name, the same as leaving it out, so `formula.status_icon` shows `status_icon`. Use a non-empty name such as `displayName: "Status"`.
|
||||||
|
|
||||||
**Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`.
|
**Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
name: obsidian-cli
|
||||||
|
description: Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Obsidian CLI
|
||||||
|
|
||||||
|
Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open.
|
||||||
|
|
||||||
|
## Before using the CLI
|
||||||
|
|
||||||
|
Run `obsidian help` to check availability. If the command is missing, explain how to turn on the CLI using https://help.obsidian.md/cli. The `obsidian` command ships with the Obsidian installer; don't install the unrelated npm package `obsidian-cli`. If it can't find Obsidian, ask the user to open the desktop app, then retry. In a sandboxed shell the same message can mean the sandbox blocked the CLI's local socket.
|
||||||
|
|
||||||
|
On WSL, run `Obsidian.com` from the Windows install folder, not `Obsidian.exe`. `Obsidian.com` is the console wrapper that prints the output; `Obsidian.exe` exits without printing anything.
|
||||||
|
|
||||||
|
The CLI exits with status 0 even when a command fails, so read its output before reporting that a command succeeded.
|
||||||
|
|
||||||
|
Quote parameters for the current shell, and pass note text as literal argument data, never as executable shell syntax.
|
||||||
|
|
||||||
|
## Command reference
|
||||||
|
|
||||||
|
Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli
|
||||||
|
|
||||||
|
## Syntax
|
||||||
|
|
||||||
|
**Parameters** take a value with `=`. Quote values with spaces:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian create name="My Note" content="Hello world"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Flags** are boolean switches with no value:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian create name="My Note" open overwrite
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `overwrite` only when replacing an existing file is intended.
|
||||||
|
|
||||||
|
Opening is opt-in: pass `open` to open the file, and add `newtab` to open it in a new tab. There is no `silent` flag.
|
||||||
|
|
||||||
|
In `content=`, `\n` becomes a newline and `\t` a tab. Every `\n` and `\t` is converted and there's no escape, so text such as the LaTeX `\theta` or the path `C:\notes` is corrupted. Write content that contains backslashes, or is longer than about 4 KB, directly to the note's file instead.
|
||||||
|
|
||||||
|
A dot in a file name is read as the start of an extension. When a name contains a dot, include the extension: `create name="Meeting 2026.11.06.md"`, `rename name="v1.2 notes.md"`, `move to="Archive 2026.10/Note.md"`.
|
||||||
|
|
||||||
|
## File targeting
|
||||||
|
|
||||||
|
Many commands accept `file` or `path` to target a file. Without either, the active file is used.
|
||||||
|
|
||||||
|
- `file=<name>` — resolves like a wikilink (name only, no path needed). `.md` is optional; other file types need their extension, e.g. `file="Projects.base"`. Aliases don't resolve.
|
||||||
|
- `path=<path>` — exact path from vault root, e.g. `folder/note.md`
|
||||||
|
|
||||||
|
## Vault targeting
|
||||||
|
|
||||||
|
Without `vault=`, commands target the vault that contains the current directory, then the most recently focused vault. `vault=<name>` only works as the first parameter; anywhere else it's ignored:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian vault="My Vault" search query="test"
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `vault=` when the user has selected a vault. If the target is unclear and the user has several vaults, ask which one before changing files.
|
||||||
|
|
||||||
|
## Common patterns
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian read file="My Note"
|
||||||
|
obsidian create name="New Note" template="Template" # a template replaces content=
|
||||||
|
obsidian create name="New Note" content="# Hello" open # also open in Obsidian
|
||||||
|
obsidian append file="My Note" content="New line"
|
||||||
|
obsidian rename path="folder/note.md" name="New name"
|
||||||
|
obsidian move path="folder/note.md" to="archive/"
|
||||||
|
obsidian delete path="folder/note.md"
|
||||||
|
obsidian search query="search term" limit=10
|
||||||
|
obsidian daily:read
|
||||||
|
obsidian daily:append content="- [ ] New task"
|
||||||
|
obsidian property:set name="status" value="done" file="My Note"
|
||||||
|
obsidian tasks daily todo
|
||||||
|
obsidian tags sort=count counts
|
||||||
|
obsidian backlinks file="My Note"
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `rename` and `move`, not filesystem `mv` or `obsidian eval`, so Obsidian can update links to the file. If other notes link to it and Settings → Files and links → Automatically update internal links is off, Obsidian asks in a dialog and the command waits until someone answers. `delete` moves the file to the trash; don't pass `permanent` unless the user asks for it. Prefer `create` and `append` over `eval` for writing note bodies.
|
||||||
|
|
||||||
|
Use `total` on list commands to get a count.
|
||||||
|
|
||||||
|
**Output options placement:** `--copy`, `--json`, `--md`, `--tsv`, and `--csv` only work **after** the command name. Putting them before the command (or before `vault=`) fails — often as `Command "--copy" not found` — because the first token is treated as the command. Prefer `vault=` first when used; put double-dash options last:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian tasks todo total --copy
|
||||||
|
obsidian vault="My Vault" search query="TODO" --copy
|
||||||
|
obsidian tasks todo format=json # many list commands also accept format=
|
||||||
|
# Wrong: obsidian --copy vault="My Vault" tasks todo
|
||||||
|
```
|
||||||
|
|
||||||
|
## Plugin development
|
||||||
|
|
||||||
|
### Develop/test cycle
|
||||||
|
|
||||||
|
Turn on console capture once with `obsidian dev:debug on`, so messages from the reload are kept. After making code changes to a plugin or theme, follow this workflow:
|
||||||
|
|
||||||
|
1. **Reload** the plugin to pick up changes:
|
||||||
|
```bash
|
||||||
|
obsidian plugin:reload id=my-plugin
|
||||||
|
```
|
||||||
|
2. **Check for errors** — if errors appear, fix and repeat from step 1:
|
||||||
|
```bash
|
||||||
|
obsidian dev:errors
|
||||||
|
```
|
||||||
|
3. **Verify visually** with a screenshot or DOM inspection:
|
||||||
|
```bash
|
||||||
|
obsidian dev:screenshot
|
||||||
|
obsidian dev:dom selector=".workspace-leaf" text
|
||||||
|
```
|
||||||
|
4. **Check console output** for warnings or unexpected logs:
|
||||||
|
```bash
|
||||||
|
obsidian dev:console level=error
|
||||||
|
```
|
||||||
|
|
||||||
|
`dev:screenshot` saves to a temporary file and prints its path. A relative `path=` saves inside the vault.
|
||||||
|
|
||||||
|
### Additional developer commands
|
||||||
|
|
||||||
|
Run JavaScript in the app context (prefer dedicated commands like `rename`, `move`, `create`, and `append` for vault mutations):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian eval code="app.vault.getFiles().length"
|
||||||
|
```
|
||||||
|
|
||||||
|
Inspect CSS values:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian dev:css selector=".workspace-leaf" prop=background-color
|
||||||
|
```
|
||||||
|
|
||||||
|
Toggle mobile emulation:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
obsidian dev:mobile on
|
||||||
|
```
|
||||||
|
|
||||||
|
Run `obsidian help` to see additional developer commands including CDP and debugger controls.
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
---
|
||||||
|
name: obsidian-headless
|
||||||
|
description: Sync and publish Obsidian vaults from the command line with Obsidian Headless (`ob`), without the desktop app. Use when the user wants to set up or run Obsidian Sync or Obsidian Publish on a server, in CI, or from a terminal, or change a vault's Sync or Publish settings.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Obsidian Headless
|
||||||
|
|
||||||
|
Use Obsidian Headless (`ob`) to run Obsidian Sync and Obsidian Publish from the command line. It doesn't need the desktop app, so it works on servers, in CI, and in sandboxes. It's in open beta. Docs: https://help.obsidian.md/headless
|
||||||
|
|
||||||
|
`ob` only syncs and publishes files. To read or change notes without the app, edit the files directly and follow the obsidian-markdown skill. To control a running desktop app, use the obsidian-cli skill.
|
||||||
|
|
||||||
|
## Before using ob
|
||||||
|
|
||||||
|
Check availability with `ob --help`. If it is missing, explain that Obsidian Headless requires Node.js 22 or later and offer installation with `npm install -g obsidian-headless`. Run `ob <command> --help` for a command's options.
|
||||||
|
|
||||||
|
Sync and Publish each need an active subscription on the user's account.
|
||||||
|
|
||||||
|
Most commands accept `--json` for machine-readable output.
|
||||||
|
|
||||||
|
## Log in
|
||||||
|
|
||||||
|
`ob login` prints the account when already logged in. Otherwise it prompts for email, password, and a 2FA code, so ask the user to run it in their own terminal. Don't ask for their password or pass it with `--password`. `ob logout` clears the stored credentials.
|
||||||
|
|
||||||
|
## Vault paths
|
||||||
|
|
||||||
|
Commands act on the vault in the current directory, or the one given with `--path`. Pass `--path` so the target is explicit. Before a command that changes remote state, confirm the vault, site, and path from list or status output.
|
||||||
|
|
||||||
|
## Sync
|
||||||
|
|
||||||
|
Don't use the desktop app's Sync and Headless Sync for the same vault on the same device, because they cause conflicts. Ask the user to back up the vault folder before the first sync.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ob sync-list-remote # remote vaults, including shared ones
|
||||||
|
ob sync-list-local # vaults set up on this machine
|
||||||
|
ob sync-setup --vault "Research" --path ~/vaults/research
|
||||||
|
ob sync --path ~/vaults/research # sync once
|
||||||
|
ob sync --path ~/vaults/research --continuous # keep syncing as files change
|
||||||
|
ob sync-status --path ~/vaults/research
|
||||||
|
ob sync-unlink --path ~/vaults/research # disconnect and remove stored credentials
|
||||||
|
```
|
||||||
|
|
||||||
|
`--vault` takes a remote vault's name or ID. For an end-to-end encrypted vault, `sync-setup` prompts for the encryption password, so let the user enter it. Set `--device-name` to label this machine in version history.
|
||||||
|
|
||||||
|
`--continuous` runs until stopped, so start it in the background or as a service.
|
||||||
|
|
||||||
|
`ob sync-create-remote --name "Research"` creates a remote vault. Add `--encryption e2ee` for end-to-end encryption or `--encryption standard` for managed encryption.
|
||||||
|
|
||||||
|
### Sync settings
|
||||||
|
|
||||||
|
`ob sync-config --path <vault>` prints the vault's settings. Change them with:
|
||||||
|
|
||||||
|
- `--mode bidirectional|pull-only|mirror-remote`. `pull-only` ignores local changes and `mirror-remote` reverts them, so confirm before setting either.
|
||||||
|
- `--conflict-strategy merge|conflict`
|
||||||
|
- `--excluded-folders "Archive,Templates"`
|
||||||
|
- `--file-types image,audio,video,pdf,unsupported` for the attachment types to sync.
|
||||||
|
- `--configs` for the settings categories to sync, e.g. `app,appearance,core-plugin`.
|
||||||
|
- `--config-dir` when the vault's configuration folder isn't `.obsidian`.
|
||||||
|
|
||||||
|
An empty string clears a list option, e.g. `--excluded-folders ""`.
|
||||||
|
|
||||||
|
## Publish
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ob publish-list-sites
|
||||||
|
ob publish-setup --site my-notes --path ~/vaults/research
|
||||||
|
ob publish --path ~/vaults/research --dry-run
|
||||||
|
ob publish --path ~/vaults/research --yes
|
||||||
|
```
|
||||||
|
|
||||||
|
`ob publish` includes only notes with `publish: true` in their properties. `--all` includes every file, so use it only when the user asks. Run `--dry-run` first and show the user the changes. Without `--yes`, `ob publish` waits for confirmation, so pass `--yes` once the user approves or for an unattended job they set up.
|
||||||
|
|
||||||
|
`ob publish-create-site --slug my-notes` creates a site at `publish.obsidian.md/my-notes`.
|
||||||
|
|
||||||
|
Run these with no options to print the current settings:
|
||||||
|
|
||||||
|
- `ob publish-config` sets folders to include or exclude with `--includes` and `--excludes`.
|
||||||
|
- `ob publish-site-options` sets the site name, home page, navigation, theme, and other display options. Run `ob publish-site-options --help` for the full list.
|
||||||
|
|
||||||
|
`ob publish-unlink` disconnects the vault from its site.
|
||||||
+8
-2
@@ -27,6 +27,9 @@ Create and edit valid Obsidian Flavored Markdown. Obsidian extends CommonMark an
|
|||||||
[[Note Name#^block-id]] Link to block
|
[[Note Name#^block-id]] Link to block
|
||||||
[[#Heading in same note]] Same-note heading link
|
[[#Heading in same note]] Same-note heading link
|
||||||
```
|
```
|
||||||
|
Inside Markdown tables, escape wikilink alias pipes as `[[Note\|Alias]]` so the alias separator is not parsed as a table cell delimiter. When a table follows a paragraph, leave a blank line above it, or it renders as plain text.
|
||||||
|
|
||||||
|
Links resolve by file name, not by the `aliases` property. A bare `[[Alias]]` stays unresolved; write `[[Note|Alias]]` to show an alias.
|
||||||
|
|
||||||
Define a block ID by appending `^block-id` to any paragraph:
|
Define a block ID by appending `^block-id` to any paragraph:
|
||||||
|
|
||||||
@@ -89,7 +92,7 @@ cssclasses:
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
Default properties: `tags` (searchable labels), `aliases` (alternative note names for link suggestions), `cssclasses` (CSS classes for styling).
|
Default properties: `tags` (searchable labels), `aliases` (alternative names offered in link suggestions; links still use the file name), `cssclasses` (CSS classes for styling).
|
||||||
|
|
||||||
See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax rules, and advanced usage.
|
See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax rules, and advanced usage.
|
||||||
|
|
||||||
@@ -100,7 +103,7 @@ See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax
|
|||||||
#nested/tag Nested tag with hierarchy
|
#nested/tag Nested tag with hierarchy
|
||||||
```
|
```
|
||||||
|
|
||||||
Tags can contain letters, numbers (not first character), underscores, hyphens, and forward slashes. Tags can also be defined in frontmatter under the `tags` property.
|
Tags can contain letters, numbers, underscores, hyphens, and forward slashes, but must include at least one non-numerical character (`#1984` is invalid, `#1984book` is valid). A space ends a tag, so `#my tag` is the tag `#my`. Tags can also be defined in frontmatter under the `tags` property.
|
||||||
|
|
||||||
## Comments
|
## Comments
|
||||||
|
|
||||||
@@ -116,8 +119,11 @@ This entire block is hidden in reading view.
|
|||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
==Highlighted text== Highlight syntax
|
==Highlighted text== Highlight syntax
|
||||||
|
==🔴Highlighted text== Colored highlight (Obsidian 1.14.1 and later)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
A colored highlight starts with 🔴, 🟠, 🟡, 🟢, 🔵 or 🟣 (or the matching square) right after `==`. Other emoji stay as text.
|
||||||
|
|
||||||
## Math (LaTeX)
|
## Math (LaTeX)
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
+5
-3
@@ -31,12 +31,14 @@ due: 2024-02-01T14:30:00
|
|||||||
| Date | `date: 2024-01-15` |
|
| Date | `date: 2024-01-15` |
|
||||||
| Date & Time | `due: 2024-01-15T14:30:00` |
|
| Date & Time | `due: 2024-01-15T14:30:00` |
|
||||||
| List | `tags: [one, two]` or YAML list |
|
| List | `tags: [one, two]` or YAML list |
|
||||||
| Links | `related: "[[Other Note]]"` |
|
| Tags | Only for the `tags` property |
|
||||||
|
|
||||||
|
Links go in Text or List properties: `related: "[[Other Note]]"`. Always quote wikilinks in YAML, because an unquoted `[[Other Note]]` is read as a nested list, not a link.
|
||||||
|
|
||||||
## Default Properties
|
## Default Properties
|
||||||
|
|
||||||
- `tags` - Note tags (searchable, shown in graph view)
|
- `tags` - Note tags (searchable, shown in graph view)
|
||||||
- `aliases` - Alternative names for the note (used in link suggestions)
|
- `aliases` - Alternative names for the note, offered in link suggestions. A bare `[[Alias]]` doesn't resolve; write `[[Note|Alias]]`
|
||||||
- `cssclasses` - CSS classes applied to the note in reading/editing view
|
- `cssclasses` - CSS classes applied to the note in reading/editing view
|
||||||
|
|
||||||
## Tags
|
## Tags
|
||||||
@@ -48,7 +50,7 @@ due: 2024-02-01T14:30:00
|
|||||||
#tag_with_underscores
|
#tag_with_underscores
|
||||||
```
|
```
|
||||||
|
|
||||||
Tags can contain: letters (any language), numbers (not first character), underscores `_`, hyphens `-`, forward slashes `/` (for nesting).
|
Tags can contain: letters (any language), numbers, underscores `_`, hyphens `-`, forward slashes `/` (for nesting). A tag needs at least one non-numerical character (`#1984book`, not `#1984`), and a space ends it.
|
||||||
|
|
||||||
In frontmatter:
|
In frontmatter:
|
||||||
|
|
||||||
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
if [[ $# -ne 1 ]]; then
|
||||||
|
echo "Usage: $0 <major|minor|patch|x.y.z>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
files=(
|
||||||
|
"plugins/obsidian/plugin.json"
|
||||||
|
"plugins/obsidian/.claude-plugin/plugin.json"
|
||||||
|
"plugins/obsidian/.cursor-plugin/plugin.json"
|
||||||
|
".claude-plugin/marketplace.json"
|
||||||
|
)
|
||||||
|
|
||||||
|
current_version="$(sed -nE 's/^[[:space:]]*"version": "([0-9]+\.[0-9]+\.[0-9]+)".*/\1/p' "${files[0]}" | head -n 1)"
|
||||||
|
IFS=. read -r major minor patch <<< "$current_version"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
major) new_version="$((major + 1)).0.0" ;;
|
||||||
|
minor) new_version="$major.$((minor + 1)).0" ;;
|
||||||
|
patch) new_version="$major.$minor.$((patch + 1))" ;;
|
||||||
|
*)
|
||||||
|
if [[ "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
new_version="$1"
|
||||||
|
else
|
||||||
|
echo "Usage: $0 <major|minor|patch|x.y.z>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
perl -0pi -e "s/\"version\": \"[0-9]+\\.[0-9]+\\.[0-9]+\"/\"version\": \"$new_version\"/" "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Updated version: $current_version -> $new_version"
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
---
|
|
||||||
name: obsidian-cli
|
|
||||||
description: Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Obsidian CLI
|
|
||||||
|
|
||||||
Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open.
|
|
||||||
|
|
||||||
## Command reference
|
|
||||||
|
|
||||||
Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli
|
|
||||||
|
|
||||||
## Syntax
|
|
||||||
|
|
||||||
**Parameters** take a value with `=`. Quote values with spaces:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian create name="My Note" content="Hello world"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Flags** are boolean switches with no value:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian create name="My Note" silent overwrite
|
|
||||||
```
|
|
||||||
|
|
||||||
For multiline content use `\n` for newline and `\t` for tab.
|
|
||||||
|
|
||||||
## File targeting
|
|
||||||
|
|
||||||
Many commands accept `file` or `path` to target a file. Without either, the active file is used.
|
|
||||||
|
|
||||||
- `file=<name>` — resolves like a wikilink (name only, no path or extension needed)
|
|
||||||
- `path=<path>` — exact path from vault root, e.g. `folder/note.md`
|
|
||||||
|
|
||||||
## Vault targeting
|
|
||||||
|
|
||||||
Commands target the most recently focused vault by default. Use `vault=<name>` as the first parameter to target a specific vault:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian vault="My Vault" search query="test"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Common patterns
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian read file="My Note"
|
|
||||||
obsidian create name="New Note" content="# Hello" template="Template" silent
|
|
||||||
obsidian append file="My Note" content="New line"
|
|
||||||
obsidian search query="search term" limit=10
|
|
||||||
obsidian daily:read
|
|
||||||
obsidian daily:append content="- [ ] New task"
|
|
||||||
obsidian property:set name="status" value="done" file="My Note"
|
|
||||||
obsidian tasks daily todo
|
|
||||||
obsidian tags sort=count counts
|
|
||||||
obsidian backlinks file="My Note"
|
|
||||||
```
|
|
||||||
|
|
||||||
Use `--copy` on any command to copy output to clipboard. Use `silent` to prevent files from opening. Use `total` on list commands to get a count.
|
|
||||||
|
|
||||||
## Plugin development
|
|
||||||
|
|
||||||
### Develop/test cycle
|
|
||||||
|
|
||||||
After making code changes to a plugin or theme, follow this workflow:
|
|
||||||
|
|
||||||
1. **Reload** the plugin to pick up changes:
|
|
||||||
```bash
|
|
||||||
obsidian plugin:reload id=my-plugin
|
|
||||||
```
|
|
||||||
2. **Check for errors** — if errors appear, fix and repeat from step 1:
|
|
||||||
```bash
|
|
||||||
obsidian dev:errors
|
|
||||||
```
|
|
||||||
3. **Verify visually** with a screenshot or DOM inspection:
|
|
||||||
```bash
|
|
||||||
obsidian dev:screenshot path=screenshot.png
|
|
||||||
obsidian dev:dom selector=".workspace-leaf" text
|
|
||||||
```
|
|
||||||
4. **Check console output** for warnings or unexpected logs:
|
|
||||||
```bash
|
|
||||||
obsidian dev:console level=error
|
|
||||||
```
|
|
||||||
|
|
||||||
### Additional developer commands
|
|
||||||
|
|
||||||
Run JavaScript in the app context:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian eval code="app.vault.getFiles().length"
|
|
||||||
```
|
|
||||||
|
|
||||||
Inspect CSS values:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian dev:css selector=".workspace-leaf" prop=background-color
|
|
||||||
```
|
|
||||||
|
|
||||||
Toggle mobile emulation:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
obsidian dev:mobile on
|
|
||||||
```
|
|
||||||
|
|
||||||
Run `obsidian help` to see additional developer commands including CDP and debugger controls.
|
|
||||||
Reference in New Issue
Block a user