Skip to content

Latest commit

 

History

History
93 lines (62 loc) · 1.71 KB

File metadata and controls

93 lines (62 loc) · 1.71 KB

FMD - Fast Markdown Search

Tiny, self-contained CLI to search your markdown notes, docs, and knowledge bases.

Powered by SeekStorm (BM25F ranking).

Features

  • Single binary: ~8MB, no runtime dependencies
  • Smart ranking: Title matches rank higher than body matches
  • Phrase search: "exact phrase" queries
  • Synonyms: Configurable synonym expansion

Installation

RUSTFLAGS="-C target-cpu=native" cargo build --release

The binary is at target/release/fmd.

Usage

Add a directory to index

fmd add ~/notes --name notes
fmd add ~/docs --name docs --pattern "**/*.md"

Search indexed documents

# Basic search
fmd search "kubernetes deployment"

# Phrase search
fmd search '"error handling"'

# Limit results
fmd search "query" -n 5

# Search specific collection
fmd search "query" -c notes

Manage collections

# List all collections
fmd list

# Remove a collection
fmd remove notes

# Re-index all collections
fmd update

# Show index status
fmd status

Manage synonyms

# List current synonyms
fmd synonym list

# Add a synonym group
fmd synonym add kubernetes k8s

# After adding synonyms, rebuild index
fmd update

Storage Locations

  • Index: ~/.cache/fmd/index/
  • Config: ~/.config/fmd/config.json
  • Synonyms: ~/.config/fmd/synonyms.txt

How It Works

FMD parses markdown files and extracts:

  • title: First # heading (boost 10x)
  • headers: All ## and ### headings (boost 5x)
  • body: Full document content (boost 1x)

This allows searches to rank documents where query terms appear in titles higher than those where terms only appear in the body.

License

MIT