Obsidian CLI Inspector
- Note: THIS Feature currently is in alpha
A local-first, read-only CLI/TUI for inspecting and querying Obsidian vaults. It helps developers quickly find notes, links, and tags without leaving the terminal.
What you can do
- Search your vault with fast full‑text queries
- Navigate backlinks, forward links, and unresolved links
- Filter notes by tags (AND/OR)
- Explore note relationships via graph view
- Get suggestions for related notes
- Surface large/bloated notes for cleanup
- Use CLI for scripting or TUI for interactive browsing
Install
From crates.io
From source
The binary will be at target/release/obsidian-cli-inspector.
Quick start
- Create a config file and set your vault path:
= "/path/to/your/obsidian/vault"
- Initialize and index your vault:
- Explore your notes:
Note: If you try to run query commands before indexing, you'll get a clear error message:
Database not found- Runobsidian-cli-inspector init initfirstDatabase is empty- Runobsidian-cli-inspector index indexto index your vault
If search returns no results after indexing, run indexing again:
Use plain search text as the final argument. Example:
Common commands
# Init & Index
# Search
# Analyze
# View
# Diagnose
# Interactive
CLI Contract
The CLI follows a structured command pattern. See docs/cli-contract.md for the full CLI contract, including the new group-based command structure and migration guide.
Machine Contracts (v1.1.0+)
For agent integration, use JSON output with deterministic contracts. See docs/machine-contract.md for full documentation.
Testing note: end-to-end contract tests are under
tests/e2eand are skipped by default during regularmake testruns. To run them, use:This command automatically prepares test data before running the suite.
Configuration
The minimum required setting is vault_path. Optional settings include database location, exclusions, and defaults. See config.toml.example for a complete list.
Status
The core indexing, parsing, chunking, and query features are in place. Advanced recommendations and hygiene features are evolving. See docs/TODOs.md for a user‑focused roadmap.
License
Apache-2.0
Contributing
Contributions are welcome. Please open an issue to discuss larger changes.