Skip to main content

A Linux CLI tool for syncing packages and configurations across machines - like Migration Assistant for Linux

Project description

TuxSync

Profile Sync for Linux Users - Like Apple's Migration Assistant or Chrome Sync, but for your Linux packages and configurations.

Features

  • Multi-Distro Support: Works on Ubuntu/Debian (apt), Fedora (dnf), and Arch (pacman)
  • Privacy First: Choose between GitHub Gists (convenient) or your own custom server (private)
  • Loose Coupling: Uses tuxmate-cli as an external executor - no embedded code
  • Smart Scanning: Only backs up user-installed packages, filters out libraries
  • Magic Restore: One-liner command to restore your setup on any Linux machine

Quick Start

Installation

```bash

Clone the repository

git clone https://github.com/Gururagavendra/tuxsync.git cd tuxsync

Install with uv (recommended)

uv sync

Or use the wrapper script

chmod +x tuxsync.sh ./tuxsync.sh help ```

Create a Backup

```bash

Interactive mode (recommended)

./tuxsync.sh backup

Or using uv

uv run tuxsync backup

Skip bashrc backup

uv run tuxsync backup --no-bashrc

Direct to GitHub (non-interactive)

uv run tuxsync backup --github --non-interactive ```

Restore on New Machine

```bash

Using the magic command (shown after backup)

curl -sL https://raw.githubusercontent.com/Gururagavendra/tuxsync/main/restore.sh | bash -s -- <GIST_ID>

Or install TuxSync and restore

uv run tuxsync restore <GIST_ID>

Dry run to see what would happen

uv run tuxsync restore <GIST_ID> --dry-run

Skip package installation, only restore bashrc

uv run tuxsync restore <GIST_ID> --skip-packages ```

List Your Backups

```bash uv run tuxsync list ```

Requirements

The wrapper script (`tuxsync.sh`) will help install these if missing.

Architecture

TuxSync follows a loose coupling principle:

``` ┌─────────────────────────────────────────────────────────┐ │ TuxSync │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Scanner │ │ Storage │ │ Restore │ │ │ │ (Brain) │ │ Backend │ │ Manager │ │ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ │ │ │ │ │ │ ▼ ▼ ▼ │ │ [apt/dnf/ [GitHub/ [tuxmate-cli] │ │ pacman] Custom] Executor │ └─────────────────────────────────────────────────────────┘ ```

  • TuxSync = The Brain (orchestrates everything)
  • tuxmate-cli = The Hands (does the actual package installation)
  • If tuxmate-cli isn't installed, TuxSync will fail gracefully with installation instructions

Configuration

TuxSync creates backups with two files:

`tuxsync.yaml`

```yaml version: "1.0" created_at: "2024-12-28T10:30:00Z" distro: "Ubuntu" distro_version: "24.04" package_manager: "apt" package_count: 142 packages:

  • vim
  • git
  • docker.io
  • nodejs

... more packages

has_bashrc: true ```

`bashrc`

Your raw `~/.bashrc` content (if backed up).

Custom Server API

If using `--server`, your server should implement:

POST `/api/backup`

```json { "metadata": { /* tuxsync.yaml content */ }, "bashrc": "# .bashrc content..." } ``` Response: `{"backup_id": "unique-id"}`

GET `/api/backup/{backup_id}`

Response: ```json { "metadata": { /* tuxsync.yaml content */ }, "bashrc": "# .bashrc content..." } ```

Development

```bash

Install dev dependencies

uv sync --all-extras

Run tests

uv run pytest

Lint

uv run ruff check src/

Type check

uv run mypy src/ ```

License

MIT License - See LICENSE for details.

Related Projects

  • tuxmate-cli - Cross-distro package installer CLI (used as executor)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tuxsync-0.1.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tuxsync-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file tuxsync-0.1.0.tar.gz.

File metadata

  • Download URL: tuxsync-0.1.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for tuxsync-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b732a4389f859b457c8a41d030de0177f0ad443f36c0ca814e2e3e4708061de8
MD5 9a68c8a9065871c922f263801df8eb7d
BLAKE2b-256 1eb9f229400e1350bba125f9caa16fea6f6b3c2b5285f06f4d07b7356ade298d

See more details on using hashes here.

File details

Details for the file tuxsync-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tuxsync-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for tuxsync-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee8df2533035067161b6fe3cc3581dcf97b0f1df82ff7ac2ea52100227f58d5c
MD5 add141be5c3dfb5f1266e00a58794856
BLAKE2b-256 e698d7965fd00740f3bb47b32a22e3755cc9304b6dc980ec1a3a3d032917ae7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page