A self-hosted program that replaces the contents of your clipboard with a shareable URL. If clipboard contains a path to a file, the file is processed.
Features:
- Basically free
- Uploads files to your own Google Cloud Storage bucket
- Generates permalinks (unless you set an expiration time)
- Converts images to JPG to reduce storage size
- Videos play right in the browser
- Markdown files are converted to (GitHub-flavored) HTML so that they're viewable in a web browser, and the raw
.mdsource is uploaded alongside at the same path (swap.html→.md) so AI agents can fetch the source - Supports all file types
- Preserves original filenames when uploading files (for "Save As" in browser)
- JSON is prettified (via compact-json)
- Integrates with Mac Finder
If you have uv installed and GCP credentials configured, you can run this directly without cloning:
PROJECT_ID=myproject BUCKET_ID=mybucket uv run https://raw.githubusercontent.com/kym6464/clipboard-to-url/main/main.pyOr export the variables in your shell profile for persistent use:
export PROJECT_ID=myproject
export BUCKET_ID=mybucket
export OBJECT_PREFIX=optional/prefix/ # optional
export JPEG_QUALITY=90 # optional
uv run https://raw.githubusercontent.com/kym6464/clipboard-to-url/main/main.py- Install uv
- Authenticate with google cloud https://cloud.google.com/docs/authentication/client-libraries
- Create a bucket https://cloud.google.com/storage/docs/creating-buckets
- Make the bucket public by granting the
Storage Object Viewerrole to theallUsersprincipal (see this guide for more details). This allows anyone on the internet to view files that are in this bucket, but only you can upload files to this bucket. When all is said and done, it should look like this.
To integrate with Quick Actions like in the above demo, use Automator to invoke the script with files — this is what the final product could look like
pbcopy && uv run -s "/Users/kym/repos/clipboard-to-url/main.py"
For more details/troubleshooting, see https://cloudinary.com/blog/upload-image-files-to-cloudinary-using-a-finder-custom-quick-action-on-a-mac
| Image | Video |
|---|---|
![]() |
![]() |
| Code | Zip |
|---|---|
![]() |
![]() |
(1) Clone the repo
(2) Copy .env.example to .env and fill out the values
(3) Run uv run --script main.py



