Skip to main content

Add your description here

Project description

LocalSync

A local package synchronization and sharing tool that allows you to share and discover packages across your local network.

Features

  • Network Discovery: Uses mDNS/Bonjour for automatic server discovery
  • Package Sharing: Share cached packages with other machines on the network
  • Architecture Filtering: Automatically filters packages compatible with your architecture
  • Web API: RESTful API for package management
  • Command Line Interface: Easy-to-use CLI for all operations

Installation

From APT Repository (Recommended)

# Add the repository key
curl -fsSL https://chamesh2019.github.io/LocalSync/public.key | sudo apt-key add -

# Add the repository
echo "deb https://chamesh2019.github.io/LocalSync stable main" | sudo tee /etc/apt/sources.list.d/localsync.list

# Update package list and install
sudo apt update
sudo apt install localsync

Manual Installation

Download the latest .deb file from the releases page:

wget https://github.com/chamesh2019/LocalSync/releases/latest/download/localsync_0.1.0-1_all.deb
sudo dpkg -i localsync_0.1.0-1_all.deb
sudo apt-get install -f  # Install any missing dependencies

From Source

git clone https://github.com/chamesh2019/LocalSync.git
cd LocalSync
pip install -r requirements.txt
python main.py --help

Usage

Start the Server

localsync serve

This will:

  • Start monitoring /var/cache/apt/archives/ for packages
  • Start the web server on port 53456
  • Register the service for network discovery

List Available Packages

localsync list

This will discover all LocalSync servers on the network and display available packages.

Install a Package

localsync install <package-name>

This will:

  • Search for the package on all discovered servers
  • Filter packages compatible with your architecture
  • Allow you to select which version/server to install from
  • Download and install the package

Get Help

localsync --help
# or
localsync h

API Endpoints

When running as a server, LocalSync exposes these endpoints:

  • GET /api/cache-list - List all cached packages
  • GET /api/server-info - Get server information
  • GET /api/pkg/{package_name} - Get information about a specific package
  • POST /api/download - Download a package file (JSON body: {"filename": "package.deb"})

Architecture

LocalSync is built with a modular architecture:

src/
├── client/           # Client-side functionality
│   ├── cli.py       # Command-line interface
│   ├── network.py   # Network discovery
│   └── package_manager.py  # Package operations
├── server/          # Server-side functionality
│   ├── api_routes.py    # API endpoints
│   ├── app_config.py    # Application configuration
│   ├── mdns_service.py  # mDNS service management
│   └── network_utils.py # Network utilities
└── lib/             # Shared libraries
    └── cache.py     # Package cache management

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Development

Building the Package

# Install build dependencies
sudo apt-get install debhelper dh-python python3-setuptools python3-all

# Build the package
dpkg-buildpackage -us -uc -b

# The .deb file will be created in the parent directory

Running Tests

# Install in development mode
pip install -e .

# Run the application
python main.py serve

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

localsync-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

localsync-0.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: localsync-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for localsync-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d35b5ec37a19ac11c686fd328bb7d9967763ee0bcd6dbc2bf554eb105de408f
MD5 c4b4bc9a80c89c65f48c56532283c6f7
BLAKE2b-256 eb52540838aadb8d20bb14bd1ce2976e5b18cdbc942cbd8958a2892a687b0645

See more details on using hashes here.

File details

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

File metadata

  • Download URL: localsync-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for localsync-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 550add27e35d7b4c345bcd0949bc19d0eae88a7b3447f1af969b77feedbfeead
MD5 bbd43bddec6c642c779d068047f42f9a
BLAKE2b-256 2519ada4bb53db7b9dd562b790c57ac20b657ae6024ef9dfd3433922236aa9a2

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