mx build
Build a .mandex package from a docs directory
Usage
mx build <path> --name <name> --version <version> [-o output]
For package authors. Walks a directory of Markdown/MDX files, chunks the content, and creates a .mandex package with a SQLite FTS5 index.
Flags
| Flag | Description |
|---|---|
--name <name> | Package name (required) |
--version <version> | Package version (required) |
-o <path> | Output file path (default: ./<name>-<version>.mandex) |
Example
# Build from a docs directory
mx build ./docs --name mylib --version 1.0.0
# Custom output path
mx build ./docs --name mylib --version 1.0.0 -o dist/mylib.mandex
$ mx build ./docs --name mylib --version 1.0.0
Scanning ./docs...
✓ 47 files, 312 chunks
✓ FTS5 index built
✓ mylib-1.0.0.mandex (1.8 MB)
What happens
- Recursively walks the directory for
.mdand.mdxfiles - Chunks content into searchable entries
- Builds a SQLite database with FTS5 full-text search index
- Compresses with zstd into a
.mandexfile
See For Authors for a full guide on creating and publishing packages.