This page is the technical reference companion to:
docs/how-to-use.md(primary beginner-friendly guide)
Use this page when you need command variants, execution context choices, and workflow mapping.
doc-gen [OPTIONS] COMMAND [ARGS]...Main commands:
initstructure generatestructure printstructure analyze
Global options:
--help--version--no-banner
doc-gen init [--mode <mode>] [--force] [--ask] [--dry-run]Supported modes:
all- Initialize everythingconfig- Initialize configuration only
Examples:
doc-gen init
doc-gen init --mode all
doc-gen init --mode config --ask
doc-gen init --mode all --force
doc-gen init --dry-rundoc-gen structure generate [OPTIONS]Supported options:
--profile [minimal|default|detailed]--smart / --no-smart--max-depth INTEGER--show-files / --no-files--output FILE--dry-run / --no-dry-run
Examples:
doc-gen structure generate
doc-gen structure generate --profile minimal
doc-gen structure generate --smart
doc-gen structure generate --max-depth 2
doc-gen structure generate --show-files
doc-gen structure generate --output my-docs.md
doc-gen structure generate --output my-docs.md --dry-rundoc-gen structure print [OPTIONS]Supported options:
- Same as generate command
--dry-run / --no-dry-run
Examples:
doc-gen structure print
doc-gen structure print --smart
doc-gen structure print --max-depth 3
doc-gen structure print --dry-rundoc-gen structure analyze [OPTIONS]Examples:
doc-gen structure analyze
doc-gen structure analyze --smart
doc-gen structure analyze --dry-rundoc-gen structure generatepython -m doc_gen structure generatedocker run -it --rm -w /workspace -v "${PWD}:/workspace" doc-gen structure generateReference common automation from Makefile:
make l-generate
make l-generate-smart
make l-print
make l-print-smart
make l-analyzemake d-generate
make d-generate-smart
make d-print
make d-print-smart
make d-analyzemake c-generate
make c-generate-smart
make c-print
make c-print-smart
make c-analyzeRecommended sequence:
- Initialize configuration (if needed) (
doc-gen init) - Run print command first to preview
- Generate documentation
Example:
doc-gen init
doc-gen structure print
doc-gen structure generateFor a non-mutating generation preview, run:
doc-gen structure generate --dry-run- Verify command is available:
doc-gen --help
- Verify target directory exists
- Retry with debug (if available):
doc-gen structure generate --help
- Confirm config exists:
.projectstructure.toml
- Success: exit code
0 - Failure conditions: non-zero exit
- Known configuration, target, structure, and filesystem failures include a concise reason and suggested correction.
- Unexpected implementation details and Python tracebacks are hidden from normal output. Retry with global
--debugand inspect the configured log file for technical diagnostics. - The error boundary does not weaken initialization or generated-output
--dry-runsafety.
- Beginner guide:
docs/how-to-use.md - Commands detail:
docs/user-guide/commands.md - Configuration:
docs/configuration.md - Dry-run safety:
docs/dry-run.md - Installation:
docs/installation.md