Package Backup & Drift Viewer
Backup installed packages from multiple package managers to JSON/SQLite, and visualize package drift between machines with a NiceGUI web interface.
Features
- Multi-platform package collection: Works on macOS and Linux
- Multiple package managers: brew, apt, snap, flatpak, pip, npm, stew, zb
- SQLite storage: Local database for fast queries
- GitHub sync: Push backups to a shared repo
- Drift visualization: NiceGUI web UI showing package differences
- Install commands: Generate commands to sync packages between machines
- Unified CLI: Single
box-dumpcommand with subcommands
Supported Package Managers
| Manager | macOS | Linux | Notes |
|---|---|---|---|
| brew | ✅ | ✅ | Linuxbrew supported |
| apt | ❌ | ✅ | Debian/Ubuntu |
| snap | ❌ | ✅ | |
| flatpak | ❌ | ✅ | |
| pip | ✅ | ✅ | |
| npm | ✅ | ✅ | Global packages |
| stew | ✅ | ✅ | zauberzeug/stew |
| zb | ✅ | ✅ | zauberzeug/zb |
Installation
Install as CLI tool (recommended)
# Using uv (recommended)
uv tool install .
# Or using pipx
pipx install .
This installs the box-dump command globally.
Development Install
# Install with all dependencies
uv pip install -e . --system --break-system-packages
# Or with pip
pip install -e ".[dev]"
Usage
Backup Command
# Basic backup to default cache (~/.cache/box_dump)
box-dump backup
# Backup to custom directory (useful for git versioning)
box-dump backup --path ~/projects/package-backups
# Backup and push to GitHub
box-dump backup --push --repo "your-username/package-backups"
# Skip SQLite export
box-dump backup --no-sqlite
Viewer Command
# Run the web UI (default port 8080)
box-dump viewer
# Custom port
box-dump viewer --port 3000
Then open http://localhost:8080 in your browser.
Run Without Installation
# Using uv
uv run -m box_dump.cli backup
uv run -m box_dump.cli viewer
# Or with specific subcommand
uv run -m box_dump.cli backup --path ~/my-packages
JSON Output Format
Files are named {hostname}_{package_manager}.json:
[
{"name": "neovim", "version": "0.9.5"},
{"name": "fish", "version": "3.6.0"},
{"name": "git", "version": "2.43.0"}
]
GitHub Setup
- Create a new GitHub repository
- Run backup with
--push --repo "your-username/repo-name" - Each machine backs up to its own JSON files in the repo
Configuration
Default Paths
- JSON cache:
~/.cache/box_dump/ - SQLite database:
~/.local/share/package-backup/packages.db - Git repo clone:
~/.cache/package-backup/
Override Output Directory
Use --path to specify a custom output directory (e.g., a git-initialized folder):
box-dump backup --path ~/projects/package-backups --push
Development
# Install dev dependencies
uv pip install -e ".[dev]" --system --break-system-packages
# Run tests
pytest
# Lint
ruff check .
License
MIT
Release files for box_dump 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| box_dump-1.0.1.tar.gz | 142.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| box_dump-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 153.3 kB
Release files / box_dump-1.0.1.tar.gz
| Download URL | box_dump-1.0.1.tar.gz |
|---|---|
| Size | 142.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3b6ef2801b633602e17350e7e7f9344d314e436760f1a7d88b257e1cd8b3199
|
|
BLAKE2b-256 checksum How to use checksums |
c8cace6830cb1360f0e2756c884749b983207ae9cd3765383f469ee9e029e55c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / box_dump-1.0.1-py3-none-any.whl
| Download URL | box_dump-1.0.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7376dd6e57aea2c191dd2f67f0f28ab1b40a7cf590fc5535783b530a5ef9ecee
|
|
BLAKE2b-256 checksum How to use checksums |
88c5ee10cdfa3dcd8f9c8bc682432110162006959f0db59e6f0a5ee0fe0ee3de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|