tobi extracts all tags from your Obsidian vault. tobi was created because I wanted a way to list all my tags and pass them to an LLM as context so it could suggest tags that fit my existing hierarchical tag structure.
- Fast, cached scans: results are cached and used if no changes are detected.
- Respects ignore rules: skips
.git/and files/directories ignored by.gitignoreand.tobiignore. - Flexible output modes: show only tag names, or with counts, or with relative frequency percentages.
- Per‑vault tag excludes: ignore tags via glob patterns in
.tobi.exclude.
Make sure Go is installed before running the following command:
go install github.com/nt54hamnghi/tobi@latestYou may need to add the following environment variables to run tobi:
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
# Add Go binary paths and local user binaries to the system PATH
export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATHIf you pass no path, tobi uses OBSIDIAN_VAULT_PATH. Otherwise, it scans the given directory.
# Scan the current directory (your vault)
tobi .
# Or set a default vault path and run without arguments
export OBSIDIAN_VAULT_PATH=/path/to/your/vault
tobi
# Show top 10 tag names
tobi . --limit 10
# Show counts
tobi . --mode count
# Show relative frequencies (percent)
tobi . --mode relative
# Force a fresh scan (ignore cache)
tobi . --no-cacheBy default, tobi caches results in .tobi.json at your vault root. The cache is invalidated when files are added, removed, or modified. Use --no-cache to force a fresh scan and bypass the cache entirely.
tobi filters out files using patterns defined in both .gitignore and .tobiignore.
The .tobiignore file is specifically for tobi-only exclusions, which is useful if you want to exclude items from tobi without modifying your .gitignore. It follows the same pattern syntax as .gitignore.
The .tobi.exclude file excludes specific tags from the output (not files). Place it at your vault root with one glob pattern per line.
Example .tobi.exclude:
# skip all tags starting with "personal" or "daily"
{personal,daily}/*
# skip specific tags
work
project


