Backup installed packages to JSON/SQLite and visualize drift with NiceGUI
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file box_dump-1.0.1.tar.gz.
File metadata
- Download URL: box_dump-1.0.1.tar.gz
- Upload date:
- Size: 142.9 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3b6ef2801b633602e17350e7e7f9344d314e436760f1a7d88b257e1cd8b3199
|
|
| MD5 |
594f1f82b3186715bd0bcc92b8108e51
|
|
| BLAKE2b-256 |
c8cace6830cb1360f0e2756c884749b983207ae9cd3765383f469ee9e029e55c
|
File details
Details for the file box_dump-1.0.1-py3-none-any.whl.
File metadata
- Download URL: box_dump-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7376dd6e57aea2c191dd2f67f0f28ab1b40a7cf590fc5535783b530a5ef9ecee
|
|
| MD5 |
904dd1c0523b99ec14320ee038ca67ec
|
|
| BLAKE2b-256 |
88c5ee10cdfa3dcd8f9c8bc682432110162006959f0db59e6f0a5ee0fe0ee3de
|