Metadata-Version: 2.4
Name: localsend-cli
Version: 0.1.0
Summary: LocalSend CLI tool
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# LocalSend CLI

A lightweight, modular Python CLI implementation of the **LocalSend Protocol (v2)**. This tool allows you to discover devices, send files, and receive data directly from your terminal, fully compatible with official LocalSend clients.

## Features

- **Device Discovery**: Scan your local network for active LocalSend instances.
- **File Transfer**: Send one or multiple files to any LocalSend-enabled device.
- **Receiver Mode**: Start a local server to receive files, folders, or text messages.
- **Self-Signed TLS**: Automatic generation of required SSL certificates for secure transfers.

## Installation

### Prerequisites
- Python 3.8 or higher
- `requests` and `cryptography` libraries

### Setup
1. Clone the repository or download the files.
2. Install dependencies:
   ```bash
   pip install requests cryptography
   ```

## Usage

### Scan for Devices
Find other LocalSend devices on your network using UDP multicast.
```bash
./localsend-cli scan
```
*Options:*
- `--timeout <seconds>`: Duration to listen for responses (default: 5).
- `--json`: Output as a stream of JSON objects.
- `--clean`: Output only IP addresses.

### Send Files
Send files to a specific target IP.
```bash
./localsend-cli send <device-ip> image.png report.pdf
```
*Options:*
- `--port <port>`: Target port if different from default (53317). You dont need to change this most of the time.
- `--json`: Progress and status in JSON format.

### Receive Files
Start a server to wait for incoming transfers.
```bash
./localsend-cli receive --output ./incoming
```
*Options:*
- `--output <dir>`: Directory to save received files (default: current directory).
- `--pin <code >`: Require a specific PIN from the sender.
- `--json`: Event-based JSON output (ready, incoming, saved, etc.).

## Credits

**Localsend**: [Website](https://localsend.org/) [GitHub](https://github.com/localsend/localsend)

**Localsend Protocol**: https://github.com/localsend/protocol
