Deploy history and rollback
LeafCloud keeps past deployments available so you can review history and roll back to a previous deployment.
View deploy history
Section titled “View deploy history”To list the deployment history of a site:
leaf deploys --site my-cool-projectOutput:
dep_01ha82f91m live 2026-10-23T02:40:12Zdep_01ha7x90qp superseded 2026-10-22T19:15:04Zdep_01ha6c12nm superseded 2026-10-21T11:02:55ZIf your account has only one site, the --site flag is optional. In projects with a leaf.toml specifying site = "...", that site is used.
With --json, the history is output as newline-delimited JSON, one schema 1 object per deployment:
leaf deploys --site my-cool-project --json{"schema":1,"type":"deploys","data":{"created_at":1792723212,"deploy_id":"dep_01ha82f91m","status":"live","error":null}}{"schema":1,"type":"deploys","data":{"created_at":1792696504,"deploy_id":"dep_01ha7x90qp","status":"superseded","error":null}}Roll back a deployment
Section titled “Roll back a deployment”If a deployment needs to be reverted, you can restore a previous deployment.
Roll back to the previous deployment
Section titled “Roll back to the previous deployment”To revert to the deployment immediately preceding the active one, omit the deploy ID:
leaf rollback --site my-cool-projectOutput:
✓ Rolled back my-cool-project to dep_01ha7x90qpWith --json, rollback returns a schema 1 object:
leaf rollback --site my-cool-project --json{"schema":1,"deploy_id":"dep_01ha7x90qp","url":"https://my-cool-project.leafcloud.app","status":"live"}Roll back to a specific deploy ID
Section titled “Roll back to a specific deploy ID”To restore an older deployment from your history, pass its deployment ID:
leaf rollback dep_01ha6c12nm --site my-cool-projectOutput:
✓ Rolled back my-cool-project to dep_01ha6c12nmRollbacks take effect across the Bengaluru and Delhi edges.