Skip to content

Guide · Agent skill

How to use the cli-anything-obsidian agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The cli-anything-obsidian skill gives an AI agent a command-line tool that talks to your running Obsidian app through its Local REST API plugin. This guide explains what an agent gains from the skill, how to install it, how to ask for things in plain language, and what to watch for, especially around deleting and overwriting notes. You do not need prior experience with agent skills to follow it.

Obsidian Notes CLIHKUDS/CLI-Anything · Apache-2.0

Quick start

  1. 1Install Python 3.10 or newer. Confirm your Python version meets the minimum before installing the package.
  2. 2Install the pip package. Run pip install cli-anything-obsidian to put the command-line tool on your system.
  3. 3Enable the Local REST API plugin. In Obsidian, make sure the Local REST API community plugin is installed and enabled, and that the app is running.
  4. 4Set your API key. Export OBSIDIAN_API_KEY with your plugin key, or pass it with --api-key on each call.
  5. 5Unzip the skill. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings, Capabilities, Skills in the Claude apps.
  6. 6Verify the connection. Run cli-anything-obsidian server status to confirm Obsidian and the API are reachable.
  7. 7Ask for what you need. Describe the task in plain language, naming the notes or folders involved, and review any changes the agent makes.

What the skill lets the agent do

Once installed, the agent can run a command-line program called cli-anything-obsidian. That program sends requests to Obsidian while the app is open, so the agent can work with your notes without you opening the Obsidian window.

The source lists these abilities: list, read, create, overwrite (update), append to and delete notes; run plain-text searches or Dataview and JsonLogic queries across the vault; check or open the active note; and list or run Obsidian command palette actions. Output can be returned as JSON so the agent can parse it.

  • Vault: list, read, create, update, append, delete notes
  • Search: plain text search, or query with Obsidian query syntax (Dataview DQL by default, or JsonLogic)
  • Note: check the active note or open a note in the editor
  • Command: list available Obsidian commands or execute one by ID
  • Server: check whether the Local REST API is running

Install the skill from the ZIP

Download the skill ZIP from this page. Then choose one of two routes depending on how you use Claude.

For Claude Code, unzip the download into ~/.claude/skills/ to make the skill available in all your projects, or into a project's .claude/skills/ folder to limit it to that project. For the Claude apps, upload the ZIP under Settings, then Capabilities, then Skills.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Install the Python package and set up Obsidian

The skill depends on a pip package. Install it with the command below. You need Python 3.10 or newer.

Obsidian must be installed and running, and the Obsidian Local REST API community plugin must be enabled. The tool cannot work without it. The skill also needs an API key from that plugin. You can pass the key with a flag on each call or set it once as an environment variable, which the source recommends for agents.

  • Python 3.10+
  • Obsidian desktop app running
  • Local REST API community plugin enabled
  • API key from the plugin, supplied with --api-key or OBSIDIAN_API_KEY
pip install cli-anything-obsidian

Trigger the skill with natural requests

You do not need to name commands. Ask for the outcome you want in plain language, and mention Obsidian or your vault so the agent knows where to look. The agent decides which CLI commands to run.

Good requests name the note, folder or topic. Be explicit when you want a change, because an agent that is asked to overwrite or delete will do so.

  • Find every note in my vault that mentions meeting notes from last quarter and summarise the action items.
  • List the files in my Daily Notes folder and tell me which ones have no content.
  • Read Projects/my-project.md and append a section called Next steps at the end.
  • Check the Local REST API status in Obsidian before you do anything else.
  • Show me the commands available in Obsidian that relate to bold text.

Run the CLI yourself to check it works

You can run the same commands by hand to confirm the setup. Check the help text, then confirm the server is reachable. The source recommends checking server status before other commands. For machine-readable output, put --json before the subcommand.

Commands take paths inside the vault, for example Projects/my-project.md. The default host is https://localhost:27124, and you can change it with --host.

  • Show help: cli-anything-obsidian --help
  • Check the server: cli-anything-obsidian server status
  • List vault files as JSON: cli-anything-obsidian --json vault list
  • Start interactive mode: run cli-anything-obsidian with no subcommand, then type help
cli-anything-obsidian --json vault list

Examples of search and command use

Search has two kinds of query. Plain text search uses the simple subcommand. The query subcommand takes Obsidian query syntax; by default it is Dataview DQL, and you can pass --type jsonlogic for JsonLogic queries.

Command actions use the command ID shown by the list subcommand. The example below runs the bold toggle from the editor.

  • Plain text: search simple 'meeting notes'
  • Dataview: search query with a TABLE query over a folder such as Projects
  • JsonLogic: search query --type jsonlogic with a frontmatter condition such as status equal to active
cli-anything-obsidian command execute "editor:toggle-bold"

Safety: scripts, network and destructive commands

This skill runs scripts and uses the network. The CLI sends requests to the Obsidian Local REST API, by default at localhost. Only install the skill from a source you trust, and keep your API key private.

The delete and update commands are destructive. The skill does not describe a confirmation step or automatic backups. Before running unattended agents, back up your vault yourself, and consider asking the agent to read and list notes only until you are comfortable with its changes. Scripts and agents should check return codes, and the source says to parse stderr when a command fails.

  • Keep a current backup of your vault before letting an agent edit or delete
  • Ask for a preview or a list of target notes before any overwrite or delete
  • Do not run unattended delete or update jobs without reviewing them first
  • Store the API key in OBSIDIAN_API_KEY rather than in shared scripts

What people use it for

  • Searching a large vault for notes on a topic and returning a summary of matches in JSON for further processing.
  • Running a Dataview query to build a table of notes in a project folder from the terminal.
  • Batch-appending a standard section to many project notes, after taking a backup.
  • Letting an agent open the note you are currently working on and read its content for context.
  • Triggering Obsidian command palette actions, such as toggling bold text, from a script.

Frequently asked questions

Is the cli-anything-obsidian skill free to use?

The source does not state pricing or licence terms for this skill beyond the repository licence, which is Apache-2.0. Check the repository licence for the full terms before you use or redistribute it.

What do I need to run the cli-anything-obsidian skill?

You need Python 3.10 or newer, the cli-anything-obsidian pip package, the Obsidian desktop app running, the Obsidian Local REST API community plugin enabled, and an API key from that plugin. Without the plugin running, the tool cannot work.

How do I install the Obsidian agent skill in Claude?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings, then Capabilities, then Skills.

Why does cli-anything-obsidian say it cannot connect?

The most likely causes are that Obsidian is not running, the Local REST API plugin is not enabled, or the API key is missing. Run cli-anything-obsidian server status to check, and confirm the host is https://localhost:27124 or set --host to match your setup.

Can an AI agent delete my Obsidian notes with this skill?

Yes, the delete command removes notes from the vault, and the update command overwrites them. The skill does not describe a confirmation step or backups, so back up your vault and review destructive actions before running them unattended.

Who should pick a different tool instead?

If you do not use Obsidian or cannot enable the Local REST API plugin, this skill will not work for you. If you want an agent to edit files without a running Obsidian app, a tool that works directly on the vault folder would be a better fit, though the source does not compare alternatives.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits people who keep their knowledge base in Obsidian and want an agent to search, organise or batch-edit notes, and developers who want to script Obsidian without the GUI. It is a poor fit if Obsidian and the Local REST API plugin cannot run, or if you want an agent to change or delete notes without supervision, because the skill does not describe confirmation or backups.

Download the skill