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.
fjall history --app <name> [--restore <timestamp>]
List the snapshots for an application:
fjall history --app api
Output shows one row per snapshot with its ISO 8601 timestamp, size, and file path:
History snapshots for api: 3
  2026-05-29T14:02:11.482Z      1842 bytes  /path/to/fjall/api/.fjall/history/2026-05-29T14-02-11.482Z.ts
  2026-05-29T11:47:03.119Z      1715 bytes  /path/to/fjall/api/.fjall/history/2026-05-29T11-47-03.119Z.ts
  2026-05-28T09:15:55.004Z      1490 bytes  /path/to/fjall/api/.fjall/history/2026-05-28T09-15-55.004Z.ts
Restore a specific snapshot by its timestamp:
fjall history --app api --restore 2026-05-29T14:02:11.482Z

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

OptionDescriptionDefault
-a, --app <name>Application whose history to inspect. Required.None
--restore <timestamp>Restore the snapshot identified by its ISO 8601 timestamp.List only
-v, --verboseEnable verbose logging.Off
--non-interactiveForce plain CLI output (no interactive UI).Auto-detected

Agent flags

These flags shape output for AI-agent and scripted callers.
FlagDescription
--agentEnable agent output mode.
--budget <level>Output budget: minimal, compact, or a token count.
--fields <fields>Request additional fields in output.
--fullDisable content truncation.

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.