How to Use RewriteBar with PopClip
The latest version of Rewritebar now supports PopClip. This means you can now trigger Rewritebar from PopClip.
Posted by
![Avatar of Mathias Michel](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmathias.9dc6ac61.jpg&w=64&q=75)
Related reading
Introducing Multi-Provider Support for RewriteBar
RewriteBar now supports multiple providers. This means you can choose between OpenAI, Anthropic and more.
How to Write a Good Prompt for Specific Actions
Learn how to craft a good prompt to improve the quality of your commands.
RewriteBar v2 is here! What is new?
Rewritebar v2 is here! Discover the new features and improvements that make your writing faster and more efficient.
![RewriteBar PopClip Integration](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fpopclip-install-button.789d412b.jpg&w=1920&q=75)
I am happy to announce that Rewritebar (v2.4.0) now supports PopClip, which was the most requested feature on the features board. This means you can now use RewriteBar together with PopClip by triggering an action from the PopClip floating menu. Here is how you can do it.
Current options
RewriteBar supports two modes of integration:
- Command Menu Snippet: Open a menu where you can select the command you want to use.
- Snippet to Execute a Specific Command: Executes a specific command directly. E.g., Grammar Correction
How to install a Snippet
RewriteBar shows a button on each command and in the general settings view that shows the snippet to install the PopClip extension.
Step by step:
- Navigate to a place where a PopClip Button is available (General Settings or a command)
- Click on the "PopClip" button.
- Select the text in the text field
- Wait for the PopClip UI
- Click on the "Install Extension...".
A Video how to install a snippet
Optional Configuration:
The text field to install a snippet is editable. This means you can adjust the snippet to your needs before installing it. Here are the fields you can adjust:
- Name: The name of the snippet
- Icon: RewriteBar already inserts the command icon, but you can replace it with any icon you like.
- Optional Parameters: Depending on the command, you can pass additional parameters. For example, the language parameter for the translate command.
Example Snippets
Command Menu Snippet
This snippet opens the command menu, where you can select a RewriteBar command.
// #popclip
// name: RewriteBar
// icon: symbol:sparkles
// language: javascript
pasteboard.text = popclip.input.text;
popclip.openUrl("rewritebar://command-menu");
Fix Grammar & Spelling
This snippet executes the Fix Grammar & Spelling command directly. Your selected text will be directly replaced by the corrected version.
// #popclip
// name: Fix Grammar & Spelling
// icon: symbol:pencil.tip.crop.circle
// language: javascript
pasteboard.text = popclip.input.text;
popclip.openUrl("rewritebar://command/fix-grammar-spelling");
Translate and Change Tone
These two commands are a bit special. They require a further parameter, such as the language or the tone. This offers you the ability to use the same command for different languages and tones, and to define any language or tone you want.
// #popclip
// name: Translate to {language}
// icon: symbol:globe
// language: javascript
pasteboard.text = popclip.input.text;
popclip.openUrl("rewritebar://command/translate/{language}");
Helpful resources
FAQ
Does PopClip integration work on all apps?
Yes, PopClip integration works on any app where you can select text and where PopClip is enabled. This includes web browsers, text editors, email clients, and more.
Can I create multiple snippets for different commands?
Absolutely! You can create as many snippets as you need. For example, you might want separate snippets for grammar correction, translation to specific languages, and different tone adjustments.
What happens if RewriteBar is not running when I use a PopClip snippet?
If RewriteBar is not running when you use a PopClip snippet, it will automatically launch RewriteBar and then execute your command.
Can I modify the snippets after installation?
To modify a snippet, you'll need to uninstall the existing one and install it again with your desired changes. First, uninstall through PopClip's extension settings (click the PopClip menu bar icon → Extensions → click the 'x' next to the snippet). Then follow the installation steps again with your modified configuration.
How do I reinstall a snippet?
To reinstall a snippet, first uninstall it through PopClip's extension settings (click the PopClip menu bar icon → Extensions → click the 'x' next to the snippet). Then follow the installation steps again to install the updated version.
Is there a limit to how much text I can process through PopClip?
The text limit is the same as when using RewriteBar directly. For optimal performance, I recommend selecting single sentences or paragraphs at a time.
Feedback or Questions
If you have any feedback or questions, please feel free to reach out to me via email.