1.7 KiB
Muse
A CLI for wrangling directories of source files.
Like a static generator, but for whatever.
Overview
Muse is a CLI and toolchain for operating on directories of json, yaml, toml, and markdown files. Each file can specify any shape of data. Muse scans included files, parses them into data, and streams the loaded data through processors and plugins.
Each processor can modify the data at compile time, as well as enact side effects such as writing files to disk.
Muse does not edit source files, it only reads them in.
Usage
Usage:
muse [/path/to/binding.yaml] <options>
Options:
--stdout -s Output final data to stdout
--verbose, -v Enable verbose logging
--help, -h Show this help message
Binding File
Each Muse project should specify a binding
file with the following shape:
include:
- ../another-project # Optional
files: # Optional
- "**/*.yaml"
contentKey: "content" # Optional
options: # Optional
someOption: someValue
processors:
- first-processor
- second-processor
The binding
file can be any of the supported file types for Muse. If
the CLI is invoked with a directory instead of a file, Muse will look
for a binding file in the directory with the following order:
binding.json
binding.yaml
binding.toml
binding.md
Markdown Files
Muse supports loading and parsing Markdown files with optional YAML frontmatter.
---
someKey: someValue
---
Your markdown content here
When loading markdown files, Muse will load the content of the file
into a key called content
by default. This can be changed in the binding
configuration by setting a contentKey
value as an override.