A platform-agnostic CLI for managing markdown-based knowledge vaults. Built for AI agents, usable by humans.
vault-fs gives you a single binary to create, read, search, and organize markdown files in a structured vault — no Obsidian, no GUI, no runtime dependencies. Every query command returns JSON by default so agents can parse results without extra tooling.
go install github.com/zarar/vaultfs@latestOr build from source:
git clone https://github.com/zarar/vaultfs.git
cd vaultfs
go build -o vault-fs .# Initialize a vault with the basic preset
vault-fs init --preset=basic
# Create a note (auto-adds .md, auto-creates parent dirs)
vault-fs create "Daily Plan/2026-04-13" --content="## Priorities\n\n- [ ] Ship feature\n- [ ] Review PRs"
# Create from a file (for large content)
vault-fs create "imports/report" --input=~/Downloads/report.md
# Pipe content from stdin
cat draft.md | vault-fs create "notes/draft" --input=-
# Read it back (JSON with parsed frontmatter)
vault-fs read "Daily Plan/2026-04-13.md"
# Search across all files (AND semantics)
vault-fs search "ship feature"
# List pending tasks
vault-fs tasks --pending
# See all tags with usage counts
vault-fs tags --counts --sort=count
# Get comprehensive help
vault-fs helpinit— Scaffold a vault with config-driven presets (or custom directories)info— Vault metadata: file count, folder count, index status- Vault discovery —
--vaultflag →VAULTFS_PATHenv → walk up from CWD →~/vault-fs
create— Create files with content, auto.mdextension, auto parent dirsread— Returns parsed frontmatter + body as structured JSONappend/prepend— Append creates missing files; prepend inserts after frontmatter--input— All write commands accept--input=<file>to read content from a file (use-for stdin)move/delete— Move with auto target dirs, permanent deletelist/folders/mkdir— File discovery and directory management
search— Full-text search via bleve index with AND semantics (--exactfor phrase match)search:context— Returns matching lines with file path and line numbers--fuzzy— Fuzzy filename matching- Lazy indexing — Index auto-rebuilds when stale;
index rebuildfor manual refresh
tags— List all tags with optional counts and sortingtag <name>— Find files with a specific tag (supports nested#tag/sub)- Extracts from both YAML frontmatter
tags:and inline#tagsyntax
tasks— Extract checkbox tasks with rich metadata parsingtask toggle— Toggle- [ ]↔- [x]at a specific line- Parses priority (
🔴/⏫high,🟡/🔼medium,🔵/🔽low), due dates (#due/YYYY-MM-DD,📅 YYYY-MM-DD),@mentions, and inline#tags
properties— Read all YAML frontmatter as JSONproperty set— Set a property (creates frontmatter block if missing)property remove— Remove a property (idempotent)
outline— Heading structure as a nested JSON tree
| Command Type | Default | Override |
|---|---|---|
| Query commands (read, list, search, tags, tasks, ...) | JSON | --format=text |
| Action commands (init, create, append, delete, ...) | Text | --format=json |
Per-vault config lives in .vaultfs/config.yaml:
vault:
path: ~/vault-fs
presets:
basic:
directories:
- Daily Debrief
- Daily Plan
- Journal
- Meeting Notes
- Projects/Active
- Projects/Archived
- Reports
- Scratchpad
- StakeholdersAdd your own presets and use them with vault-fs init --preset=<name>.
vault-fs ships with a Claude Code skill that teaches AI agents how to use every command. When working in a project with vault-fs, Claude automatically knows how to create notes, search content, extract tasks, manage tags, and more.
The skill includes:
- Full command overview with examples
- Common agent workflow patterns (daily journals, task dashboards, search-and-read)
- A complete command reference with all flags and output formats
| Component | Library |
|---|---|
| CLI framework | cobra |
| Markdown parsing | goldmark |
| YAML frontmatter | goccy/go-yaml |
| Full-text search | bleve |
| Fuzzy matching | sahilm/fuzzy |
# Run all tests (103 tests across 4 packages)
go test ./...
# Build
go build -o vault-fs .
# Vet
go vet ./...MIT