Sync with upstream #1

Open
kaiwu wants to merge 24 commits from Selig/openclaw-skill:main into main
5 changed files with 513 additions and 0 deletions
Showing only changes of commit b48fd7259b - Show all commits

View File

@@ -0,0 +1,7 @@
{
"version": 1,
"registry": "https://clawhub.ai",
"slug": "obsidian-official-cli",
"installedVersion": "1.0.0",
"installedAt": 1773490883209
}

View File

@@ -0,0 +1,42 @@
# Changelog
All notable changes to the Obsidian Official CLI Skill will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.0] - 2026-02-10
### Added
- Initial release of the Obsidian Official CLI skill
- Comprehensive coverage of Obsidian CLI v1.12+ commands
- File operations: create, read, edit, move, delete
- Search and discovery: full-text search, tag management, link analysis
- Daily notes and task management
- Template and bookmark operations
- Plugin and theme management
- Obsidian Sync integration
- File history and version control
- Developer tools and debugging commands
- TUI mode support with interactive features
- Complete documentation with examples and troubleshooting
- Platform-specific setup instructions (macOS, Linux, Windows)
### Features
- Auto-triggering based on Obsidian-related queries
- Support for all CLI parameter types and flags
- Vault targeting with multiple syntax options
- Copy-to-clipboard functionality
- Comprehensive error handling and validation
- Progressive disclosure design for optimal context usage
### Requirements
- Obsidian 1.12+ with Catalyst license
- CLI enabled in Obsidian settings
- OpenClaw skill system
### Documentation
- Complete command reference
- Usage examples and patterns
- Setup and troubleshooting guides
- TUI keyboard shortcuts
- Best practices for vault management

View File

@@ -0,0 +1,159 @@
# Obsidian **Official CLI** Skill
An OpenClaw skill for working with Obsidian vaults using the **official Obsidian CLI (v1.12+)** - not third-party tools, but Obsidian's own built-in command-line interface with full feature support.
## ✨ Official CLI Features
**This skill uses Obsidian's official CLI** - not third-party integrations - giving you access to **all Obsidian features** from the terminal:
- **File Operations**: Create, read, edit, move, and delete notes with full Obsidian integration
- **Advanced Task Management**: Complete task operations with checkboxes, statuses, and custom markers
- **Database/Bases Support**: Query and manage Obsidian Bases with views and CSV/JSON export
- **Search & Discovery**: Full-text search, tag management, link analysis with Obsidian's search engine
- **Daily Notes & Templates**: Manage daily notes and insert templates with variable resolution
- **Plugin & Theme Management**: Install, enable, disable, and reload plugins/themes directly
- **Obsidian Sync Integration**: Full sync operations, history, and conflict resolution
- **Properties (Frontmatter)**: Read, write, and manage note properties with type validation
- **Workspace Management**: Control layouts, tabs, and saved workspaces
- **Developer Tools**: Console debugging, DOM inspection, screenshots, mobile emulation
- **TUI Mode**: Interactive terminal UI with autocomplete, history, and command palette access
## 📋 Requirements
- **Obsidian 1.12+** with early access (insider builds)
- **Catalyst license** (required for official CLI access)
- **Official CLI enabled** in Obsidian: Settings → General → Command line interface → Enable
- **Obsidian running** (CLI connects to the live Obsidian app for full feature access)
## 🚀 Installation
1. Download the skill file: [`obsidian-official-cli.skill`](obsidian-official-cli.skill)
2. Install via OpenClaw CLI:
```bash
openclaw skills install obsidian-official-cli.skill
```
## 💡 Usage Examples
Once installed, the skill will automatically trigger when you mention Obsidian operations:
- "Create a new note called 'Meeting Notes' using Obsidian CLI"
- "Search for all notes containing 'project' with Obsidian's search engine"
- "Show me all incomplete tasks and toggle their status via CLI"
- "Query my Books database and export to CSV"
- "Install the Dataview plugin and enable it"
- "Take a screenshot of my current Obsidian workspace"
- "Show me all orphaned notes in my vault graph"
## 🛠️ Obsidian CLI Setup
1. **Upgrade to Obsidian 1.12+**: Get early access via insider builds
2. **Enable CLI**: Settings → General → Command line interface → Enable
3. **Register command**: Follow the prompt to add `obsidian` to your PATH
4. **Restart terminal**: Or run `source ~/.zprofile` on macOS
5. **Test setup**: Run `obsidian version`
**Note**: Obsidian must be running for CLI commands to work.
## 🔧 Official CLI Command Coverage
**Complete access to Obsidian's official CLI** - every command from the native interface:
### File & Vault Management
- Native file operations with Obsidian's file resolver
- Folder management and vault organization
- Random note selection and unique name generation
### Advanced Content Features
- **Task Management**: Toggle, update status, custom markers (`todo`, `done`, `[-]`)
- **Properties**: Full frontmatter support with type validation (`list`, `text`, etc.)
- **Templates**: Insert with variable resolution and custom paths
- **Daily Notes**: Dedicated commands with append/prepend support
### Database/Knowledge Features
- **Obsidian Bases**: Query views, export CSV/JSON, create entries
- **Search Engine**: Obsidian's full-text search with context and filters
- **Link Graph**: Backlinks, orphans, deadends via Obsidian's link resolver
- **Tag System**: Complete tag analysis with occurrence counts
### Obsidian Ecosystem Integration
- **Plugin Lifecycle**: Install, enable, disable, reload with Obsidian's plugin manager
- **Theme Engine**: Access to Obsidian's theme system and CSS snippets
- **Sync Service**: Full Obsidian Sync operations, not file-level sync
- **Workspace System**: Save/load layouts, tab management, pane control
### Developer & Power User Features
- **Console Access**: Direct access to Obsidian's developer console
- **DOM Inspection**: Query Obsidian's UI elements and CSS
- **Command Palette**: Execute any registered Obsidian command by ID
- **Mobile Emulation**: Test mobile layouts and responsive behavior
## 🎮 TUI Mode
The skill supports Obsidian's interactive Terminal UI mode with:
- Command autocomplete
- Command history with search
- Keyboard shortcuts
- Multi-command sessions
## 📚 Documentation
The skill includes comprehensive documentation covering:
- Command syntax and parameters
- File targeting patterns (`file=` vs `path=`)
- TUI keyboard shortcuts
- Platform-specific setup instructions
- Troubleshooting guides
## 📁 Repository Structure
```
obsidian-official-cli-skill/
├── SKILL.md # Main skill source code
├── obsidian-official-cli.skill # Packaged skill file
├── README.md # This documentation
├── LICENSE # MIT license
├── CHANGELOG.md # Version history
└── .gitignore # Git ignore rules
```
## 🚀 Installation
Download the skill file from the [releases page](https://github.com/slmoloch/obsidian-official-cli-skill/releases) and install:
```bash
# Download the .skill file from releases, then:
openclaw skills install obsidian-official-cli.skill
```
## 🛠️ Development
**For Developers:**
- `SKILL.md` contains the complete skill implementation
- Edit `SKILL.md` to modify functionality
- Rebuild with `openclaw skills build` after changes
- Test locally before submitting changes
## 🤝 Contributing
Found an issue or want to improve the skill?
1. Open an issue describing the problem/enhancement
2. Fork the repository
3. Make your changes to `SKILL.md`
4. Test your changes locally
5. Submit a pull request
## 📄 License
MIT License - feel free to modify and redistribute.
## 🔗 Links
- [Obsidian Official CLI Documentation](https://help.obsidian.md/cli)
- [OpenClaw Documentation](https://docs.openclaw.ai)
- [ClawHub - Skill Marketplace](https://clawhub.com)
---
**Built for OpenClaw** 🦞 | **Supports Obsidian CLI v1.12+** 📝

View File

@@ -0,0 +1,299 @@
---
name: obsidian-official-cli
description: Work with Obsidian vaults using the official Obsidian CLI (v1.12+). Open, search, create, move, and manage notes from the terminal. Use when working with Obsidian vaults for note management, file operations, searching content, managing tasks, properties, links, plugins, themes, sync operations, or any command-line interaction with Obsidian.
---
# Obsidian CLI
Official command-line interface for Obsidian. Anything you can do in Obsidian can be done from the command line — including developer commands for debugging, screenshots, and plugin reloading.
## Prerequisites
- **Obsidian 1.12+** and **Catalyst license** required
- **Settings → General → Command line interface** → Enable
- Follow prompt to register the `obsidian` command
- Restart terminal or `source ~/.zprofile` (macOS)
- **Note:** Obsidian must be running for CLI to work
Test setup: `obsidian version`
## Core Patterns
### Command Structure
```bash
# Single commands
obsidian <command> [parameters] [flags]
# TUI mode (interactive)
obsidian # Enter TUI with autocomplete and history
# Vault targeting
obsidian vault=Notes <command>
obsidian vault="My Vault" <command>
```
### Parameter Types
- **Parameters:** `name=value` (quote values with spaces)
- **Flags:** Boolean switches (just include to enable)
- **Multiline:** Use ` ` for newlines, `\t` for tabs
- **Copy output:** Add `--copy` to copy to clipboard
## File Operations
### Basic File Management
```bash
# Info and listing
obsidian file # Active file info
obsidian file file=Recipe # Specific file info
obsidian files # List all files
obsidian files folder=Projects/ # Filter by folder
obsidian folders # List folders
# Open and read
obsidian open file=Recipe # Open file
obsidian open path="Inbox/Note.md" newtab
obsidian read # Read active file
obsidian read file=Recipe --copy # Read and copy to clipboard
# Create new notes
obsidian create name="New Note"
obsidian create name="Note" content="# Title Body"
obsidian create path="Inbox/Idea.md" template=Daily
obsidian create name="Note" silent overwrite
# Modify content
obsidian append file=Note content="New line"
obsidian append file=Note content="Same line" inline
obsidian prepend file=Note content="After frontmatter"
# Move and delete
obsidian move file=Note to=Archive/
obsidian move path="Inbox/Old.md" to="Projects/New.md"
obsidian delete file=Note # To trash
obsidian delete file=Note permanent
```
### File Targeting
- `file=<name>` — Wikilink resolution (matches by name)
- `path=<path>` — Exact path from vault root
## Search and Discovery
### Text Search
```bash
obsidian search query="meeting notes"
obsidian search query="TODO" matches # Show context
obsidian search query="project" path=Projects/
obsidian search query="urgent" limit=10 case
obsidian search query="API" format=json
obsidian search:open query="search term" # Open in Obsidian
```
### Tags and Properties
```bash
# Tags
obsidian tags # Active file tags
obsidian tags all # All vault tags
obsidian tags all counts sort=count # By frequency
obsidian tag name=project # Tag info
# Properties (frontmatter)
obsidian properties file=Note
obsidian property:read name=status file=Note
obsidian property:set name=status value=done file=Note
obsidian property:set name=tags value="a,b,c" type=list file=Note
obsidian property:remove name=draft file=Note
```
### Links and Structure
```bash
# Backlinks and outgoing links
obsidian backlinks file=Note # What links to this
obsidian links file=Note # Outgoing links
# Vault analysis
obsidian orphans # No incoming links
obsidian deadends # No outgoing links
obsidian unresolved # Broken links
obsidian unresolved verbose counts
```
## Daily Notes and Tasks
### Daily Notes
```bash
obsidian daily # Open today's note
obsidian daily paneType=split # Open in split
obsidian daily:read # Print contents
obsidian daily:append content="- [ ] New task"
obsidian daily:prepend content="## Morning"
```
### Task Management
```bash
# List tasks
obsidian tasks # Active file
obsidian tasks all # All vault tasks
obsidian tasks all todo # Incomplete only
obsidian tasks file=Recipe # Specific file
obsidian tasks daily # Daily note tasks
# Update tasks
obsidian task ref="Recipe.md:8" toggle
obsidian task file=Recipe line=8 done
obsidian task file=Recipe line=8 todo
obsidian task file=Note line=5 status="-" # Custom [-]
```
## Templates and Bookmarks
### Templates
```bash
obsidian templates # List all templates
obsidian template:read name=Daily
obsidian template:read name=Daily resolve title="My Note"
obsidian template:insert name=Daily # Insert into active file
obsidian create name="Meeting Notes" template=Meeting
```
### Bookmarks
```bash
obsidian bookmarks # List all
obsidian bookmark file="Important.md"
obsidian bookmark file=Note subpath="#Section"
obsidian bookmark folder="Projects/"
obsidian bookmark search="TODO"
obsidian bookmark url="https://..." title="Reference"
```
## Plugin and Theme Management
### Plugins
```bash
# List and info
obsidian plugins # All installed
obsidian plugins:enabled # Only enabled
obsidian plugin id=dataview # Plugin info
# Manage plugins
obsidian plugin:enable id=dataview
obsidian plugin:disable id=dataview
obsidian plugin:install id=dataview enable
obsidian plugin:uninstall id=dataview
obsidian plugin:reload id=my-plugin # Development
```
### Themes and CSS
```bash
# Themes
obsidian themes # List installed
obsidian theme # Active theme
obsidian theme:set name=Minimal
obsidian theme:install name="Theme Name" enable
# CSS Snippets
obsidian snippets # List all
obsidian snippet:enable name=my-snippet
obsidian snippet:disable name=my-snippet
```
## Advanced Features
### Obsidian Sync
```bash
obsidian sync:status # Status and usage
obsidian sync on/off # Resume/pause
obsidian sync:history file=Note
obsidian sync:restore file=Note version=2
obsidian sync:deleted # Deleted files
```
### File History
```bash
obsidian history file=Note # List versions
obsidian history:read file=Note version=1
obsidian history:restore file=Note version=2
obsidian diff file=Note from=2 to=1 # Compare versions
```
### Developer Tools
```bash
# Console and debugging
obsidian devtools # Toggle dev tools
obsidian dev:console # Show console
obsidian dev:errors # JS errors
obsidian eval code="app.vault.getFiles().length"
# Screenshots and DOM
obsidian dev:screenshot path=screenshot.png
obsidian dev:dom selector=".workspace-leaf"
obsidian dev:css selector=".mod-active" prop=background
# Mobile and debugging
obsidian dev:mobile on/off
obsidian dev:debug on/off
```
## Utility Commands
### Workspace and Navigation
```bash
# Workspace management
obsidian workspace # Current layout
obsidian workspace:save name="coding"
obsidian workspace:load name="coding"
obsidian tabs # Open tabs
obsidian tab:open file=Note
# Random and unique
obsidian random # Open random note
obsidian random folder=Inbox newtab
obsidian unique # Create unique name
obsidian wordcount file=Note # Word count
```
### Command Palette
```bash
obsidian commands # List all command IDs
obsidian commands filter=editor # Filter commands
obsidian command id=editor:toggle-bold
obsidian hotkeys # List hotkeys
```
## TUI Mode
Interactive terminal UI with enhanced features:
```bash
obsidian # Enter TUI mode
```
**TUI Shortcuts:**
- **Navigation:** ←/→ (Ctrl+B/F), Home/End (Ctrl+A/E)
- **Editing:** Ctrl+U (delete to start), Ctrl+K (delete to end)
- **Autocomplete:** Tab/↓ (enter), Shift+Tab/Esc (exit)
- **History:** ↑/↓ (Ctrl+P/N), Ctrl+R (reverse search)
- **Other:** Enter (execute), Ctrl+L (clear), Ctrl+C/D (exit)
## Troubleshooting
### Setup Issues
- Use latest installer (1.11.7+) with early access (1.12.x)
- Restart terminal after CLI registration
- Ensure Obsidian is running before using CLI
### Platform-Specific
**macOS:** PATH added to `~/.zprofile`
```bash
# For other shells, add manually:
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"
```
**Linux:** Symlink at `/usr/local/bin/obsidian`
```bash
# Manual creation if needed:
sudo ln -s /path/to/obsidian /usr/local/bin/obsidian
```
**Windows:** Requires `Obsidian.com` terminal redirector (Catalyst Discord)

View File

@@ -0,0 +1,6 @@
{
"ownerId": "kn7etsekxfxt0s4sv9h32j0vd980yb5y",
"slug": "obsidian-official-cli",
"version": "1.0.0",
"publishedAt": 1770778403903
}