Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli. Enhanced with Visual PKM features: auto-linking, smart tagging, graph optimization, Vietnamese support, and Telegram integration.
Obsidian vault = a normal folder on disk.
Vault structure (typical)
*.md (plain text Markdown; edit with any editor).obsidian/ (workspace + plugin settings; usually don't touch from scripts)*.canvas (JSON)Obsidian desktop tracks vaults here (source of truth):
~/Library/Application Support/obsidian/obsidian.jsonobsidian-cli resolves vaults from that file; vault name is typically the folder name (path suffix).
Fast "what vault is active / where are the notes?"
obsidian-cli print-default --path-only~/Library/Application Support/obsidian/obsidian.json and use the vault entry with "open": true.Notes
~/Documents, work/personal, etc.). Don't guess; read config.print-default.Pick a default vault (once):
obsidian-cli set-default "<vault-folder-name>"obsidian-cli print-default / obsidian-cli print-default --path-onlySearch
obsidian-cli search "query" (note names)obsidian-cli search-content "query" (inside notes; shows snippets + lines)Create
obsidian-cli create "Folder/New note" --content "..." --openobsidian://…) working (Obsidian installed)..something/...) via URI; Obsidian may refuse.Move/rename (safe refactor)
obsidian-cli move "old/path/note" "new/path/note"[[wikilinks]] and common Markdown links across the vault (this is the main win vs mv).Delete
obsidian-cli delete "path/note"Prefer direct edits when appropriate: open the .md file and change it; Obsidian will pick it up.
Automatically detect and create bidirectional links between related notes.
pnpm tsx skills/obsidian/scripts/pkm-automation.ts auto-link
AI-powered tag suggestions based on content analysis.
pnpm tsx skills/obsidian/scripts/pkm-automation.ts auto-tag --note "Path/To/Note.md"
Optimize vault structure for better graph visualization.
pnpm tsx skills/obsidian/scripts/pkm-automation.ts optimize-graph
Create daily notes with Vietnamese date format and templates.
pnpm tsx skills/obsidian/scripts/pkm-automation.ts daily-note
Pre-defined templates for different note types:
skills/obsidian/templates/project.mdskills/obsidian/templates/meeting.mdskills/obsidian/templates/reference.mdskills/obsidian/templates/learning.mdskills/obsidian/templates/journal.md# Fuzzy search (tone-insensitive)
pnpm tsx skills/obsidian/scripts/pkm-automation.ts fuzzy-search "tieng viet"
Quick capture from Telegram to Obsidian:
/note <content> - Quick note to Inbox/task <content> - Create task/idea <content> - Capture idea/journal <content> - Journal entryAll automation scripts are in skills/obsidian/scripts/pkm-automation.ts.
Run with:
pnpm tsx skills/obsidian/scripts/pkm-automation.ts <command> [options]
Available commands:
daily-note - Create daily noteauto-link - Find and create backlinksauto-tag - AI-powered taggingorganize - Auto-organize notes into foldersoptimize-graph - Graph optimizationcreate-meeting - Create meeting notecreate-reference - Create reference notecreate-learning - Create learning notesync-brain - Sync with Antigravity brain foldersearch-by-tags - Search by tagsfuzzy-search - Tone-insensitive Vietnamese searchweekly-review - Generate weekly reviewcleanup-orphans - Archive orphan notesrebuild-graph - Rebuild graph connectionsrepair-links - Scan and repair broken linksSee .agent/workflows/obsidian-pkm.md for detailed PKM automation workflows:
Add to settings.json:
{
"obsidian": {
"defaultVault": "LongBest",
"autoLinkEnabled": true,
"autoTagEnabled": true,
"dailyNoteTemplate": "templates/daily.md",
"inboxFolder": "Inbox",
"archiveFolder": "Archive",
"vietnameseSupport": true
}
}