Skip to main content

cf-share-file

Share one file over the internet using a Cloudflare quick tunnel. The command starts a local HTTP server, launches cloudflared, and prints the public file URL to standard output. Press Ctrl+C to stop sharing.

Installation

Requires Python 3.10 or newer and the standalone cloudflared executable on your PATH. Installing this package does not install cloudflared.

uvx cf-share-file --help

Requires uv. uvx downloads the package and runs it in an isolated environment. For a persistent command, use uv tool install cf-share-file.

Usage

uvx cf-share-file ./report.pdf
uvx cf-share-file ./report.pdf --auth 'alice:change-this-password'
uvx cf-share-file ./report.pdf --port 8080
uvx cf-share-file --help

With a persistent installation, you can run cf-share-file directly. The local server listens on 127.0.0.1; the default port is chosen automatically. Only the selected file path is served. GET and HEAD are supported. Logs go to standard error; the public URL goes to standard output.

Without --auth, anyone who knows the public URL can download the file. With --auth, requests require HTTP Basic authentication. Command-line credentials may be visible in shell history or process listings. The temporary tunnel depends on Cloudflare's service. The URL may need a few seconds before it becomes reachable.

Development

uv run python -m unittest discover -s tests -v
uvx --from build pyproject-build
uvx twine check --strict dist/*

Publishing

Check that cf-share-file is available on PyPI and TestPyPI before the first release. Availability has not been verified. If necessary, change the project name in pyproject.toml and the installation commands here.

The initial version is 0.1.0. Build from a clean checkout using the commands above, ensuring dist/ contains only the current release. Upload to TestPyPI:

uvx twine upload --repository testpypi dist/*

Verify the TestPyPI release in an isolated environment:

uvx --isolated --index-url https://test.pypi.org/simple/ cf-share-file@0.1.0 --help

Then upload the same artifacts to PyPI:

uvx twine upload dist/*

Use an API token when Twine prompts for credentials. Never commit credentials. For subsequent releases, update the version in pyproject.toml and build fresh artifacts; PyPI does not allow replacing an existing release file. GitHub Actions runs tests and validates distributions; publishing is manual.

License

MIT; see LICENSE.

Metadata

Release files for cf-share-file 0.1.0

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

Source distribution (sdist)

Source distribution for cf-share-file 0.1.0
File Size Uploaded Provenance Actions
cf_share_file-0.1.0.tar.gz 5.3 kB Without provenance Details for cf_share_file-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cf-share-file 0.1.0
File Interpreter ABI Platform Actions
cf_share_file-0.1.0-py3-none-any.whl Python 3 none any Details for cf_share_file-0.1.0-py3-none-any.whl

Total release size: 10.9 kB

Release files / cf_share_file-0.1.0.tar.gz

Download URL cf_share_file-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f52972901a04b7e28ea415825b763b41dc63c6ef589c8d875b9e372bef3c24f4
BLAKE2b-256 checksum
How to use checksums
a7b84f02aaad03aa71bf4210096db5dff794c502e8872550f5e098278b16b332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / cf_share_file-0.1.0-py3-none-any.whl

Download URL cf_share_file-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a96e65b47cb04fa3b207812464dbf2448430c7997994f562050b8d9d9a00d580
BLAKE2b-256 checksum
How to use checksums
a73e8b4cfb22ea046b57bef9b98f4a84aea7c7a954e9ad6e39f3ef8cefef62aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for cf-share-file 0.1.0

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