Krafna
Krafna is a terminal-based alternative to Obsidian's Dataview plugin, allowing you to query your Markdown files using standard SQL syntax.
Features
- Query Markdown files in a directory using SQL-like syntax
- Support for frontmatter data extraction
- Flexible output formats (TSV and JSON)
- Compatible with Neovim plugin Perec
Installation
Cargo (Recommended)
Homebrew
Chocolatey
choco install krafna
Scoop
scoop bucket add 7sedam7 https://github.com/7sedam7/scoop-bucket
scoop install krafna
Usage
Basic Query
Find Files
Output as JSON
Include Specific Fields
Syntax Differences from Dataview
- Uses standard SQL syntax
- Selection of "table" to query is done with
FROM FRONTMATTER_DATA("<path>")function, that makes all md files within a row (their frontmatter data). Currently no other sources and no JOINs. I plan to add them later. - Not all Dataview features are implemented yet
Neovim Integration
Use with the Perec Neovim plugin for seamless integration.