Search Command

zetl search provides full-text content search across all Markdown files in the vault.

(given fulltext-search-done)
(given regex-support)

Usage

# Literal text search
zetl -d . search "defeasible"

# Regex search
zetl -d . search "reason(ing|ed)" --regex

# With surrounding context
zetl -d . search "Cache" --context 100

# Case-sensitive
zetl -d . search "SPL" --case-sensitive

# Restrict to a subdirectory
zetl -d . search "given" --path "theories/*"

Flags

FlagDefaultDescription
--context N0Include N characters of surrounding text
--limit N50Max results to return
--regexoffInterpret query as a regular expression
--case-sensitiveoffRequire exact case match
--alloffSearch raw content (include frontmatter, code blocks)
--path <glob>noneRestrict results to files matching glob

Content filtering

By default, search skips frontmatter and fenced code blocks to focus on prose. Use --all to search raw file content including concepts/Spindle Lisp blocks and YAML frontmatter.

Design decision

zetl uses index-free scanning rather than an inverted index. This trades query speed on very large vaults for zero build-time indexing cost and simpler architecture. See ADR-002 Search Without Index for the rationale.

Fuzzy page name matching

For finding pages by name rather than content, use Similar Command instead:

zetl -d . similar "reasning engine"

See also: CLI Reference, Similar Command, Links Command, TUI

Backlinks