| name | self-update |
| description | Check for updates and update Tyrion to the latest version |
Self-Update Skill
Update Tyrion to the latest version from the git repository.
Commands
Check for Updates
Check if updates are available without applying them:
./scripts/self-update.sh --check
Returns:
- Current version (git commit)
- Remote version
- List of new commits if updates available
Update
Pull the latest changes and rebuild:
./scripts/self-update.sh
This will:
- Stash any local changes
- Pull latest from the configured branch
- Install new dependencies if package.json changed
- Rebuild the project
Update and Restart
Update and automatically restart the service:
./scripts/self-update.sh --restart
The restart is handled gracefully:
- Spawns a background process
- Waits for the current process to exit
- Starts the new version
Force Update
Force a pull even if already up to date:
./scripts/self-update.sh --force
Specify Branch
Update from a specific branch:
./scripts/self-update.sh --branch develop
Safety Notes
- Local changes are preserved - automatically stashed before update
- Graceful restart - current request completes before restart
- Rollback - if update fails, stashed changes can be restored with
git stash pop
Logs
Update logs are written to:
~/.casterly/logs/update.log
When to Update
Update when:
- User asks to update or check for updates
- User reports a bug that might be fixed
- User asks about new features
Always ask before restarting - the user might be in the middle of something.
Example Interactions
User: "Are there any updates available?"
→ Run check_for_updates()
User: "Update yourself"
→ Run update_tyrion(restart=false), then ask if they want to restart
User: "Update and restart"
→ Run update_tyrion(restart=true)
User: "Something's broken, can you restart?"
→ Run restart_tyrion(confirm=true)