Prerequisites
Prerequisites
- An application created with
fjall create app, so it has afjall/<app>/infrastructure.tsfile. - At least one codemod (
fjall add,fjall modify, orfjall remove) that wrote a snapshot to the application’s.fjall/historydirectory. A brand-new application with no edits has no snapshots to list. - Node 22 or later.
List or restore snapshots
Every codemod that editsinfrastructure.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.
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:
- Looks up the matching snapshot for that timestamp.
- Writes a
.bakbackup of the currentinfrastructure.tsso the in-place state is recoverable. - Overwrites
infrastructure.tswith the snapshot contents.
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
| Option | Description | Default |
|---|---|---|
-a, --app <name> | Application whose history to inspect. Required. | None |
--restore <timestamp> | Restore the snapshot identified by its ISO 8601 timestamp. | List only |
-v, --verbose | Enable verbose logging. | Off |
--non-interactive | Force plain CLI output (no interactive UI). | Auto-detected |
Agent flags
These flags shape output for AI-agent and scripted callers.| Flag | Description |
|---|---|
--agent | Enable agent output mode. |
--budget <level> | Output budget: minimal, compact, or a token count. |
--fields <fields> | Request additional fields in output. |
--full | Disable 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.