An open API service indexing awesome lists of open source software.

https://github.com/beeper-community/update-beeper

Self-healing Beeper Desktop updater for Linux with automatic rollback
https://github.com/beeper-community/update-beeper

appimage arch-linux bash-script beeper beeper-desktop electron linux messaging self-healing updater

Last synced: 3 months ago
JSON representation

Self-healing Beeper Desktop updater for Linux with automatic rollback

Awesome Lists containing this project

README

          



Beeper Latest

ย 

AUR Version

ย 

Lint

ย 

License: MIT

# update-beeper

A self-healing Beeper Desktop updater for Arch Linux. Downloads directly from Beeper's API with SHA256 verification, retries with targeted fixes on failure, and rolls back automatically if recovery fails. Supports native Wayland, structured logging, and systemd automation.

---

## Quick Start

```bash
curl -fsSL https://raw.githubusercontent.com/beeper-community/update-beeper/master/install.sh | bash

update-beeper # Update to latest
update-beeper --versions # Show version status
```

---

## The Problem

### Before

```
Beeper Desktop

"Update Available!"
[ Restart to Update ]

* clicks *
* still on old version *
```

### After

```
๐Ÿ Beeper Updater v1.7.0

[1/8] Checking versions
โœ“ Update available

[4/8] Downloading 4.2.547
โœ“ 213MB verified

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โœ“ Update complete โ”‚
โ”‚ Version 4.2.482 โ†’ 4.2.547 โ”‚
โ”‚ Duration 52s โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
```

Beeper's updater tries to replace files in `/opt` owned by pacman, causing a silent failure. This script downloads directly from Beeper's API instead.

---

## Installation

**Quick Install** (recommended):

```bash
curl -fsSL https://raw.githubusercontent.com/beeper-community/update-beeper/master/install.sh | bash
```

**Manual Install:**

```bash
curl -o ~/.local/bin/update-beeper \
https://raw.githubusercontent.com/beeper-community/update-beeper/master/update-beeper
curl -o ~/.local/bin/beeper-version \
https://raw.githubusercontent.com/beeper-community/update-beeper/master/beeper-version

chmod +x ~/.local/bin/update-beeper ~/.local/bin/beeper-version
```

**Clone & Install:**

```bash
git clone https://github.com/beeper-community/update-beeper.git
cd update-beeper && ./install.sh
```

> Make sure `~/.local/bin` is in your `PATH`.

---

## Usage

```bash
update-beeper # Update to latest
update-beeper --versions # Show all versions
update-beeper --dry-run # Preview without changes
update-beeper --force # Force reinstall
update-beeper --rollback # Rollback to previous version
update-beeper --history # Show past updates
```

### All Flags

| Flag | Short | Description |
|-------------------|-------|--------------------------------------|
| `--check` | `-c` | Check without installing |
| `--force` | `-f` | Force reinstall |
| `--quiet` | `-q` | Errors only (for cron/systemd) |
| `--notify` | `-n` | Desktop notification |
| `--rollback` | `-r` | Rollback to previous backup |
| `--changelog` | `-l` | Open changelog in browser |
| `--versions` | | Show installed, latest, AUR versions |
| `--dry-run` | | Preview what would happen |
| `--history` | | Show update history |
| `--skip-checksum` | | Skip SHA256 verification |
| `--version` | `-v` | Show script version |
| `--help` | `-h` | Show help |

---

## Automatic Updates

```bash
mkdir -p ~/.config/systemd/user
curl -fsSL https://raw.githubusercontent.com/beeper-community/update-beeper/master/systemd/update-beeper-user.service \
-o ~/.config/systemd/user/update-beeper.service
curl -fsSL https://raw.githubusercontent.com/beeper-community/update-beeper/master/systemd/update-beeper-user.timer \
-o ~/.config/systemd/user/update-beeper.timer

systemctl --user daemon-reload
systemctl --user enable --now update-beeper.timer
```

Runs daily between 10:00โ€“14:00 (randomized).

---

## Self-Healing

Each stage is verified and retried with targeted fixes before falling back to automatic rollback.

Verification and recovery details

| Failure | Fix Applied |
|---------------------|-----------------------------------|
| Download too small | Clear temp, retry |
| SHA256 mismatch | Re-download from scratch |
| Non-ELF binary | Re-download (corrupted) |
| Missing files | Clear squashfs-root, re-extract |
| Permission errors | Recursive chown/chmod |
| Low disk space | Warn if < 1200MB on `/opt` |
| Version mismatch | Fresh download |
| Startup crash | Clear Electron cache, retry |
| Untrusted domain | Abort download |
| Pacman version desync | Deregister stale AUR DB entry |
| Orphaned runtime deps | Mark as explicitly installed |
| All retries fail | **Automatic rollback** to backup |

---

## File Locations

| Path | Purpose |
|------|---------|
| `/opt/Beeper/` | Installation directory |
| `/opt/beeper-backups/` | Rolling backups (last 3) |
| `~/.config/BeeperTexts/` | User config + caches |
| `~/.local/share/update-beeper/update-beeper.log` | Event log |
| `~/.local/share/update-beeper/history.txt` | Update history |
| `~/.cache/update-beeper/checksums.txt` | SHA256 cache |

---

## Requirements

| Requirement | Notes |
|-------------|-------|
| **x86_64** | Beeper doesn't provide ARM builds |
| **Arch Linux** | Or Arch-based (Manjaro, EndeavourOS) |
| **curl** | Required |
| **sudo** | Required (installs to `/opt`) |
| **notify-send** | Optional (desktop notifications) |

---

## FAQ

Should I keep the AUR package?

It's optional. After a direct install, the script automatically deregisters the stale AUR entry from pacman's database (v1.6.0+) and preserves runtime dependencies from orphan cleanup (v1.7.0+). If AUR catches up later, you can reinstall with `yay -S beeper-v4-bin`.

What if an update breaks something?

The script automatically rolls back. You can also run `update-beeper --rollback` manually.

Blank window on Wayland (Hyprland/Sway)?

Run `update-beeper --force` to reinstall with native Wayland flags. Also fixes blank screen after sleep.

Does this work on non-Arch distros?

The core updater works on any x86_64 Linux. AUR version checking requires pacman.

---

[CONTRIBUTING.md](CONTRIBUTING.md) ยท [CHANGELOG.md](CHANGELOG.md) ยท MIT License


Made with ๐Ÿ for the Beeper community