A PopClip extension that lets you quickly shorten URLs using your self-hosted YOURLS instance.
YOURLS (Your Own URL Shortener) is a free, open-source URL shortening service that you can host on your own server. It provides:
- Complete control over your short URLs
- Detailed analytics and click tracking
- Custom keywords for memorable short links
- API for integration with other applications
PopClip is a macOS utility that appears when you select text. PopClip extensions provide quick access to actions related to the selected text, such as searching, copying, or in this case, shortening URLs.
- Download the latest release from the Releases page
- Double-click the
.popclipextzfile to install it in PopClip - Configure your YOURLS settings in the PopClip preferences
After installation, you'll need to configure the extension with your YOURLS information:
- Open PopClip preferences
- Find the YOURLS extension and click the gear icon
- Enter your YOURLS API URL (e.g.,
https://yourdomain.com/yourls-api.php) - Enter your signature token from your YOURLS admin panel
- Select a URL in any application
- When PopClip appears, click the YOURLS icon
- The URL will be shortened and copied to your clipboard
The extension automatically:
- Adds
https://to URLs that don't have a protocol - Handles special cases for certain domains to avoid "already shortened" errors
- Fast and seamless URL shortening
- Works with any self-hosted YOURLS instance
- Secure authentication via signature token
- Provides visual feedback when shortening fails
- PopClip for macOS
- A self-hosted YOURLS instance with API access
The extension consists of:
Config.json: Configuration for PopClipshortlink.png: Icon for the extensionyourls.sh: Script that handles the URL shortening logic
To package the extension manually:
cd YOURLS-fresh.popclipext
zip -r ../YOURLS.popclipextz *This project is released under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to submit issues or pull requests.
Created by Martin Kessler, 2025
