Skip to main content

documator

A documentation CLI. This readme is itself rendered from templates/README.md into the repository root by the documator render command.

Install

uv sync

Usage

documator [--quiet] render INPUT_DIR OUTPUT_DIR [--watch] [--check] [--timeout SECONDS]
documator [--quiet] skills INPUT_DIR OUTPUT_DIR [--watch] [--timeout SECONDS]

render mirrors the input tree.

                                                                                
 Usage: documator render [OPTIONS] {input_dir} {output_dir}                     
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    input_dir       <parse>  [required]                                     │
│ *    output_dir      <parse>  [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --watch                                                                      │
│ --check                                                                      │
│ --timeout        SECONDS  [default: root=10.0]                               │
│ --help                    Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

--check renders the whole tree and writes none of it: nothing is created, overwritten or pruned. Every output that is missing, out of date, or still tracked after its template went away is reported, and the run exits non-zero — so CI can fail on a repository whose generated files have drifted from their templates without the job being able to paper over it. Blocks still run, since their output is what the comparison is about; --check bounds what documator writes, not what a template's commands do. It cannot be combined with --watch.

skills compiles the same templates into the flat <skill-name>/SKILL.md layout Claude's skill loader expects: nesting in the input tree is organisational only, the filename stem becomes the skill name, and the frontmatter is generated — any keys the template declares pass through, and a declared description wins over the name-derived placeholder.

An example tree might look like:

my-templates/
├── foo.md
├── bar/
│   └── SKILL.md
├── _hidden.md

and would result in:

.skills/
├── foo/
│   └── SKILL.md
├── bar/
│   └── SKILL.md
                                                                                
 Usage: documator skills [OPTIONS] {input_dir} {output_dir}                     
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    input_dir       <parse>  [required]                                     │
│ *    output_dir      <parse>  [required]                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --watch                                                                      │
│ --timeout        SECONDS  [default: root=10.0]                               │
│ --help                    Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

Output

Every problem is logged where it arises and again at the end of the run, so a long render does not bury its errors above the scrollback. The run closes with a count — 12 files, 1 warning, 2 errors — followed by the warnings and then the errors, worst news nearest the prompt. Under --watch each recompile closes the same way, since a session has no other end to report at.

Log lines are coloured by level when stderr is a terminal, and plain when it is a pipe or when NO_COLOR is set. --quiet drops the per-file chatter and keeps warnings, errors and the summary; a quiet run that prints nothing is a run that had nothing to report.

Try it

mkdir -p docs/guides/plan/references out compiled
printf '# Review\n\nRead the diff before the description.\n' > docs/guides/review.md
printf -- '---\ndescription: Plan a change\n---\n# Plan\n' > docs/guides/plan/SKILL.md
echo '# Spec' > docs/guides/plan/references/spec.md
uv run documator render docs out
uv run documator skills docs compiled

Two layouts over one tree. render mirrors it into out/, so guides/review.md stays guides/review.md. skills flattens it into compiled/: the bare guides/review.md becomes review/SKILL.md with a name-derived description, and the guides/plan/ folder becomes plan/SKILL.md — carrying its declared description through — with references/spec.md bundled beside it as plan/references/spec.md.

This block is extracted verbatim and run by test_readme.py.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

documator-1.0.0.tar.gz (85.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

documator-1.0.0-py3-none-any.whl (63.7 kB view details)

Uploaded Python 3

File details

Details for the file documator-1.0.0.tar.gz.

File metadata

  • Download URL: documator-1.0.0.tar.gz
  • Upload date:
  • Size: 85.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for documator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 14c56e77a5c0e132304883659647ac9df89bee7e3f4c9817e310ee811684968a
MD5 2c156f321392b5fc9d712a27953707f4
BLAKE2b-256 4026e1a03377ab058806b0eee408fc23d0a2f237f69f9864da7b94a2f7bcbc82

See more details on using hashes here.

Provenance

The following attestation bundles were made for documator-1.0.0.tar.gz:

Publisher: ci.yml on MartinBernstorff/documator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file documator-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: documator-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 63.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for documator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 673efb1470d5a41f4bd73030268207e3fc4398e8e5ab14e13f8622e6bf2fce0e
MD5 727a08bd59bd69540323b876732fbd7e
BLAKE2b-256 50c23da0752edc686d405dc9ea20940b50ce49ee2c9c7e8ccaae8c6fab26f1bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for documator-1.0.0-py3-none-any.whl:

Publisher: ci.yml on MartinBernstorff/documator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.5.0

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page