A command-line rubber duck that writes IaC templates
aiac translates plain-English prompts into Terraform, Dockerfiles, and bash scripts by asking OpenAI, Bedrock, or Ollama to do the actual typing.

What it does
aiac is a Go library and CLI tool that acts as a specialized courier—well-structured glue, really—between your terminal and a large language model. You describe what you need—say, a highly available EKS cluster or a secured nginx Dockerfile—in plain English, and it forwards the request to your chosen LLM provider, then extracts the generated code to your terminal or a file. It also opens an interactive shell by default so you can iterate on the result without copy-pasting into a browser chat.
The interesting bit
The project’s real architecture is in the “backend” abstraction introduced in v5. Instead of passing API keys and endpoints via command-line flags or environment variables, you define named backends—aws_prod, localhost, azure_openai—in a TOML configuration file. This lets you switch between a corporate Bedrock deployment and a local Ollama server by changing a single flag, effectively treating LLM providers like interchangeable compiler targets.
Key highlights
- Supports OpenAI, Amazon Bedrock, and Ollama out of the box, with per-backend model defaults and custom headers.
- Generates not just Terraform and CloudFormation, but also CI/CD pipelines, Kubernetes manifests, OPA policies, database queries, and ad-hoc scripts.
- Usable as both a standalone CLI and an importable Go library (
libaiac). - Interactive mode lets you converse with the model, retry requests, and save output; quiet mode pipes straight to stdout or clipboard.
- v5 moved all provider credentials and settings into a mandatory TOML config file, retiring command-line flags for API keys.
Caveats
- Ollama deployments behind an authenticating proxy are explicitly not supported.
- The
--list-modelscommand may surface models your account cannot actually access, depending on the provider. - v5 broke backward compatibility significantly; upgrading from v4 requires migrating to the new TOML backend configuration.
Verdict Worth a look if you spend a lot of time scaffolding similar Terraform or CloudFormation stacks and already have LLM API access. Skip it if you need guaranteed deterministic output or cannot tolerate the occasional hallucinated security group rule.
Frequently asked
- What is gofireflyio/aiac?
- aiac translates plain-English prompts into Terraform, Dockerfiles, and bash scripts by asking OpenAI, Bedrock, or Ollama to do the actual typing.
- Is aiac open source?
- Yes — gofireflyio/aiac is open source, released under the Apache-2.0 license.
- What language is aiac written in?
- gofireflyio/aiac is primarily written in Go.
- How popular is aiac?
- gofireflyio/aiac has 3.8k stars on GitHub.
- Where can I find aiac?
- gofireflyio/aiac is on GitHub at https://github.com/gofireflyio/aiac.