Skip to content

Upgrading & Deploying

Telegram commands

CommandWhat it does
/updateUpdate from npm (stable/alpha)
/update pullGit pull latest code (no build)
/update deployBuild + deploy from local git checkout
/softwareShow versions, source, rollback slots

Remote deploy flow: /update pull/update deploy

Linux / WSL (KP)

bash
cd ~/workspace/ab/abtars
abtars update

abtars update builds from source, stages into app.staging/, atomically swaps to app/, restarts, and health-verifies. Auto-rolls back if the bridge fails to start.

macOS

From Telegram (remote):

/update pull        ← fetches latest code
/update deploy       ← builds + deploys + restarts

abmind-only changes

abtars update always copies fresh abmind dist into app/node_modules/abmind/. Just rebuild abmind and re-run update:

bash
cd ~/workspace/ab/abmind && npm run build
cd ~/workspace/ab/abtars && abtars update --from-local

Verify after deploy

bash
abtars status

Or via Telegram: /status, /software

Shows: version, commit, bridge PID + health, source (npm or local + repo path). Also check:

  1. ✓ Bridge healthy in update output
  2. Telegram polling started (check logs)
  3. No EADDRINUSE errors

Rollback

bash
abtars rollback

Swaps app/app.prev/, restarts, health-verifies. Always works — app.prev/ is a full copy.

Dry run

bash
abtars update --dry-run

Shows what would happen without building or mutating anything.

If deploy fails

Auto-rollback handles most cases. If both new and rolled-back versions fail:

  1. Check logs: tail -50 ~/.abtars/logs/bridge.log
  2. Restore config: cp ~/.abtars/config/.pre-update/* ~/.abtars/config/
  3. Manual start: node ~/.abtars/app/bundle/abtars.js
  4. Nuclear: abtars stop --force && abtars update --from-local

If abtars update itself is broken (no release staged)

When the deployed CLI is so broken that abtars update cannot run — for example abtars: no release staged. Run 'abtars install' first. because the wrapper can't locate the bundle, or the bridge is dead and the watchdog can't respawn it — use the emergency script. It does the full deploy (build, stage, swap symlinks, restart, health-probe) with plain npm + esbuild and direct launchctl/systemd calls. No working deployed binary required.

bash
bash ~/.abtars-releases/src/abtars/scripts/emergency-update.sh

Make sure the source checkout is on the commit you want first:

bash
cd ~/.abtars-releases/src/abtars && git pull