Skip to main content

CLI tool to share files between PC and phone via QR code

Project description

📡 p2pshare

p2pshare is a lightweight, Python-based CLI tool for seamless file transfers between your PC and phone using a local Flask server and QR codes. No cloud, no login — just fast, private, peer-to-peer sharing over your local Wi-Fi.


✨ Features

  • 🔁 Two-way file transfer: phone → PC and PC → phone
  • 🌐 Local server (Flask + Waitress) for platform-agnostic access
  • 📱 QR code generation for easy phone access
  • 🪵 Logs file uploads with size and timestamp
  • 🔒 No external hosting or third-party storage — fully offline if on same network

🚀 Getting Started

1. Clone and Install

git clone https://github.com/elongma2/p2pshare.git
cd p2pshare
python -m venv venv
venv\Scripts\activate  # On Windows
# or
source venv/bin/activate  # On Mac/Linux
pip install .

2. Usage

📤 Send Files (Phone ➜ PC)

python -m p2pshare.main --send 

📥 Receive Files (PC ➜ Phone)

python -m p2pshare.main --receive path/to/file.txt

A QR code and webpage will appear. Open it on your phone and upload a file. It will be saved in the uploads/ directory.

###⚙️ Options

| Flag       | Description                                     |
|------------|-------------------------------------------------|
| `--send`   | Send a file from PC to phone                    |
| `--receive`| Receive a file from phone to PC                 |
| `--time`   | Auto shutdown server after N seconds idle       |

python -m p2pshare.main --receive --time 60

This shuts the server down after 60 seconds of no uploads.

All dependencies are auto-installed via pip install .

🧠 Why This Project?

Ever emailed yourself a file just to move it between your devices? p2pshare eliminates that pain. This tool makes peer-to-peer file sharing effortless with nothing but Python and a QR code.

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

p2pshare_cli-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

p2pshare_cli-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for p2pshare_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5048dc987c67444103f81ac881537fc21d63f0ec523ef6d170a767b4f3eb2dc3
MD5 c456deb32b84716552267c350ab2c28b
BLAKE2b-256 9490d5d16dc639c1e8ebf84ea6a6fb3879c79c97013414266ab4836dfe0b9dad

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for p2pshare_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7460be6f427103a000274dab6eb8e9e8d03ff861cbb1d0c2b138a566df7d80e
MD5 d99e75df4800a9d3308686b4d05283b4
BLAKE2b-256 0f8f704303e962d98135888f866d6d4f1a4967bcef94e03b8e07aaabfc80a31d

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