Documentation generation system for Terraform/OpenTofu providers
Project description
🍽️ Plating
A sophisticated documentation generation system for Terraform/OpenTofu providers
Plating is a powerful documentation system that brings culinary elegance to technical documentation. Just as a chef carefully plates and garnishes a dish, Plating helps you present your Terraform provider documentation beautifully.
✨ Features
- 🎯 Automatic Documentation Generation - Generate comprehensive docs from your provider code
- ✨ Smart Component Adorning - Automatically create documentation templates for undocumented components
- 🍽️ Beautiful Plating - Render documentation with examples, schemas, and rich formatting
- 🔍 Component Discovery - Automatically find and document resources, data sources, and functions
- 📝 Jinja2 Templates - Flexible templating with custom functions and filters
- 🔄 Schema Integration - Extract and format provider schemas automatically
📦 Prerequisites
Important: This project uses
uvfor Python environment and package management.
Install UV
Visit UV Documentation for more information.
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Using pipx (if you prefer)
pipx install uv
# Update UV to latest version
uv self update
🚀 Getting Started
Development Setup
# Clone the repository
git clone https://github.com/provide-io/garnish.git
cd garnish
# Create virtual environment
uv venv
# Activate virtual environment
source .venv/bin/activate # On Linux/macOS
# or
.venv\Scripts\activate # On Windows
# Install dependencies
uv sync
Installing as a Package
# Install from PyPI
uv add plating
# Or install from source
uv add git+https://github.com/provide-io/plating.git
📚 Usage Examples
1. Dress Your Components
First, create .plating bundles for your undocumented components:
# Adorn all missing components
plating adorn
# Adorn only resources
plating adorn --component-type resource
2. Customize Templates
Edit the generated templates in .plating/docs/:
---
page_title: "Resource: my_resource"
---
# my_resource
{{ "{{ example('basic') }}" }}
## Schema
{{ "{{ schema() }}" }}
3. Generate Documentation
Render your documentation:
# Generate docs in ./docs directory
plating plate
# Custom output directory
plating plate --output-dir ./documentation
📂 Bundle Structure
Each component has a .plating bundle:
my_resource.plating/
├── docs/
│ ├── my_resource.tmpl.md # Main template
│ └── _partial.md # Reusable partials
├── examples/
│ ├── basic.tf # Example configurations
│ └── advanced.tf
└── fixtures/ # Test data
└── test_config.json
🎨 Template Functions
Plating provides powerful template functions:
{{ "{{ example('name') }}" }}- Include an example file{{ "{{ schema() }}" }}- Render component schema{{ "{{ partial('name') }}" }}- Include a partial template{{ "{{ anchor('text') }}" }}- Create header anchors
🧪 Testing
Test your examples with the built-in test runner:
# Test all examples
plating test
# Test specific component types
plating test --component-type resource
🔧 Configuration
Configure Plating in your pyproject.toml:
[tool.plating]
provider_name = "my_provider"
output_dir = "docs"
component_types = ["resource", "data_source", "function"]
🏗️ Architecture
Plating follows a modular architecture:
- PlatingBundle - Represents documentation bundles
- PlatingPlater - Renders documentation
- PlatingAdorner - Creates documentation templates
- PlatingDiscovery - Finds components and bundles
- SchemaProcessor - Extracts provider schemas
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📜 License
Apache 2.0
🙏 Acknowledgments
Built with ❤️ using:
- attrs - Python classes without boilerplate
- Jinja2 - Powerful templating
- pyvider - Terraform provider framework
- click - Command line interface
- rich - Beautiful terminal output
Plating - Making documentation as delightful as a well-plated dish 🍽️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plating-0.0.1000.post0.tar.gz.
File metadata
- Download URL: plating-0.0.1000.post0.tar.gz
- Upload date:
- Size: 70.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c01abc35187669a6ac3bbc531dd661310fa9234b5831bde673a1be3069b6b6
|
|
| MD5 |
79e16ae083fc6c77257817531c8e95f7
|
|
| BLAKE2b-256 |
bfa360cd02f0e8251983cdc881feeb4457342a652b293b02a02bd5a4fcaafe8d
|
File details
Details for the file plating-0.0.1000.post0-py3-none-any.whl.
File metadata
- Download URL: plating-0.0.1000.post0-py3-none-any.whl
- Upload date:
- Size: 69.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df6d9e66d1c2f8884ee42de2a75f382c642a3b5d2bf5cee77e77ea1ab902ecb8
|
|
| MD5 |
91aea170885f2b6a29ddbdd89e5d6019
|
|
| BLAKE2b-256 |
e1aea8f57dd7dd4e68cb2d21417798cc953c48b52541dce87729dbed1ceb6ed2
|