mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
- Changed the hardcoded vault path to be set via the OBSIDIAN_VAULT_PATH environment variable, with a default fallback. - Updated all relevant commands to utilize the new variable for reading, listing, searching, creating, and appending notes, improving flexibility and usability.
66 lines
1.2 KiB
Markdown
66 lines
1.2 KiB
Markdown
---
|
|
name: obsidian
|
|
description: Read, search, and create notes in the Obsidian vault.
|
|
---
|
|
|
|
# Obsidian Vault
|
|
|
|
**Location:** Set via `OBSIDIAN_VAULT_PATH` environment variable (e.g. in `~/.hermes/.env`).
|
|
|
|
If unset, defaults to `~/Documents/Obsidian Vault`.
|
|
|
|
Note: Vault paths may contain spaces - always quote them.
|
|
|
|
## Read a note
|
|
|
|
```bash
|
|
VAULT="${OBSIDIAN_VAULT_PATH:-$HOME/Documents/Obsidian Vault}"
|
|
cat "$VAULT/Note Name.md"
|
|
```
|
|
|
|
## List notes
|
|
|
|
```bash
|
|
VAULT="${OBSIDIAN_VAULT_PATH:-$HOME/Documents/Obsidian Vault}"
|
|
|
|
# All notes
|
|
find "$VAULT" -name "*.md" -type f
|
|
|
|
# In a specific folder
|
|
ls "$VAULT/Subfolder/"
|
|
```
|
|
|
|
## Search
|
|
|
|
```bash
|
|
VAULT="${OBSIDIAN_VAULT_PATH:-$HOME/Documents/Obsidian Vault}"
|
|
|
|
# By filename
|
|
find "$VAULT" -name "*.md" -iname "*keyword*"
|
|
|
|
# By content
|
|
grep -rli "keyword" "$VAULT" --include="*.md"
|
|
```
|
|
|
|
## Create a note
|
|
|
|
```bash
|
|
VAULT="${OBSIDIAN_VAULT_PATH:-$HOME/Documents/Obsidian Vault}"
|
|
cat > "$VAULT/New Note.md" << 'ENDNOTE'
|
|
# Title
|
|
|
|
Content here.
|
|
ENDNOTE
|
|
```
|
|
|
|
## Append to a note
|
|
|
|
```bash
|
|
VAULT="${OBSIDIAN_VAULT_PATH:-$HOME/Documents/Obsidian Vault}"
|
|
echo "
|
|
New content here." >> "$VAULT/Existing Note.md"
|
|
```
|
|
|
|
## Wikilinks
|
|
|
|
Obsidian links notes with `[[Note Name]]` syntax. When creating notes, use these to link related content.
|