New to Claude Skills? Learn how to install them →

hkuds on GitHub

CLI Anything for Obsidian

Free

Manage your Obsidian notes directly from the command line.

by hkuds46.9k stars on hkuds/cli-anything
2 views
Updated Aug 3, 2026
Get this skill

Free · Opens the source repo

What CLI Anything for Obsidian does

CLI Anything for Obsidian provides a command-line interface that allows users to interact with their Obsidian vaults without relying on the graphical user interface. This tool is particularly beneficial for power users and AI agents who prefer scripting and automation over manual note management. By leveraging the Obsidian Local REST API, users can perform a variety of operations such as listing, creating, updating, and deleting notes, as well as executing commands and searching through their vaults.

The CLI supports multiple command groups, including vault management, note operations, and search functionalities. Users can easily list all files in their vault, read the contents of specific notes, and even conduct complex searches using Obsidian's query syntax. Additionally, the tool offers an interactive REPL mode, allowing users to enter commands directly and utilize features like tab-completion and command history for a more efficient workflow.

This skill is particularly useful for developers and designers who need to integrate Obsidian into their workflows, automate note-taking processes, or manage large volumes of information quickly. The CLI's ability to output results in both human-readable and machine-readable formats makes it suitable for use in automated scripts and applications, enhancing productivity and efficiency.

Overall, CLI Anything for Obsidian is a powerful tool for those who want to take full control of their note-taking and knowledge management processes through the command line, making it an essential addition for users who rely heavily on Obsidian for their documentation needs.

When to use it

Use this tool when you need to automate note management tasks or prefer command-line operations over GUI interactions in Obsidian.

When not to use it

This skill may not be suitable for users who are unfamiliar with command-line interfaces or prefer a visual approach to note management.

What you can build with it

Automate Note Creation

Use the CLI to create new notes programmatically, streamlining your documentation process.

Search Notes Efficiently

Quickly search through your vault using command-line queries to find specific information.

Integrate with Scripts

Incorporate the CLI into your scripts to manage notes without manual intervention.

How to install CLI Anything for Obsidian

View source

1. Install with the skills CLI

npx skills add hkuds/cli-anything/skills --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by hkuds

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:

pip install cli-anything-obsidian

Prerequisites:

Usage

Basic Commands

# 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:

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

Command Groups

Vault

Vault file management commands.

CommandDescription
listList files in the vault or a subdirectory
readRead the content of a note
createCreate a new note
updateOverwrite an existing note
deleteDelete a note from the vault
appendAppend content to an existing note

Search

Vault search commands.

CommandDescription
querySearch using Obsidian query syntax
simplePlain text search across the vault

Note

Active note commands.

CommandDescription
activeGet the currently active note in Obsidian
openOpen a note in the Obsidian editor

Command

Obsidian command palette commands.

CommandDescription
listList all available Obsidian commands
executeExecute a command by its ID

Server

Server status and info commands.

CommandDescription
statusCheck if the Obsidian Local REST API is running

Session

Session state commands.

CommandDescription
statusShow current session state

Examples

List and Read Notes

# 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

# 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

# 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

# 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.

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

API Key Configuration

# 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
# 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

Frequently asked questions about CLI Anything for Obsidian

Similar skills