
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@onigetoc/mdsearch
Advanced tools
Blazing-fast full-text search CLI for Markdown knowledge bases with automatic indexing, fuzzy search, contextual snippets, and LLM-ready output.
Local full-text search CLI for Markdown knowledge bases, Obsidian vaults, and note collections. Powered by MiniSearch, with automatic indexing, fuzzy search, contextual snippets with line numbers, and LLM-ready output.
mdsearch helps AI tools and LLM workflows retrieve relevant context from Markdown knowledge bases. Search results are available in structured formats designed for AI agents, automation, and context retrieval.
For maximum token efficiency and streamlined context retrieval, we recommend using the dedicated mdsearch skill which provides automated, ready-to-use workflows for your LLM agents:
https://github.com/onigetoc/mdsearch-skill
npm install -g @onigetoc/mdsearch
After global install, use mdsearch directly (no npx):
mdsearch "<query>" # search current directory
mdsearch "<query>" <folder> # search a specific folder
npx @onigetoc/mdsearch "<query>" [<folder>]
Folder defaults to the current directory if omitted. The index is auto-built on first run (cache in .mdsearch/).
# SIMPLE
mdsearch "karpathy llm wiki" # current dir, fuzzy=0.2 (default)
mdsearch "karpathy llm wiki" notes-test # specific folder
mdsearch "term" --no-fuzzy # exact only
mdsearch "term" --fuzzy 0.4 # wider fuzzy
# BOOST
mdsearch "term" # boost: title=3, headings=2, text=1
mdsearch "term" --boost-title 5 --boost-headings 3 --boost-text 1
# CONTEXT / LIMIT
mdsearch "term" --limit 5
mdsearch "term" --context 0 # no snippet
mdsearch "term" --context 4
# OUTPUT FORMAT
mdsearch "term" # human-readable
mdsearch "term" --json # JSON with normalized scores + line
mdsearch "term" --context 4 --llm-context # compact for LLM prompts
# PREFIX, PHRASE & AND
mdsearch "minis" --prefix
mdsearch "karpathy llm" --phrase # exact phrase (sequence of terms)
mdsearch "karpathy llm" --and # require all terms (default: OR)
# CACHE / INDEX
mdindex ~/my-notes # pre-build index
mdindex ~/my-notes --cache-dir .mycache
mdsearch "term" --reindex # force rebuild
mdsearch "term" ~/my-notes --cache-dir .mycache
# VERSION / HELP / LIST
mdsearch --version
mdsearch --help
mdsearch --list # list indexed files (auto-build if missing)
mdsearch --list --reindex # force re-index before listing
node src/search-md.mjs "<query>" # test without installing
| Flag | Type | Default | Description |
|---|---|---|---|
--no-fuzzy | boolean | false | Disable fuzzy matching (exact search only) |
--prefix | boolean | false | Enable prefix search (match term prefixes) |
--phrase | boolean | false | Exact phrase search (sequence of terms in order) |
--and | boolean | false | Require all terms (default is OR — any term matches) |
--boost-title | number | 3 | Weight multiplier for matches in document title |
--boost-headings | number | 2 | Weight multiplier for matches in headings |
--boost-text | number | 1 | Weight multiplier for matches in body text |
--limit | number | 10 | Maximum number of results to return |
--context | number | 2 | Lines of context before/after match (0 = snippet disabled) |
--json | boolean | false | Output results as JSON |
--llm-context | boolean | false | Compact LLM-friendly output format |
--reindex | boolean | false | Force rebuild the search index |
--cache-dir | string | .mdsearch | Custom cache directory name |
--list | boolean | false | List all indexed files |
--version | boolean | false | Show version number |
--help | boolean | false | Show help message |
.mdsearch/ contains:
index.json - serialized MiniSearch indexmeta.json - folder signature (file count + max mtime), id → absolute path mappingIf the signature changes (file added/removed/modified), search-md.mjs detects it and re-indexes automatically.
All formats include line numbers and normalized scores (0.00 - 1.00).
| Mode | Example |
|---|---|
| Terminal | line 42: → matching content with highlighted match line |
| JSON | { "path": "...", "line": 42, "score": 0.92, "snippet": "..." } |
| LLM context | Confidence: 0.92 for each result, clean body without markers |
FAQs
Blazing-fast full-text search CLI for Markdown knowledge bases with automatic indexing, fuzzy search, contextual snippets, and LLM-ready output.
We found that @onigetoc/mdsearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.