Documentation Index
Fetch the complete documentation index at: https://docs.heylua.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
lua source manages your agent’s workspace backup version history. Every lua push records the canonical state of your project. lua source list shows the version timeline; lua source rollback restores any past version into your local workspace as a new version (history is append-only).
Subcommands
lua source list
Prints a table of source versions for the current agent, with the active version starred.
| Option | Description |
|---|---|
--all | Show all versions instead of the most recent 50. |
--limit <n> | Cap output at n versions. Default: 50. |
lua source rollback
Downloads a past version’s files into your local workspace, then auto-pushes the rolled-back state as the next version.
| Option | Description |
|---|---|
--version <n> | Required. Version number to roll back to. |
--force | Skip the confirmation prompt. |
How Rollback Works
History is append-only. Rolling back to v5 does not overwrite v5 — instead:- The CLI downloads v5’s files into your local workspace.
- It then auto-pushes the rolled-back state, creating v(latest+1) with the same contents as v5.
When to Use
- Recover from a bad push. A schema change broke prod?
lua source rollback --version <last-good>and you’re back. - Compare past versions.
lua source list --allshows the timeline; pair with the admin dashboard to diff. - Cross-machine recovery. Lost your local workspace?
lua init --agent-id <id> --restore-sourcespulls the active version. Uselua source rollbackto retrieve any other version.
Common Workflow
Related
- Push Command — every
pushcreates a new version - Sync Command —
lua sync --pullrestores the active version - Init Command —
--restore-sourcespulls the active version on first init

