Obsidian vault CLI via CouchDB/LiveSync — read, write, search, graph traversal, tags, properties
Project description
obsidian-vault-cli
A Python CLI that gives agents (and humans) full access to an Obsidian vault synced via Self-hosted LiveSync (CouchDB) — without requiring Obsidian to be installed or running.
Part of the obsctl monorepo.
Install
pip install obsidian-vault-cli
Configure
vault config set vault.host obsidian.yourhost.com
vault config set vault.port 443
vault config set vault.protocol https
vault config set vault.database obsidian
vault config set vault.username admin
vault config set vault.password yourpassword
vault ping # verify connection
Or use environment variables: VAULT_HOST, VAULT_PORT, VAULT_DATABASE, VAULT_USERNAME, VAULT_PASSWORD, VAULT_PROTOCOL.
Quick start
# Read
vault read --file "north star"
vault read --path "References/Person.md" --json
# Create
vault create --name "New Idea" --folder "References" --content "# Idea"
# Write (requires --force to overwrite)
vault write --path "References/Person.md" --content "..." --force
vault write --path "References/Person.md" --content "..." --diff # preview only
# Search
vault search --query "agent loop" --context
vault search --query "TODO" --limit 10
# Graph traversal
vault backlinks --file "closedclaw"
vault links --file "closedclaw"
vault unresolved
vault orphans
# Tags & properties
vault tags --counts --sort count
vault properties --file "north star"
vault property:set --name "status" --value "active" --file "north star" --yes
# Delete (requires --yes in scripts)
vault delete --file "old note" --yes
Safety flags
All mutating commands support these flags — designed for safe agent operation:
| Flag | Behaviour |
|---|---|
--force |
Skip existence guard, overwrite unconditionally |
--yes |
Skip confirmation prompts (for scripts/agents) |
--dry-run |
Print what would happen, do nothing |
--diff |
Show unified diff of content change, do nothing |
vault writerefuses to silently overwrite existing notes without--forcevault createaborts if the note already existsvault deleteprompts for confirmation (defaults to No)vault property:setshows current → new values before writing
All commands
| Command | Description |
|---|---|
vault read |
Read note content |
vault create |
Create new note |
vault write |
Write/overwrite note |
vault append |
Append to note |
vault prepend |
Prepend to note |
vault delete |
Soft-delete note |
vault move |
Move note to new path |
vault rename |
Rename note (same folder) |
vault files |
List files |
vault folders |
List folders |
vault search |
Full-text search |
vault backlinks |
Incoming wikilinks |
vault links |
Outgoing wikilinks |
vault unresolved |
Dead wikilinks |
vault orphans |
Notes with no incoming links |
vault tags |
List all tags |
vault tag |
Notes with specific tag |
vault properties |
Note frontmatter |
vault property:read |
Read one property |
vault property:set |
Set a property |
vault property:remove |
Remove a property |
vault templates |
List templates |
vault template:read |
Read template |
vault ping |
Test connectivity |
vault config show |
Show config |
vault config set |
Update config |
Programmatic usage
from vault_cli.core.client import VaultClient
client = VaultClient(
host="obsidian.yourhost.com",
port=443,
database="obsidian",
username="admin",
password="yourpassword",
protocol="https"
)
note = client.read_note("north star.md")
client.write_note("References/New.md", "# New note")
results = client.search_notes("agent loop")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obsidian_vault_cli-0.2.1.tar.gz.
File metadata
- Download URL: obsidian_vault_cli-0.2.1.tar.gz
- Upload date:
- Size: 37.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
187101fd9343139be868b703fe9be8d67d71abb6b35c261f4325989fd63d79a6
|
|
| MD5 |
92656efa2244a144118c7f17f22c45e4
|
|
| BLAKE2b-256 |
8cc3dfa63aa50ec702c1e86d84246905cef3035137c9055e874d78c423c33ab6
|
Provenance
The following attestation bundles were made for obsidian_vault_cli-0.2.1.tar.gz:
Publisher:
cli-publish.yml on HarKro753/obsctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obsidian_vault_cli-0.2.1.tar.gz -
Subject digest:
187101fd9343139be868b703fe9be8d67d71abb6b35c261f4325989fd63d79a6 - Sigstore transparency entry: 1028179237
- Sigstore integration time:
-
Permalink:
HarKro753/obsctl@14d34a3b9847c599adb8059296dbb973ef8b7ca0 -
Branch / Tag:
refs/tags/cli-v0.2.1 - Owner: https://github.com/HarKro753
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli-publish.yml@14d34a3b9847c599adb8059296dbb973ef8b7ca0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file obsidian_vault_cli-0.2.1-py3-none-any.whl.
File metadata
- Download URL: obsidian_vault_cli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41a58493c03571225e432e5cb8de9700f83f2c6b4e1d07dfd4f12f6933ce7d6e
|
|
| MD5 |
e35aaeea5bace3cc3be053746c086798
|
|
| BLAKE2b-256 |
aaea90bddf2f1449bc274bc5054151087f511a2edf747343671349675a848611
|
Provenance
The following attestation bundles were made for obsidian_vault_cli-0.2.1-py3-none-any.whl:
Publisher:
cli-publish.yml on HarKro753/obsctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obsidian_vault_cli-0.2.1-py3-none-any.whl -
Subject digest:
41a58493c03571225e432e5cb8de9700f83f2c6b4e1d07dfd4f12f6933ce7d6e - Sigstore transparency entry: 1028179378
- Sigstore integration time:
-
Permalink:
HarKro753/obsctl@14d34a3b9847c599adb8059296dbb973ef8b7ca0 -
Branch / Tag:
refs/tags/cli-v0.2.1 - Owner: https://github.com/HarKro753
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli-publish.yml@14d34a3b9847c599adb8059296dbb973ef8b7ca0 -
Trigger Event:
release
-
Statement type: