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:
Prerequisites:
- Python 3.10+
- Obsidian must be installed and running with the Local REST API plugin enabled
Usage
Basic Commands
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
Command Groups
Vault
Vault file management commands.
Search
Vault search commands.
Note
Active note commands.
Command
Obsidian command palette commands.
Server
Server status and info commands.
Session
Session state commands.
Examples
List and Read Notes
Create and Update Notes
Search
Commands
Interactive REPL Session
Start an interactive session for exploratory use.
API Key Configuration
State Management
The CLI maintains lightweight session state:
- API key: Configurable via
--api-keyorOBSIDIAN_API_KEYenvironment 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 (
--jsonflag): Structured JSON for agent consumption
For AI Agents
When using this CLI programmatically:
- Always use
--jsonflag for parseable output - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Set
OBSIDIAN_API_KEYenvironment variable to avoid passing--api-keyon every call - Verify Obsidian is running with
server statusbefore 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

