Skip to main content

cf-share-screenshot

Select an area of the screen, upload it to a temporary public URL through a Cloudflare quick tunnel, and copy that URL to the clipboard. Useful for pasting a screenshot link into a chat with an AI agent or a colleague.

The clipboard receives [Screenshot](https://….trycloudflare.com/img/<id>.png) (try again in a few seconds if this URL doesn't work).

Requirements

Linux with GNOME on Wayland, Python 3.10 or newer, and these executables on your PATH:

  • cloudflared
  • gnome-screenshot
  • wl-copy (from wl-clipboard)
  • notify-send (from libnotify) for desktop notifications

Install these tools separately. On Debian or Ubuntu:

sudo apt install gnome-screenshot wl-clipboard libnotify-bin

Installation

uv tool install cf-share-screenshot

Requires uv. This puts cf-share-screenshot in ~/.local/bin. A one-off run with uvx cf-share-screenshot also works, but a persistent installation is better for a keyboard shortcut.

You can also run the single file without installing anything:

python3 cf_share_screenshot.py

Usage

cf-share-screenshot   # select an area, upload it, copy the URL

Everything starts automatically when needed.

Bind the command to a keyboard shortcut in GNOME Settings → Keyboard → Custom Shortcuts, using the full path, for example /home/you/.local/bin/cf-share-screenshot.

Availability

  • Screenshots are available for 30 minutes while the app is running.
  • A new link may take a few seconds to start working.
  • The app shuts down after 80 minutes without a new screenshot, or if its Cloudflare connection fails. Taking another screenshot starts it again.
  • Shutting down the app makes existing links unavailable.

Security

Anyone with a screenshot link can view it while it is available. Treat links as secrets and avoid sharing sensitive content. Cloudflare's free Quick Tunnels service has no uptime guarantee.

Development

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

Publishing

The version lives in __version__ in cf_share_screenshot.py (currently 0.1.2). 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 https://test.pypi.org/simple/ --default-index https://pypi.org/simple/ cf-share-screenshot@0.1.2 --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, bump __version__ 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-screenshot 0.1.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 cf-share-screenshot 0.1.2
File Size Uploaded Provenance Actions
cf_share_screenshot-0.1.2.tar.gz 13.0 kB Without provenance Details for cf_share_screenshot-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 22.8 kB

Release files / cf_share_screenshot-0.1.2.tar.gz

Download URL cf_share_screenshot-0.1.2.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
65ea91e930ba38975eb656567467d6d22a2bac513372a6180e1e2cc2508ac393
BLAKE2b-256 checksum
How to use checksums
9999c35388723666c2fa3c7ea94d54a3a4afcf43809c4dc6d75f2c41d3472f47
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_screenshot-0.1.2-py3-none-any.whl

Download URL cf_share_screenshot-0.1.2-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd092775f484b6d3f0f53946112beb037458a1bcf26f1a56dc7750746158998f
BLAKE2b-256 checksum
How to use checksums
f214300ed2516aa844c463cff91c86245c063bd5182165f47f85ceca4514c62b
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-screenshot 0.1.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