Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rewrite-this extension #17484

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions extensions/rewrite-this/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["@raycast"]
}
13 changes: 13 additions & 0 deletions extensions/rewrite-this/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# Raycast specific files
raycast-env.d.ts
.raycast-swift-build
.swiftpm
compiled_raycast_swift

# misc
.DS_Store
4 changes: 4 additions & 0 deletions extensions/rewrite-this/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"singleQuote": false
}
10 changes: 10 additions & 0 deletions extensions/rewrite-this/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Rewrite This Changelog

## [1.0.0] - 2024-03-02
### Added
- Initial release of Rewrite This extension
- Support for Claude API integration with choice of models
- Multiple rewriting presets (Conversational, Formal, Concise, Grammar fixes)
- Custom prompt option
- Format preservation options (line breaks, avoiding em dashes)
- Simple clipboard-based workflow for fast text rewriting
65 changes: 65 additions & 0 deletions extensions/rewrite-this/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Rewrite This

Rewrite This is a Raycast extension that instantly rewrites any text using Anthropic's Claude AI. Simply copy text to your clipboard, run the extension, and get back polished, well-written content in seconds.

## Why Use Rewrite This?

**Eliminate frustrating context switching** - No more copying text, switching to ChatGPT or Claude's website, waiting for it to load, pasting your text, writing a prompt, copying the result, and switching back to your original app.

With Rewrite This, you can:
- Stay in your current application (email, slack, document, browser or wherever)
- Use a simple hotkey (we recommend setting up OPTION + R)
- Get your rewritten text instantly copied back to your clipboard

This workflow saves you time and mental energy, letting you focus on your work without interruption.

## Features

- **Instant Text Transformation**: Rewrite any text with a single command
- **Premium Claude Models**: Choose from Claude 3.7 Sonnet or Claude 3.5 Sonnet
- Uses Claude 3.5 Sonnet by default - Anthropic's powerful model for writing tasks
- **Ready-to-Use Rewriting Presets**:
- Conversational & Human (Default)
- Formal & Professional
- Concise & Clear
- Grammar Fixes Only
- Plus a custom prompt option for your specific needs
- **Format Preservation**: All line breaks and paragraph structures are preserved automatically
- **Style Preferences**: Optional to remove pesky em dashes
- **Auto-Paste**: Optional setting to automatically paste the rewritten text after generation

## Security & Privacy

**Your Claude API key is stored locally on your Mac's secure keychain**:
- Keys are never transmitted to any server except directly to Anthropic's API
- No data is collected or stored by this extension
- All text processing happens directly between your computer and Claude's API

## Getting Started

1. Install the extension from Raycast Store
2. Add your Claude API key in the extension preferences
3. Copy text you want to rewrite
4. Run the "Rewrite This" command
5. The rewritten text is automatically copied to your clipboard

## Even Faster Rewriting

For the absolute fastest text rewriting experience, combine these two powerful features:

1. **Set up a dedicated hotkey** (OPTION + R recommended) in Raycast preferences
2. **Enable auto-paste** in the extension preferences

This combination creates a seamless workflow that requires just two actions:
1. **Select and copy text** you want to rewrite (CMD + C)
2. **Press your hotkey** (e.g., OPTION + R)

That's it! The extension will:
- Automatically send your text to Claude
- Process it according to your preferences
- Copy the rewritten text to your clipboard
- Instantly paste it back where your cursor is

## What you need to bring

- A Claude API key from [Anthropic Console](https://console.anthropic.com/)
Binary file added extensions/rewrite-this/assets/extension-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading