Getting started in 5 minutes
From zero to a validated, deployable serverless API. All you need is Node.js 20+.
1. Install
npm install -g iacmpCheck it worked:
iacmp --versionCommand not found?
The installer links iacmp into your PATH for immediate use. If your shell still can't find it, open a new terminal. Still nothing? Diagnose with:
npx iacmp doctor2. Create a project
iacmp init my-api --template serverless
cd my-apiThis generates a complete, working project:
my-api/
iacmp.json # provider, region, language
stacks/ # your infrastructure, one stack per domain
src/handlers/ # TypeScript handlers (cloud-agnostic)
CLAUDE.md # guides AI agents through the right flowWant to see the other templates (blank, hello, rds, webapp, network, serverless, fullstack)?
iacmp init --list3. Look at what you got
A stack is plain TypeScript — no YAML, no HCL:
import { Stack, Fn, Database, ref } from '@iacmp/core';
const stack = new Stack('ApiStack');
new Database.DynamoDB(stack, 'ItemsTable', { partitionKey: 'id' });
new Fn.Lambda(stack, 'ItemsFn', {
runtime: 'nodejs20',
handler: 'index.handler',
code: 'dist/handlers/items',
environment: { TABLE_NAME: ref('ItemsTable', 'Name') },
});
export default stack;Handlers use the cloud-agnostic @iacmp/runtime facade — the same code runs on Lambda, Azure Functions and Cloud Functions:
import { table } from '@iacmp/runtime';
export async function handler() {
const items = await table('ItemsTable').scan();
return { statusCode: 200, body: JSON.stringify(items) };
}4. Synthesize
iacmp synthThis compiles your stacks to the native format of the configured provider (CloudFormation by default) and validates them — both with iacmp's own semantic checks and with the cloud's validator when your CLI is configured:
✔ ApiStack → out/aws/api-stack.json
CFN validate OK: api-stackTry the other clouds from the same code:
iacmp synth --provider azure # → Bicep
iacmp synth --provider gcp # → Terraform (tf.json)5. Deploy (optional, but the fun part)
You need the target cloud's CLI configured. Never used a cloud? Follow Cloud accounts and CLIs — it goes from creating the account to authenticating, step by step. Already have an AWS account? Then it's just:
aws configure # access key, secret, region
iacmp doctor # checks everything is in placeThen:
iacmp deploy --dry-run --provider aws # shows exactly what would be created
iacmp deploy --provider aws # deploys for real (asks for confirmation)Without --provider, iacmp uses the one set in the project's iacmp.json (aws, azure or gcp).
When you're done experimenting:
iacmp destroy --provider aws # removes everything (asks for confirmation)6. Explore
iacmp diagram # C4 architecture diagram from your stacks
iacmp audit-all # security, high-availability and DR audits
iacmp diff # what would change on the next deployLanguage
The CLI speaks English (default) and Portuguese:
IACMP_LANG=pt iacmp synth # one-off
export IACMP_LANG=pt # set it once in your shell profileNext step
Let an AI agent do the writing: use iacmp with Claude Code.