Skip to main content

ShareDir

ShareDir is a Python tool to share files and directories over LAN or the internet with a single command. It runs a production-ready HTTP server (Waitress) with passphrase protection, QR code access, file uploads, and a modern web interface.

Features

  • Share files and directories with one command
  • QR code generation (terminal + in-browser)
  • Passphrase protection with brute-force blacklisting
  • Production-ready server (Waitress) with configurable workers
  • File upload support with progress bar (optional)
  • Directory ZIP download
  • File metadata display (size, modified date, MIME type)
  • HTTP Range request support (video seeking)
  • Client-side search/filter
  • Dark mode (default) with light mode toggle
  • Download buttons for files and directories
  • Access logging (IP, method, path, status)
  • Auto-expiry (--expire)

Installation

Via pip

pip install sharedir

Via uv

uv tool install sharedir

From source

git clone https://github.com/spignelon/ShareDir.git
cd ShareDir
pip install -r requirements_headless.txt

Usage

sharedir /path/to/share

Options

Flag Description
-p N, --passphrase-length N Number of words in passphrase (default: 4)
--no-passphrase Disable passphrase protection
-P PORT, --port PORT Server port (default: 44447)
-w N, --workers N Number of server workers, 1 worker = 4 threads (default: 1)
--upload Enable file uploads via web interface
--expire DURATION Auto-shutdown after duration (e.g. 30m, 2h, 1d)

Examples

# Share a directory with a 6-word passphrase on port 8080
sharedir ~/movies -p 6 -P 8080

# Share without passphrase, with uploads enabled
sharedir ~/public --no-passphrase --upload

# Auto-shutdown after 2 hours
sharedir ~/files --expire 2h

Output:

Generated passphrase: grape-apple-banana-orange
Access URL: http://192.168.1.100:44447/?passphrase=grape-apple-banana-orange
Starting server on 0.0.0.0:44447 with 1 workers (4 threads)...

Requires Python >= 3.10.

License

GNU AGPLv3.0
GNU AGPLv3.0

Metadata

Release files for sharedir 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sharedir 2.0.2
File Size Uploaded Provenance
sharedir-2.0.2.tar.gz 24.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sharedir 2.0.2
File Interpreter ABI Platform
sharedir-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 47.4 kB

Release files / sharedir-2.0.2.tar.gz

Download URL sharedir-2.0.2.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
83a312487cd1414e75cab229f1c9ad7cc31cf1d1c201bcb20ed96af8a0a46db6
BLAKE2b-256 checksum
How to use checksums
86edcec37e46d01663775e47267aa9775c0f211330333d9213181a12e4239316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / sharedir-2.0.2-py3-none-any.whl

Download URL sharedir-2.0.2-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87d32c33b49fdb8ea77cd53c70b1a0e6384b56f1f4f0be5c479ba5a089d4f89b
BLAKE2b-256 checksum
How to use checksums
d87b540b5ce50328e9b1cf9aacb899b28a089b77e48ffe897c3e7f33cee903fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for sharedir 2.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page