Usage
How it works
- You describe the infrastructure change in natural language
- AI generates a JSON plan with AWS CLI commands
- You review the plan
- You apply the plan with
clanker ask --apply
Examples
Flags
Enable maker mode to generate infrastructure plans
Allow destructive operations (deletions, replacements) in the plan
Explicitly set provider to AWS (inferred automatically if not specified)
AWS profile to use for plan generation and dependency resolution
AI profile to use for plan generation
OpenAI API key (overrides config)
Anthropic API key (overrides config)
Gemini API key (overrides config)
DeepSeek API key (overrides config)
MiniMax API key (overrides config)
Plan structure
Generated plans follow this JSON schema:Plan fields
Plan schema version (currently 1)
ISO 8601 timestamp when plan was generated
Cloud provider (
aws, gcp, azure, or cloudflare)Original natural language request
Human-readable description of what the plan does
Array of AWS CLI commands to execute
Optional notes about the plan (warnings, prerequisites, etc.)
Command fields
AWS CLI command arguments as individual tokens
Explanation of why this command is needed
Output variables produced by this command (e.g., resource IDs, ARNs)
Variable substitution
Plans support variable substitution using${VARIABLE_NAME} syntax:
${VPC_ID} will be replaced with the actual VPC ID from the first command’s output.
Plan enrichment
During generation, plans are automatically enriched with:Dependency resolution
- VPC IDs for subnet/security group commands
- Subnet IDs for EC2/RDS commands
- Security group IDs for ingress/egress rules
- ARNs for IAM policies
Validation
- Command syntax validation
- Required parameter checks
- Resource naming constraints
- Region availability
Safety checks
- Destructive operation warnings
- Resource dependency analysis
- Conflict detection
Destroyer mode
By default, maker won’t generate destructive operations. Use--destroyer to allow:
- Resource deletions (
delete-bucket,delete-stack, etc.) - Replacements that cause downtime
- Data loss operations
- Network disruptions
Multi-cloud support
Maker automatically detects the target cloud provider:Saving and applying plans
Best practices
Troubleshooting
Plan generation fails
Invalid plan structure
If the AI generates an invalid plan, the parser will retry up to 4 times with corrections. Common issues:- Empty commands array → AI regenerates with at least one command
- Invalid JSON → AI outputs valid JSON without markdown code fences
- Missing args → AI ensures all commands have non-empty args arrays
Dependency resolution errors
If plan generation fails due to missing dependencies:See also
- AWS apply command - Execute generated plans
- Ask command - Natural language infrastructure queries
- AWS commands overview - All AWS commands