Offline command. Parses an application’s
infrastructure.ts with the codemod engine and reports whether it is valid. It makes no AWS calls at any level, including --synth.Prerequisites
Prerequisites
- An application created with
fjall create app, so aninfrastructure.tsfile exists. - Run the command from your project root (where the
fjall/directory lives). - Node 22.3 or later.
--deepneeds the application’s TypeScript toolchain to resolve.--synthadditionally needs the application’s dependencies installed, because it runs the real CDK synthesiser.
Validate an application
infrastructure.ts for a single application:
--app is required. The three levels stack. --synth on its own is refused with Invalid invocation: --synth requires --deep.
What Happens
- Resolves the
infrastructure.tspath for the application you pass to--app, against your current directory. - Parses the file with the codemod engine (an AST parse, no AWS calls) and prints
Parse: OK. - With
--deep, typechecks the application and printsTypecheck: OK, orTypecheck: FAILEDwith the type errors. - With
--deep --synth, synthesises the CloudFormation template offline and printsSynth: OK, orSynth: FAILEDwith the CDK error. Synth runs only above a green typecheck.
--synth, the command reads local files only. It never contacts AWS, writes to infrastructure.ts, or touches the .fjall history directory, so there is nothing to dry-run. --synth writes the synthesised template tree to cdk.out/ beside the application, still with no AWS lookups.
--deep checks the whole application
Every Fjall-scaffolded application ships a tsconfig.json next to infrastructure.ts, so --deep runs tsc --project <app>/tsconfig.json --noEmit. A type error anywhere in that project fails the check, not only errors in infrastructure.ts. Applications with no tsconfig.json fall back to checking infrastructure.ts alone.
The typecheck times out after 60 seconds, synth after 5 minutes. A timeout is reported as a failure.
Output
A successful parse prints the absolute resolved path:--synth render a progress screen instead of plain text. --synth always uses the plain-text lane. Pass --non-interactive for plain text everywhere.
Agent mode
Pass--agent to emit structured output for AI agents. The result carries action, target (the application), path, parse, typecheck and synth, plus details when the typecheck failed and synthDetails when synth failed.
typecheck and synth each read ok, failed or skipped. synth reads skipped unless you passed --synth and the typecheck came back green. A failed typecheck or synth exits non-zero.
Exit codes
Wirefjall validate into a CI gate ahead of fjall deploy and branch on the exit code.
Options
Next Steps
fjall deploy
Deploy a validated application’s infrastructure to AWS.
fjall add
Add a resource to an application’s infrastructure.
fjall list
List the resources declared in an application’s infrastructure.
CI/CD deploys
Gate a pipeline on validation before it deploys.