Commands
Crust provides several commands to help you analyze and understand your Terraform infrastructure. Here’s a complete list of available commands:
Main Commands
crust init
Initializes Crust by creating a configuration file at ~/.crust.json
.
This command will ask for:
- OpenAI API key
- Terraform plan command
- Preferred language
crust security
Analyzes your Terraform infrastructure for potential security issues using OpenAI.
This command will:
- Run your Terraform plan
- Use OpenAI to analyze security issues
- Present findings with colorized output
crust cost
Analyzes the cost of your AWS infrastructure changes using the AWS Pricing API.
This command will:
- Run your Terraform plan
- Calculate costs using AWS Pricing API
- Show cost comparisons
- Present results in a formatted table
crust explain
Provides a clear explanation of your Terraform plan using OpenAI.
This command will:
- Run your Terraform plan
- Generate a clear explanation in your configured language
- Include tips and recommendations
crust all
Runs all analyses (security, cost, and explanation) at once.
This command will:
- Run the Terraform plan once
- Execute all three analyses on the output
- Present all results together
Global Options
All commands support the following global options:
--help
: Show help for the command--version
: Show version information--openai-api-key <key>
: OpenAI API key to use for analysis--language <language>
: Language to use for the analysis (e.g., “en”, “pt-br”)--terraform-plan-command <command>
: Command to execute terraform plan
Examples
Basic Usage
Configuration
Crust is configured through a global configuration file at ~/.crust.json
:
See the Configuration Guide for more details.