Skip to main content
  • An application created with fjall create app, so it has a fjall/<app>/infrastructure.ts file.
  • At least one codemod (fjall add, fjall modify, or fjall remove) that wrote a snapshot to the application’s .fjall/history directory. A brand-new application with no edits has no snapshots to list.
  • Node 22 or later.

List or restore snapshots

Every codemod that edits infrastructure.ts saves a timestamped snapshot in the application’s .fjall/history directory. Run fjall history to list those snapshots, or pass --restore to roll the file back to one of them.
List the snapshots for an application:
Output shows one row per snapshot with its ISO 8601 timestamp, size, and file path:
Restore a specific snapshot by its timestamp:

What Happens

When you list snapshots, Fjall reads the application’s .fjall/history directory and prints each recorded snapshot. No files change. When you pass --restore <timestamp>, Fjall:
  1. Looks up the matching snapshot for that timestamp.
  2. Writes a .bak backup of the current infrastructure.ts so the in-place state is recoverable.
  3. Overwrites infrastructure.ts with the snapshot contents.
If no snapshot matches the timestamp, the command prints the available-snapshots hint and exits without touching infrastructure.ts. Run fjall history --app <name> first to copy an exact timestamp from the list. Restoring only rewrites the local infrastructure.ts file. Run fjall deploy afterwards to apply the restored infrastructure to AWS. To undo the most recent codemod instead of restoring a named snapshot, use fjall undo. In agent mode (--agent), the listing returns structured tabular output and the restore returns the snapshot path plus the .bak backup path, both suited to scripted callers.

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, which records a new snapshot.

fjall modify

Change a resource’s properties, recording a snapshot before the edit.

fjall remove

Remove a resource from infrastructure, recording a snapshot before the edit.

fjall deploy

Deploy restored infrastructure to AWS.