Docs
Configure documentation generation for READMEs, release notes, and other artifacts. Define multiple named documentation generators that can be invoked via atmos docs generate <name>.
Configuration
Documentation generation is configured in the docs.generate section:
atmos.yaml
Configuration Options
Each named section under docs.generate supports the following options:
base-dir- Base directory for resolving relative paths. Defaults to current working directory.
input- List of YAML input files to combine. Supports local paths and remote URLs via go-getter.
template- Path or URL to the Go template file used to generate the output.
output- Path where the generated documentation will be written.
terraform- Optional terraform-docs configuration for including Terraform documentation in the output.
Terraform Documentation Options
When terraform is configured, Atmos can include Terraform module documentation in your generated files:
terraform.source- Path to the Terraform module source directory.
terraform.enabled- Whether to generate Terraform documentation. Default:
false. terraform.format- Output format for Terraform docs. Options:
markdown,markdown table,tfvars hcl,tfvars json. Default:markdown table. terraform.show_providers- Include provider information in the output. Default:
false. terraform.show_inputs- Include input variables in the output. Default:
true. terraform.show_outputs- Include outputs in the output. Default:
true. terraform.sort_by- How to sort inputs/outputs. Options:
name,required,type. Default:name. terraform.hide_empty- Hide sections with no content. Default:
false. terraform.indent_level- Indentation level for nested content. Default:
2.
Multiple Documentation Generators
You can define as many documentation generators as needed. Each top-level key under docs.generate becomes a CLI argument:
atmos.yaml
Then invoke each generator by name:
atmos docs generate readme
atmos docs generate release-notes
atmos docs generate component-docs
Template Example
Templates use Go templating with Gomplate functions:
templates/README.md.gotmpl
Input File Sources
Local Sources
Supports absolute paths, relative paths, and paths relative to base-dir:
docs:
generate:
readme:
input:
# Absolute path
- "/Users/me/Documents/README.yaml"
# Relative to current directory
- "./README.yaml"
# Relative to base-dir
- "terraform/README.yaml"
Remote Sources
Atmos uses go-getter for downloading remote files:
docs:
generate:
readme:
input:
- "https://raw.githubusercontent.com/org/repo/main/README.yaml"
template: "https://raw.githubusercontent.com/org/repo/main/README.md.gotmpl"
Related Commands
atmos docs generate— Generate documentation artifactsatmos docs— Open Atmos documentation