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 packagesGET /api/server-info- Get server informationGET /api/pkg/{package_name}- Get information about a specific packagePOST /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
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d35b5ec37a19ac11c686fd328bb7d9967763ee0bcd6dbc2bf554eb105de408f
|
|
| MD5 |
c4b4bc9a80c89c65f48c56532283c6f7
|
|
| BLAKE2b-256 |
eb52540838aadb8d20bb14bd1ce2976e5b18cdbc942cbd8958a2892a687b0645
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
550add27e35d7b4c345bcd0949bc19d0eae88a7b3447f1af969b77feedbfeead
|
|
| MD5 |
bbd43bddec6c642c779d068047f42f9a
|
|
| BLAKE2b-256 |
2519ada4bb53db7b9dd562b790c57ac20b657ae6024ef9dfd3433922236aa9a2
|