| Crates.io | agedashi |
| lib.rs | agedashi |
| version | 0.2.0-beta.175 |
| created_at | 2025-11-11 03:09:25.87626+00 |
| updated_at | 2025-11-21 15:34:34.926105+00 |
| description | A Rust CLI tool that transforms Terraform/OpenTofu graph output into beautiful infrastructure diagrams |
| homepage | |
| repository | https://github.com/ltomes/Agedashi |
| max_upload_size | |
| id | 1926648 |
| size | 1,638,375 |
Making tofu pretty! 🍲
A Rust CLI utility that transforms Terraform/OpenTofu graph output into beautiful infrastructure diagrams.
Agedashi is a Rust command-line tool that reads Terraform/OpenTofu graph output and automatically generates visual architecture diagrams. It focuses on AWS resources and creates professional-looking infrastructure diagrams with minimal effort.
Why "Agedashi"? Like the Japanese dish where tofu is deep-fried to perfection, Agedashi takes your infrastructure-as-code (tofu/OpenTofu) and makes it visually appealing!
Here's what Agedashi generates from a Terraform graph in different layouts:


The diagrams show AWS resources with official AWS Architecture Icons, clean layouts, and automatic relationship mapping. Icons have rounded corners for a modern appearance, and resource names appear below each icon.
GraphViz is required to render diagrams:
brew install graphvizsudo apt-get install graphvizsudo dnf install graphvizRust toolchain:
git clone https://github.com/ltomes/Agedashi.git
cd agedashi
cargo build --release
sudo cp target/release/agedashi /usr/local/bin/
The simplest way to use agedashi is to pipe the output of tofu graph directly to it:
tofu graph | agedashi
This will generate a PNG file named infrastructure.png in your current directory.
agedashi [OPTIONS]
-o, --output <FORMAT> - Output format (svg, png, pdf, jpg) [default: png]-n, --name <NAME> - Output file name without extension [default: infrastructure]-d, --direction <DIR> - Graph direction: TB (top-to-bottom) or LR (left-to-right) [default: TB]-h, --help - Print help information-V, --version - Print version informationGenerate an SVG diagram:
tofu graph | agedashi --output svg
Create a diagram with a custom name:
tofu graph | agedashi --name my-infrastructure --output png
Create a left-to-right diagram in PDF format:
tofu graph | agedashi --direction LR --output pdf --name aws-architecture
Save the graph output first, then process it:
tofu graph > graph.dot
cat graph.dot | agedashi --output svg --name production
Agedashi currently maps the following AWS resource types to diagram icons:
aws_instance → EC2aws_lambda_function → Lambdaaws_ecs_* → ECSaws_eks_* → EKSaws_autoscaling_* → AutoScalingaws_db_instance → RDSaws_dynamodb_table → DynamoDBaws_elasticache_* → ElastiCacheaws_redshift_* → Redshiftaws_elb, aws_lb → ELB (Load Balancer)aws_vpc → VPCaws_subnet → PublicSubnetaws_route53_* → Route53aws_cloudfront_* → CloudFrontaws_api_gateway_* → API Gatewayaws_s3_bucket → S3aws_ebs_* → EBSaws_efs_* → EFSaws_iam_* → IAMaws_security_group → SecurityGroupaws_kms_* → KMSaws_sns_* → SNSaws_sqs_* → SQSaws_kinesis_* → KinesisResources not explicitly mapped will default to EC2 icons.
Navigate to your OpenTofu project:
cd /path/to/opentofu/project
Initialize OpenTofu (if not already done):
tofu init
Generate and visualize your infrastructure:
tofu graph | agedashi --output svg --name my-infra
Open the generated diagram:
# macOS
open my-infra.svg
# Linux
xdg-open my-infra.svg
# Windows
start my-infra.svg
dot command to render the final diagramThe core logic is written in Rust for speed and reliability, with GraphViz handling the final layout and rendering.
Check out the test/examples/ directory for sample Terraform configurations:
simple-aws.tf - Basic AWS setup with VPC, EC2, RDS, and S3complex-aws.tf - Advanced multi-tier architecture with 20+ servicesTo test with examples:
cd test/examples
tofu init
tofu graph | ../../target/release/agedashi --output png --name example
Agedashi requires GraphViz to render diagrams. Install it for your platform:
# macOS
brew install graphviz
# Ubuntu/Debian
sudo apt-get install graphviz
# Fedora
sudo dnf install graphviz
# Windows
# Download from https://graphviz.org/download/
This means your Terraform graph doesn't contain any AWS resources, or they're not being parsed correctly. Ensure you're using AWS provider resources in your Terraform configuration.
Set the AGEDASHI_DEBUG environment variable to save the generated DOT file:
AGEDASHI_DEBUG=1 tofu graph | agedashi --output png
This will save infrastructure.dot so you can inspect the generated GraphViz code.
Make sure you have the latest Rust toolchain:
rustup update stable
Contributions are welcome! Here are some ways you can help:
MIT License - see LICENSE file for details
Created with passion for infrastructure as code and beautiful diagrams.