Skip to main content

qshare

无需登录账号,一行命令即可分享一个本地文件。默认上传到 CNB Release,生成公网下载链接和二维码;选择保留的 CNB 文件默认保存 3 天,也可在上传完成后的提示处立即手动删除本次上传。添加 --cf 可使用 TryCloudflare 隧道,由本机提供文件。

English · PyPI · Agent skill

特点

  • 无需注册或登录账号
  • 一行命令快速分享本地文件
  • 默认使用 CNB 上传,显示上传进度
  • CNB 文件默认保存 3 天,支持上传后立即手动删除
  • 可选 --cf 隧道分享,默认有效期 2 小时,可通过 --ttl 调整
  • 结果链接醒目显示,并提供终端二维码
  • 支持 Linux、Windows 和 macOS
  • PyPI 平台 wheel 内置 --cf 所需的对应官方 cloudflared 二进制
  • --cf 运行时不从 GitHub 下载二进制,适合网络受限环境

启动后会提示:私密文件请先加密,再进行中转分享。公网链接本身没有访问控制,请勿直接分享未加密的敏感文件。

安装

python -m pip install -U qshare

pip 会根据操作系统和架构选择对应 wheel,每个平台 wheel 只包含自身平台的二进制。默认 CNB 渠道无需使用 cloudflared。

如果不信任 PyPI wheel 中的二进制,可以从 Cloudflare 官方发布页下载匹配版本,按官方校验和验证后放入 PATH:

https://github.com/cloudflare/cloudflared/releases

--cf 渠道会优先使用 PATH 中已有的 cloudflared。没有匹配平台 wheel 时,也可以手动安装 cloudflared 后使用 --cf。

默认渠道:CNB

qshare /path/to/file.zip
qshare /path/to/file.zip --cnb

这两条命令均上传到 CNB Release。上传过程中显示进度,成功后显示醒目的 PUBLIC FILE URL 下载链接及终端二维码。上传前不会再询问确认,执行命令即开始上传。

上传完成后,程序询问是否立即删除 本次上传到 CNB 的文件:

  • 直接回车或输入 y:立即手动删除 CNB 上的文件,下载链接和二维码随即失效。
  • 输入 n:保留 CNB 上的文件,默认保存 3 天。上传完成后无需保持 qshare 或本机运行,也可在接收方下载期间等待,再确认删除。

只有 CNB 渠道支持删除上传文件。 此操作不会删除本地文件。CNB 的 3 天保存期限与删除询问的默认答案是两回事:选择保留时默认保存 3 天,删除询问处直接回车则立即删除。--ttl 和 --port 仅用于 --cf,不会改变 CNB 的保存期限。

可选渠道:TryCloudflare

qshare /path/to/file.zip --cf
qshare /path/to/file.zip --cf --ttl 30m
qshare /path/to/file.zip --cf --ttl 900
qshare /path/to/file.zip --cf --port 8000

--cf 通过本机 HTTP 服务和临时 TryCloudflare 隧道分享文件,默认有效期 2 小时。--ttl 支持 30m、90s、2h 或秒数;未指定 --port 时自动选择空闲端口,指定端口被占用时会尝试其他端口。

程序只接受真实的 *.trycloudflare.com 分享域名,会拒绝 api.trycloudflare.com 并自动重试。Unix-like 系统可在提示处输入 d 后台运行;Windows 始终前台运行。前台运行达到 TTL 或按 Ctrl+C 停止后,链接失效。--cf 不上传文件到 CNB,没有 CNB 文件删除提示;结束分享只需停止隧道,本地文件仍保留。

Windows 二维码

两个渠道都会在 CMD 终端显示二维码。CNB 文件选择保留时,最后会询问是否在浏览器中打开二维码页面(默认打开);已删除 CNB 文件时跳过询问,因为链接和二维码已失效。--cf 在分享期间也会提供浏览器二维码页面。页面在二维码上方显示下载链接,并支持一键复制。

DNS 排查

如果 --cf 链接提示找不到 IP,通常是本地 DNS 解析或网络限制。可以尝试使用 Cloudflare DNS 1.1.1.1、1.0.0.1,或 Google DNS 8.8.8.8、8.8.4.4,然后刷新本地 DNS 缓存并重试。修改 DNS 无法恢复已过期的隧道或已删除、过期的 CNB 文件。

Agent skill

仓库的 SKILL.md 说明如何通过 qshare 分享文件,包括默认 CNB 渠道、3 天保存期限、仅 CNB 支持的立即手动删除,以及 --cf 隧道的运行周期。

开发与发布

uv venv
source .venv/bin/activate
uv pip install -e .
PYTHONPATH=src pytest -q

使用本地准备好的 Cloudflare 二进制构建平台 wheel:

uv build
python scripts/build_platform_wheels.py --assets-dir /path/to/cloudflared-assets

PyPI 项目页使用此 README 作为长描述;修改文档后需发布新版本同步 PyPI 展示内容。

Metadata

Release files for qshare 0.4.3

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

Source distribution (sdist)

Source distribution for qshare 0.4.3
File Size Uploaded Provenance Actions
qshare-0.4.3.tar.gz 29.6 kB Without provenance Details for qshare-0.4.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for qshare 0.4.3
File Actions
qshare-0.4.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for qshare-0.4.3-py3-none-win_amd64.whl
qshare-0.4.3-py3-none-win32.whl Python 3 none Windows x86-32 Details for qshare-0.4.3-py3-none-win32.whl
qshare-0.4.3-py3-none-manylinux_2_17_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details for qshare-0.4.3-py3-none-manylinux_2_17_armv7l.whl
qshare-0.4.3-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for qshare-0.4.3-py3-none-manylinux2014_x86_64.whl
qshare-0.4.3-py3-none-manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details for qshare-0.4.3-py3-none-manylinux2014_i686.whl
qshare-0.4.3-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for qshare-0.4.3-py3-none-manylinux2014_aarch64.whl
qshare-0.4.3-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for qshare-0.4.3-py3-none-manylinux1_x86_64.whl
qshare-0.4.3-py3-none-manylinux1_i686.whl Python 3 none Linux glibc 2.5+ x86-32 Details for qshare-0.4.3-py3-none-manylinux1_i686.whl
qshare-0.4.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for qshare-0.4.3-py3-none-macosx_11_0_arm64.whl
qshare-0.4.3-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for qshare-0.4.3-py3-none-macosx_10_13_x86_64.whl
qshare-0.4.3-py3-none-linux_armv6l.whl Python 3 none linux armv6l Details for qshare-0.4.3-py3-none-linux_armv6l.whl
qshare-0.4.3-py3-none-any.whl Python 3 none any Details for qshare-0.4.3-py3-none-any.whl

Total release size: 205.8 MB

Release files / qshare-0.4.3.tar.gz

Download URL qshare-0.4.3.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
762c66702773080b55102e37ebd1e867d584b8a44321a33b29b695a9bd4ddf07
BLAKE2b-256 checksum
How to use checksums
3d8e2714c14710b9bcbb9a907662f1b74915e005abf088c5b6736444cb9b3693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-win_amd64.whl

Download URL qshare-0.4.3-py3-none-win_amd64.whl
Size 18.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
680b88225e5941ebcd8c9c771e3eefe41968154d3a270db3bd6d8fae83885073
BLAKE2b-256 checksum
How to use checksums
e037d7a27bab3da10cc2c62c67907df5b2ed35dc5bb5d99997de364f97e4e9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-win32.whl

Download URL qshare-0.4.3-py3-none-win32.whl
Size 18.5 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
471d770df507465735aa81534bfa353c88828c6233a36813759ca64a328a06ca
BLAKE2b-256 checksum
How to use checksums
17d1166c8c1f3bb11a9484b83397b4a09972d0b71f3ea686d70b654939944340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-manylinux_2_17_armv7l.whl

Download URL qshare-0.4.3-py3-none-manylinux_2_17_armv7l.whl
Size 17.7 MB
Tags Linux glibc 2.17+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
cf094258f14c543544d22d966799c87b7e9ef02b5f80c57ceaa07e577830d342
BLAKE2b-256 checksum
How to use checksums
45378700e873a110303e4eeded267f84d29fc6e1dc6744d391969e5cd8353577
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-manylinux2014_x86_64.whl

Download URL qshare-0.4.3-py3-none-manylinux2014_x86_64.whl
Size 19.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1c35ad9638f41846d2270d4c7c0750a23ec3e4079a2e2d6173a1e915613a90f9
BLAKE2b-256 checksum
How to use checksums
10472c22732d817970f4db2696c037ed7415acbc1ac5d07c10ddeb2c44305308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-manylinux2014_i686.whl

Download URL qshare-0.4.3-py3-none-manylinux2014_i686.whl
Size 18.4 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
1c4b3b82432bf3abae1290b0464501b604c04ff57df8ac77691daec3ee0d5109
BLAKE2b-256 checksum
How to use checksums
1521a0c3966bcf79430ce2df81eeaa4abc30ae47d1fbe8877bde37c4e12bb7a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-manylinux2014_aarch64.whl

Download URL qshare-0.4.3-py3-none-manylinux2014_aarch64.whl
Size 17.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4919d1a6f50fa73ba329a29e170db402a33242ab42afbd5a5cf713b3835e2e82
BLAKE2b-256 checksum
How to use checksums
b80c79f860541c99b4d1a9c9155b8937e3203be413067b53772e7e379c45edf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-manylinux1_x86_64.whl

Download URL qshare-0.4.3-py3-none-manylinux1_x86_64.whl
Size 19.2 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7078ccc3db8c789791a995f6d790a951ffc1ca05b7cfd7f4893dbe940fd77a58
BLAKE2b-256 checksum
How to use checksums
1a966c82de36181db9c3a25db7a89c30031f158dea7aec0708519fef2e6d0285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-manylinux1_i686.whl

Download URL qshare-0.4.3-py3-none-manylinux1_i686.whl
Size 18.4 MB
Tags Linux glibc 2.5+ x86-32 Python 3
SHA-256 checksum
How to use checksums
6baf7f8bf2dfee0cfb21ab68bbaf3023203a5d185e7e2364148342a9d2239af0
BLAKE2b-256 checksum
How to use checksums
a977d9f1f4566b034860fd79022607a875fcccb9a5f8f38e7a9f1d6f5e7b4961
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-macosx_11_0_arm64.whl

Download URL qshare-0.4.3-py3-none-macosx_11_0_arm64.whl
Size 19.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b3c2ff969c4cd55a60e6d67e5bd741f9b6c65adefd7c2648e9b8da14fee099ee
BLAKE2b-256 checksum
How to use checksums
9cda3d9fc8a793b15f949b9dcae65b2c69d82a3d368443eb78974319158438a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-macosx_10_13_x86_64.whl

Download URL qshare-0.4.3-py3-none-macosx_10_13_x86_64.whl
Size 21.1 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
31dd2587e65363124bb9b7981afec8e708f2a5c1401dd196efe31749c7a97052
BLAKE2b-256 checksum
How to use checksums
04bc1d2c8d12dbe15cc4bd30fd8ccf84a051f8e5fbb977d399372565d6d04865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-linux_armv6l.whl

Download URL qshare-0.4.3-py3-none-linux_armv6l.whl
Size 17.7 MB
Tags Python 3 linux armv6l
SHA-256 checksum
How to use checksums
ed53c40572023926fc722cc587f067aed45ade0a08befdc39175b14495278d8f
BLAKE2b-256 checksum
How to use checksums
eea5e9e1dd18cf8d1ce06eecaa513f806e9cdde6bdfe81ae359a6492c9942fd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / qshare-0.4.3-py3-none-any.whl

Download URL qshare-0.4.3-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f48ddd87b96feb09e59140c577f14a6f1296bedf5ce6c8920ab760a72a2c4a87
BLAKE2b-256 checksum
How to use checksums
00aeb87152b3844d7dc88b11c9f6b6f9898a31a8cf06ff80168abc6c134c373d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Security for qshare 0.4.3

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