Plan, deploy, and audit cloud infrastructure from a single reproducible spec — compiles declarative components to plain Terraform.
Project description
infra-designer
Plan, deploy, and audit cloud infrastructure from a single reproducible spec — right inside your coding agent.
Describe the app you want to build; infra-designer interviews you for the requirements
that actually pick and size components, designs a right-sized architecture, and writes a
canonical spec.json into your repo. From that one spec it deterministically generates
plain Terraform (or idempotent shell scripts), an architecture diagram, and a
drift audit — all output you own, no lock-in.
It's harness-agnostic: the same engine and instructions run in Claude Code, Codex, Cursor, or anything that speaks MCP.
flowchart LR
req["your requirements"] --> spec["infra/<project>/spec.json<br/>(source of truth)"]
spec --> tf["Terraform / deploy.sh"]
spec --> dia["diagram (drawio + mermaid)"]
spec --> aud["drift audit"]
It right-sizes the stack instead of defaulting to heavyweight AWS: a simple app gets a Vercel + Supabase design; a photo-sharing app at scale gets ALB + ECS + S3 + a media pipeline. It honors a stated preference in either direction ("I'm fine with managed services" vs "everything in our AWS VPC").
Install
Prerequisite (all harnesses): Python 3.11+. Deploying additionally needs the Terraform CLI (default backend) or the AWS CLI (the no-IaC backend).
Claude Code
Run these two commands in Claude Code:
/plugin marketplace add AlexK020908/infra-designer
/plugin install infra-designer@infra-designer-marketplace
That's it — /plan-infra, /deploy, and /audit are now available in any repo.
Codex / Cursor / generic agents
First install the engine as a CLI (gives you an infra-designer command on your PATH):
pipx install infra-designer # or: pip install infra-designer
Then get the agent instructions + components by cloning the repo and pointing your agent at it:
git clone https://github.com/AlexK020908/infra-designer.git
- Codex auto-reads
infra-plugin/AGENTS.md— open the repo (or copyAGENTS.mdinto your project) and ask it to design infrastructure. - Cursor — copy
infra-plugin/adapters/cursor/infra-designer.mdcinto your workspace's.cursor/rules/. - Anything with MCP — register
infra-plugin/adapters/mcp/server.py(seeadapters/mcp/README.md). This is the universal path.
See infra-plugin/adapters/README.md for the full
adapter table.
Use it
In Claude Code:
/plan-infra a full-stack Next.js app with email login and CRUD, a few hundred users.
I'm happy to use Vercel + Supabase and don't want to manage servers.
It confirms the requirements with you, then writes everything into a per-project folder in your current repo:
infra/<project-name>/
spec.json # canonical source of truth (hand-off artifact)
spec.lock.json # pinned component versions
diagram.drawio # AWS-icon diagram (open at app.diagrams.net)
diagram.mmd # Mermaid (renders inline in GitHub/IDEs)
Then /deploy renders the spec to Terraform (or deploy.sh) and applies it, and
/audit diffs the live infrastructure back against the spec. Each design lives in its
own infra/<project-name>/ folder, so multiple designs in one repo never overwrite each
other.
On other harnesses, just ask in natural language ("design infra for …", "deploy it", "audit for drift") — same engine, same files.
How it works
One canonical spec.json is the source of truth; the Terraform, the diagram, and the
audit are all deterministic projections of it. The spec composes declarative
components from a registry (aws.alb, aws.ecs.service, aws.rds.postgres,
web.frontend (Vercel), supabase.database, …), each of which compiles to standard
Terraform. Wiring between components (IAM policies, security-group rules, load-balancer
target groups) is generated from the spec's edges.
Full component registry, the wiring model, and the engine CLI are documented in infra-plugin/README.md.
Contributing
The main extension point is authoring new components. See CONTRIBUTING.md and the component contract in infra-plugin/components/CONTRACT.md.
License
MIT © Alex Kang
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 infra_designer-0.1.0.tar.gz.
File metadata
- Download URL: infra_designer-0.1.0.tar.gz
- Upload date:
- Size: 57.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1e1a2bb5c203a46ed117a4ade11f1ef825abe5487ed0c12d4da867cd617901
|
|
| MD5 |
a025f2dbf4378307bc4b178ceb316b5f
|
|
| BLAKE2b-256 |
4667fc967323d5a5d14b32a402512c27b4d3bd67710eb7e4b2e316cd0c0378ee
|
File details
Details for the file infra_designer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: infra_designer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 82.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cbf5e1dd65f8efd9dbdbe90446862201f17e46e1dd00698ced67b5a6fd9aebc
|
|
| MD5 |
669325b7696cf3234176735fa66a00b8
|
|
| BLAKE2b-256 |
3da3f81e11fea28c85dcc97a66ccc7eb056132264a483a796aed64202177c781
|