Skip to main content
Read-only command. Parses an application’s infrastructure.ts with the codemod engine and reports whether it is valid. It does not query AWS or change any files.
  • An application created with fjall create app, so an infrastructure.ts file exists.
  • Run the command from your project root (where the fjall/ directory lives).
  • For --deep validation, the application’s TypeScript toolchain must resolve (fjall workspace dependencies installed). Node 22 or later is required.

Validate an application

fjall validate --app <name>
Validate the infrastructure.ts for a single application:
fjall validate --app api
Run a deep check that also type-checks the file with tsc --noEmit:
fjall validate --app web --deep
The --app flag is required. Without --deep, the command parses the file only. With --deep, it additionally surfaces any TypeScript type errors.

What Happens

  1. Resolves the infrastructure.ts path for the application you pass to --app.
  2. Parses the file with the codemod engine (an AST parser, no AWS calls).
  3. Reports Parse: OK when the file is structurally valid.
  4. With --deep, runs tsc --noEmit and reports Typecheck: OK or Typecheck: FAILED with the type errors.
The command reads local files only. It never contacts AWS, writes to infrastructure.ts, or touches the .fjall history directory. There is nothing to dry-run, because nothing is mutated. A successful parse prints the file path:
Parse: OK (fjall/api/infrastructure.ts)
Validated
A deep run appends the type-check result:
Parse: OK (fjall/web/infrastructure.ts)
Typecheck: OK
Validated
A failed parse or type-check exits with a non-zero status and prints the offending error, so you can wire fjall validate into a CI gate before fjall deploy.

Agent mode

Pass --agent to emit structured output for AI agents. The result includes parse, typecheck (ok, failed, or skipped when --deep is absent), and the resolved file path. A failed deep type-check exits non-zero.

Options

OptionDescriptionDefault
-a, --app <name>Application to validate. Required.None
--deepAlso run tsc --noEmit and surface any type errors.false
-v, --verboseEnable verbose logging.false
--non-interactiveForce plain CLI output (no UI).false
--agentEnable agent output mode.false
--budget <level>Output budget: minimal, compact, or a token count.None
--fields <fields>Request additional fields in the output.None
--fullDisable content truncation.false

Next Steps

fjall add

Add a resource to an application’s infrastructure.

fjall list

List the resources declared in an application’s infrastructure.

fjall deploy

Deploy a validated application’s infrastructure to AWS.

Add resources

Learn how resources are declared and managed.