💻 CLI Reference
The Mustela CLI is a high-performance binary designed for speed and predictability. It follows the standard POSIX conventions, making it easy to integrate into scripts, GitHub Actions, or local development workflows.
1. Commands
init
The starting point for every new project. It creates the necessary directory skeleton based on your needs.
- Usage:
mustela init - Behavior: Scaffolds the basic folder structure (content, theme, config).
- Presets: Use with
--presetto choose between a barebones Vanilla setup or a Vite-ready environment.
build
The core engine command. It performs a one-time full transpilation of your site.
- Usage:
mustela build [OPTIONS] - Process:
- Recursively loads all
.mufiles from the theme directory. - Parses the global configuration.
- Transpiles every Markdown file into an HTML leaf.
- Performance: Optimized for multi-core processing. Even for large sites, build times are measured in milliseconds.
watch
Your companion for local development.
- Usage:
mustela watch [OPTIONS] - Behavior: Mustela stays active and monitors your
content,theme, andconfigfolders for any file system events. - Hot Rebuild: When a change is detected, only the affected parts of the memory pool are updated, triggering an instantaneous rebuild of the output.
2. Global Options
Control how Mustela sees your project. These flags can be combined to point the engine at any directory structure.
| Flag | Argument | Default | Description |
|---|---|---|---|
-i, --input |
<DIR> |
./content |
The source of your raw Markdown data. |
-o, --output |
<DIR> |
./dist |
The destination for the generated "clean" HTML. |
-t, --theme |
<DIR> |
./theme |
Where your .mu component library lives. |
-c, --config |
<FILE> |
./config/mustela.mu |
Your site's global state and constants. |
-p, --preset |
<NAME> |
vanilla |
Choose vanilla for speed or vite for modern assets. |
-v, --verbose |
— | — | Dumps the internal state and processing steps to stdout. |
💡 Pro Tip
If your pages are coming out empty (the Safety Catch triggered), run:
mustela build --verbose
Mustela will tell you exactly which block it was looking for and which files it ingested into memory. It’s the fastest way to debug "Matchmaking" issues between your Markdown and DSL blocks.
Next Step: Ready to see the syntax? Head over to the Configuration & Metadata Reference.