Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

cli-anything-obsidian — Claude Code skill for Obsidian

Manage an Obsidian vault from the terminal: read, create, search, and update notes or run editor commands. It suits agents that need to work without the GUI.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add HKUDS/CLI-Anything --skill cli-anything-obsidian -a claude-code
Open on GitHub

What cli-anything-obsidian does

This skill gives an agent command-line access to Obsidian through the Local REST API. The vault commands list files, read notes, create files, overwrite content, append text, and delete notes. Searches support plain text as well as Dataview DQL and JsonLogic queries.

It can inspect the active note, open a file in the editor, and run command-palette actions by ID. Running the CLI without a subcommand starts an interactive REPL with history and tab completion. Use --json when an agent needs structured output.

Python 3.10+, a running Obsidian instance, and the enabled Local REST API plugin are required. That plugin is a hard prerequisite because the CLI communicates with the vault through its API. Pass a key with --api-key or set OBSIDIAN_API_KEY; --host changes the server address.

What it helps with

  • read a note from an Obsidian vault
  • create or append Markdown content
  • search vault files for text
  • run a Dataview DQL query
  • execute an Obsidian command by ID

Example prompts for the agent

  • “Check the API with `cli-anything-obsidian server status`.”
  • “List vault files as JSON using `cli-anything-obsidian --json vault list`.”
  • “Search for meeting notes with `cli-anything-obsidian search simple "meeting notes"`.”

How to install cli-anything-obsidian

1Skills CLI (Vercel)

npx skills add HKUDS/CLI-Anything --skill cli-anything-obsidian -a claude-code

2Manually: put the files in place

~/.claude/skills/cli-anything-obsidian/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cli-anything-obsidian/

From the same set18

The whole set →
cli-hub-meta-skill HKUDS A skill that gives agents a catalog of professional command-line tools built for AI. Search, install, and run CLIs for video, design, AI, and development without leaving your editor. Claude Code CX Codex Cursor +1 5,300installs cli-anything HKUDS Builds a Python harness with Click commands for any GUI application or repository. Generates REPL, tests, and docs following the CLI-Anything methodology. Claude Code CX Codex Cursor +1 2,100installs cli-anything-blender HKUDS A skill that adds a stateful command-line interface for editing Blender 3D scenes. Use it when an agent needs to assemble a scene, assign materials, or render a frame without manual clicking. Claude Code CX Codex Cursor +1 941installs cli-anything-notebooklm HKUDS Experimental harness to manage Google NotebookLM through a local CLI. It lets agents list notebooks, query sources, generate artifacts, and download files. Claude Code CX Codex Cursor +1 801installs cli-anything-libreoffice HKUDS Skill for creating and editing Writer, Calc, and Impress documents from the CLI without a GUI. Produces real ODF files (ZIP with XML) — useful when an AI agent needs to assemble a report, spreadsheet, or presentation programmatically. Claude Code CX Codex Cursor +1 669installs cli-anything-drawio HKUDS A command-line harness over Draw.io: the skill hands your agent commands to build a diagram step by step and export it to PNG, PDF or SVG. Claude Code CX Codex Cursor +1 666installs cli-anything-freecad HKUDS Turns FreeCAD into a scriptable CLI for your agent: 258 commands for primitives, sketches, PartDesign features and headless export. Claude Code CX Codex Cursor +1 643installs cli-anything-gimp HKUDS Provides a stateful image editing CLI built on Pillow and GIMP for AI agents. It handles layers, drawing, and headless rendering without a GUI. Claude Code CX Codex Cursor +1 609installs

Similar

freecad-scripts official github Writes FreeCAD Python scripts and macros: 3D geometry, parametric objects, PySide dialogs. Useful when you automate CAD work. GitHub Copilot 1,200installs before-you-build bin1874 This skill reviews product and feature risk before implementation. Use it to find the key assumption and the smallest useful validation step. Claude Code CX Codex Cursor 3,100installs remembering-conversations obra Forces the assistant to search past conversations before claiming ignorance or guessing. It reads relevant snippets instead of entire transcripts, saving context window space. Claude Code CX Codex Cursor +1 9,200installs lsp-setup official github Installs a language server and configures LSP for Copilot CLI. Use it when you need code navigation such as go-to-definition or find-references. GitHub Copilot 1,100installs team Yeachan-Heo Coordinates several agents through a shared task list and assigns work by stage. Use it when a larger task needs parallel execution and review. Claude Code CX Codex Cursor +1 878installs project-session-manager Yeachan-Heo Automates creation of separate git worktrees for each task, PR, or feature, with optional tmux session orchestration. Work on multiple branches in parallel without conflicts. Claude Code CX Codex Cursor +1 861installs find-skills vercel-labs Discovers and installs agent skills from skills.sh directly inside your coding assistant. Handy when you need domain-specific workflows for a project. Claude Code CX Codex Cursor +1 4,000,000installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. Claude Code 1,424,476installs

Questions about cli-anything-obsidian

How do I install cli-anything-obsidian in Claude Code?

Install the skill with npx skills add HKUDS/CLI-Anything --skill cli-anything-obsidian -a claude-code. Install the CLI package separately with pip install cli-anything-obsidian.

What does cli-anything-obsidian do?

It lets an agent manage Obsidian vault files, search notes, inspect the active note, and execute editor commands from the command line. Commands can return structured JSON with --json.

What does cli-anything-obsidian need to run?

It requires Python 3.10+, Obsidian running locally, and the Local REST API plugin enabled. Configure the API key with --api-key or OBSIDIAN_API_KEY.

Source text

SKILL.md · Apache-2.0
---
name: "cli-anything-obsidian"
description: >-
  Command-line interface for Obsidian — Knowledge management and note-taking via Obsidian Local REST API. Designed for AI agents and power users who need to manage notes, search the vault, and execute commands without the GUI.
---

# cli-anything-obsidian

Knowledge management and note-taking via the Obsidian Local REST API. Designed for AI agents and power users who need to manage notes, search the vault, and execute commands without the GUI.

## Installation

This CLI is installed as part of the cli-anything-obsidian package:

```bash
pip install cli-anything-obsidian
```

**Prerequisites:**
- Python 3.10+
- Obsidian must be installed and running with the [Local REST API plugin](https://github.com/coddingtonbear/obsidian-local-rest-api) enabled


## Usage

### Basic Commands

```bash
# Show help
cli-anything-obsidian --help

# Start interactive REPL mode
cli-anything-obsidian

# List vault files
cli-anything-obsidian vault list

# Run with JSON output (for agent consumption)
cli-anything-obsidian --json vault list
```

### REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

```bash
cli-anything-obsidian
# Enter commands interactively with tab-completion and history
```


## Command Groups


### Vault

Vault file management commands.

| Command | Description |
|---------|-------------|
| `list` | List files in the vault or a subdirectory |
| `read` | Read the content of a note |
| `create` | Create a new note |
| `update` | Overwrite an existing note |
| `delete` | Delete a note from the vault |
| `append` | Append content to an existing note |


### Search

Vault search commands.

| Command | Description |
|---------|-------------|
| `query` | Search using Obsidian query syntax |
| `simple` | Plain text search across the vault |


### Note

Active note commands.

| Command | Description |
|---------|-------------|
| `active` | Get the currently active note in Obsidian |
| `open` | Open a note in the Obsidian editor |


### Command

Obsidian command palette commands.

| Command | Description |
|---------|-------------|
| `list` | List all available Obsidian commands |
| `execute` | Execute a command by its ID |


### Server

Server status and info commands.

| Command | Description |
|---------|-------------|
| `status` | Check if the Obsidian Local REST API is running |


### Session

Session state commands.

| Command | Description |
|---------|-------------|
| `status` | Show current session state |



## Examples


### List and Read Notes

```bash
# List all vault files
cli-anything-obsidian vault list

# List files in a subdirectory
cli-anything-obsidian vault list "Daily Notes"

# Read a note
cli-anything-obsidian vault read "Projects/my-project.md"
```


### Create and Update Notes

```bash
# Create a new note
cli-anything-obsidian vault create "Projects/new-project.md" --content "# New Project"

# Update (overwrite) a note
cli-anything-obsidian vault update "Projects/new-project.md" --content "# Updated Content"

# Append to a note
cli-anything-obsidian vault append "Projects/new-project.md" --content "\n## New Section"
```


### Search

```bash
# Plain text search (GET /search/simple/)
cli-anything-obsidian search simple "meeting notes"

# Dataview DQL query — default --type dql, sent as
# application/vnd.olrapi.dataview.dql+txt
cli-anything-obsidian search query 'TABLE file.link FROM "Projects"'

# JsonLogic query — application/vnd.olrapi.jsonlogic+json
cli-anything-obsidian search query --type jsonlogic \
  '{"==":[{"var":"frontmatter.status"},"active"]}'
```


### Commands

```bash
# List available commands
cli-anything-obsidian command list

# Execute a command by ID
cli-anything-obsidian command execute "editor:toggle-bold"
```


### Interactive REPL Session

Start an interactive session for exploratory use.

```bash
cli-anything-obsidian
# Enter commands interactively
# Use 'help' to see available commands
```


### API Key Configuration

```bash
# Via flag
cli-anything-obsidian --api-key YOUR_KEY vault list

# Via environment variable (recommended for agents)
export OBSIDIAN_API_KEY=YOUR_KEY
cli-anything-obsidian vault list
```


## State Management

The CLI maintains lightweight session state:

- **API key**: Configurable via `--api-key` or `OBSIDIAN_API_KEY` environment variable
- **Host URL**: Defaults to `https://localhost:27124`; configurable via `--host`

## Output Formats

All commands support dual output modes:

- **Human-readable** (default): Tables, colors, formatted text
- **Machine-readable** (`--json` flag): Structured JSON for agent consumption

```bash
# Human output
cli-anything-obsidian vault list

# JSON output for agents
cli-anything-obsidian --json vault list
```

## For AI Agents

When using this CLI programmatically:

1. **Always use `--json` flag** for parseable output
2. **Check return codes** - 0 for success, non-zero for errors
3. **Parse stderr** for error messages on failure
4. **Set `OBSIDIAN_API_KEY`** environment variable to avoid passing `--api-key` on every call
5. **Verify Obsidian is running** with `server status` before other commands

## More Information

- Full documentation: See README.md in the package
- Test coverage: See TEST.md in the package
- Methodology: See HARNESS.md in the cli-anything-plugin

## Version

1.1.0

© HKUDS · Apache-2.0 · HKUDS/CLI-Anything

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor