Skip to main content
fjall undo restores the most recent backup of an application’s infrastructure.ts. Each fjall add, fjall remove, and fjall modify writes a sibling .bak file before changing the source. undo rolls the file back to that backup in one step.
  • An application with an infrastructure.ts file (created with fjall create app).
  • A prior codemod (fjall add, fjall remove, or fjall modify) on that application. The .bak file is written by the most recent codemod, so there must be one to restore.

Restore the last change

Undo the last change to the api application:
Skip the confirmation prompt (useful in scripts):

What Happens

undo reads the .bak sidecar next to the application’s infrastructure.ts and writes its contents back over the source file. The .bak file holds a single prior version. undo reverts the most recent codemod only. To step back through older states, use the timestamped snapshots in the application’s .fjall/history directory. If no .bak file exists, undo exits with an error and leaves infrastructure.ts untouched. Agent mode. Pass --agent to emit a structured result for AI-agent and scripted callers. The output reports the restored path and a follow-up suggestion instead of human-readable text.

Options

Agent flags

These flags shape output for AI-agent and scripted callers.

Next Steps

fjall add

Add a resource to an application’s infrastructure.

fjall list

List the resources defined in an application’s infrastructure.

fjall deploy

Deploy infrastructure changes to AWS.

Add resources

Walk through adding and changing resources end to end.