Updating
Before upgrading
Section titled “Before upgrading”- Back up your data:
snippbot reset --list-backups— or manually copy~/.snippbot/ - Check the changelog for breaking changes
- Stop the daemon before upgrading
Upgrade
Section titled “Upgrade”The recommended way to upgrade is the built-in snippbot upgrade command. It
resolves the latest version from PyPI’s JSON API (which is never stale, unlike
pip’s cached simple index), stops the daemon, and installs with cache-busting —
so you don’t have to remember the right pip/pipx flags:
snippbot upgrade # Upgrade to the latest versionsnippbot upgrade --check # Just check whether a newer version existssnippbot start # Restart the daemonIt auto-detects whether you installed via pipx or a pip virtualenv and runs the
right command for you. See the snippbot upgrade reference for
all options.
Upgrading manually
Section titled “Upgrading manually”If you prefer to run the package manager yourself:
# Stop the daemonsnippbot stop
# Upgrade (add --pip-args=--no-cache-dir if pipx serves a stale version)pipx upgrade --pip-args=--no-cache-dir snippbot
# Restartsnippbot startIf you installed into a virtual environment instead of pipx, upgrade with that venv’s pip:
snippbot stop~/.snippbot-venv/bin/pip install --upgrade --no-cache-dir snippbotsnippbot start# Pull latest imagedocker compose pull
# Recreate containersdocker compose up -d
# View logs to verify startupdocker compose logs -f snippbotVerify the upgrade
Section titled “Verify the upgrade”snippbot --versionsnippbot statuscurl http://localhost:18781/healthsnippbot doctorDatabase migrations
Section titled “Database migrations”Snippbot applies database migrations automatically on startup. If a migration fails:
# Check logs for migration errorstail -50 ~/.snippbot/logs/daemon.log | grep -i migrat
# Restore from pre-upgrade backup if neededsnippbot reset --list-backupssnippbot reset --restore <backup-name>Rollback
Section titled “Rollback”If the new version has a critical bug, roll back by pinning an older version:
# Easiest — let snippbot upgrade pin the version for yousnippbot upgrade --version 0.4.1 --yesOr run the package manager directly:
# pipx — reinstall pinned to a specific versionpipx install snippbot==0.4.1 --force
# pip (venv) — install a specific version~/.snippbot-venv/bin/pip install snippbot==0.4.1Always restore from a pre-upgrade backup when rolling back to avoid schema mismatches:
snippbot stopsnippbot reset --restore pre-upgrade-<timestamp>snippbot start