# pleme-doc-gen
Rust replacement for the M0 Python `_gen-patterns.py` + `_gen-docs.py`
scripts in [`pleme-io/actions`](https://github.com/pleme-io/actions).
Per the [★★ NO-SHELL prime directive](https://github.com/pleme-io/blackmatter-pleme/blob/main/skills/pleme-io-pattern-core/SKILL.md):
build-time generators belong in Rust, not Python.
## Install
```bash
cargo install pleme-doc-gen
```
## Subcommands
```bash
pleme-doc-gen patterns # emit patterns-full.nix to stdout
pleme-doc-gen docs # write per-action README.md files
pleme-doc-gen index # write root README.md catalog
pleme-doc-gen all # write all three
pleme-doc-gen --actions-dir /path/to/pleme-io/actions all
```
## What it produces
- **`patterns-full.nix`** — mechanical mirror of every action's catalog
entry, queryable via `substrate.lib.release.patterns`.
- **Per-action `README.md`** — rich table-driven docs with quickstart,
inputs, outputs, related primitives, config schema pointer.
- **Root `README.md`** — catalog index with 30+ category sections.
## Self-published via the directive
This crate is itself an adopter of the [★★ AUTO-RELEASE directive](https://github.com/pleme-io/blackmatter-pleme/blob/main/skills/pleme-io-auto-release/SKILL.md):
every push to `main` auto-bumps + auto-publishes to crates.io. The
substrate's [`pleme-io-action-vocabulary` skill](https://github.com/pleme-io/blackmatter-pleme/blob/main/skills/pleme-io-action-vocabulary/SKILL.md)
documents the canonical pattern this crate ships.
## License
MIT.