Script Versions
Every script edit is saved to history. Review previous versions, compare changes, and roll back with one click.
Script Versions
Devpilot keeps a full history of every script. Each time you save a change, the previous content is tucked away as a new entry in the Versions tab with a version number, an optional note, and the user who made the edit. You can browse any earlier version, compare it against what's live today, and restore it with one click — and because restoring also saves a new version, you can always undo.
Versioning is automatic. You don't have to click "save a version" — editing the script body and saving does it for you whenever the content actually changes.
What Each Version Captures
Every version records the version number (a counter that goes up by one each time, starting from 1), the full script body as it was before your last edit, an optional change summary (on automatic saves this defaults to the script's name, and on restores it reads "Before restoring to vN" so you know why it's there), the user who triggered the save, and the timestamp.
Versions are tied to the script itself, so deleting a script also clears its history.
How Versions Are Created
Devpilot creates a new version entry before it applies your update — the entry holds the previous content, not the new one. In plain terms:
- You save an edit to a script.
- If the body actually changed, Devpilot tucks the old body into a new version with the next available version number.
- The live script is then updated to the new content.
That means the highest-numbered version represents "what the script was before my most recent save," while the live script shows the most recent save. If you only tweaked non-body fields like the name or description, no version is created — history only tracks real body changes.
Browsing Versions
Open a script
From a server's dashboard, open Scripts and click into the script you want to review.
Open the Versions tab
Switch to the Versions tab. Devpilot lists versions newest first, showing up to the 50 most recent.
Inspect a specific version
Click any row to load that version's full body. Compare it against the current script to see what changed — which lines were added, changed, or removed between that snapshot and today.
Restoring a Previous Version
Pick the version to restore
Open the Versions tab and find the version you want to bring back.
Click Restore
Devpilot saves the current script body as a new version (with the note "Before restoring to vN"), then overwrites the live script with the content from the version you chose.
Verify the active content
The script now shows the restored content. Run it as usual to confirm the behaviour you expected.
Restore is non-destructive. Because Devpilot captures the current content as a new version before applying the restore, you can always undo a restore by restoring the "Before restoring to vN" entry.
Example History
Imagine a script that's seen a few edits and a restore:
v4 Before restoring to v2 today you
v3 Add error handling yesterday teammate
v2 Switch to sudo last week you
v1 Initial import last month youIf v3 introduced a bug, clicking Restore on v2 creates v4 (holding the bad v3 content) and overwrites the live script back to v2's body. You keep the full chain, including the broken version, so you can diff and fix it forward later.
Auditing and Accountability
Every version record is tied to the user who made the change. For sensitive scripts — production deploy recipes, credential rotations, database migrations — this gives you a clean audit trail:
- Who last edited the script, and when?
- What did the script look like on the day a specific run happened?
- Which edit introduced a regression? Diff two versions to find it.
Pair versions with Script Secrets and you get a secure, reviewable scripting workflow where credentials never appear in history and every edit is attributed.
Limits and Constraints
- The Versions tab shows the 50 most recent versions. Older versions are still retained and can be opened directly from their link.
- Only the script body is versioned. The associated name, description, tags, category, schedule, run-as user, attached secrets, webhooks, and triggers are configuration around the script — not part of the content snapshot.
- A new version is only created when the script body actually changes. Saves that only tweak non-body fields don't produce a version.
- Versions can't be deleted individually — they live as long as the script does.
Troubleshooting
| Problem | Likely cause |
|---|---|
| History is empty | The script was just created or has never been edited. Your first edit creates v1. |
| Restore didn't change the active script | The selected version's content equals the current content. Restore is a no-op visually in this case. |
| Older versions don't appear in the list | Only the 50 most recent are listed. Older versions can still be opened by following their direct link. |
| A version you expected is missing | A save that didn't change the body doesn't create a version. Confirm the content actually differed. |
Version history captures the script body only. It doesn't track attached Script Secrets, webhooks, triggers, schedules, or notification channels — those are configuration around the script, not part of its content. Rolling back the body won't change them.
Next Steps
Scripts and Automation
The basics of creating and running scripts.
AI Script Assistance
Generate or refactor scripts with AI — every suggestion you accept becomes a new version.
Script Workflows
Build multi-step pipelines that reference versioned scripts.
Script Secrets
Keep credentials out of scripts — version history then stays safe to share.