A macOS right-click menu utility that processes selected text using a local LLM (Ollama). Select text anywhere, describe how you want it transformed, and get the result in your clipboard.
Built for analysts, data engineers, and anyone who frequently copies data from spreadsheets, DB viewers, or websites and needs to reformat it into lists, tuples, SQL queries, etc. Also works for any other simple LLM transformation you want to make without leaving your current context.
Currently set up for Mac + local LLM, but can be easily configured for other OSs and API-based LLMs for more intelligence/speed.
- Appears in right-click menu when text is selected
- Natural language prompts (e.g., "make this formal", "fix grammar", "translate to Spanish")
- Runs locally with Ollama - no API keys or costs
- Results copied to clipboard
-
Install Ollama and pull a model:
brew install ollama brew services start ollama ollama pull llama3.2
-
Clone and install:
git clone https://github.com/dmarulli/process_text_utility.git cd process_text_utility ./install.sh -
Refresh the Services menu:
/System/Library/CoreServices/pbs -flush
Or log out and back in.
- Select text in any application
- Right-click → Services → Process Text
- Enter your instruction (e.g., "summarize this", "make it shorter")
- Result is copied to clipboard - just paste
You can assign a keyboard shortcut for faster access:
- Open System Settings → Keyboard → Keyboard Shortcuts
- Click Services in the sidebar
- Scroll to Text → Process Text
- Click "Add Shortcut" and press your desired keys
Suggested shortcuts:
⌃⌥P(Ctrl+Option+P)⌃⌥T(Ctrl+Option+T)⇧⌘P(Shift+Cmd+P)
| Input | Prompt | Output |
|---|---|---|
hello world, how are you |
"remove excess whitespace" | hello world, how are you |
foobarbaz |
"put in a list" | ["foo", "bar", "baz"] |
report.csvSales Data.xlsxnotes.docx |
"postgres query for my_table where filename matches these" | SELECT * FROM my_table WHERE filename IN ('report.csv', 'Sales Data.xlsx', 'notes.docx'); |
their going to the store |
"fix grammar" | they're going to the store |
hey can u help me out |
"make formal" | Hello, could you please assist me? |
good morning |
"translate to Spanish" | buenos días |
"Ollama Not Running" error:
brew services start ollamaService not appearing in menu:
/System/Library/CoreServices/pbs -flushFirst-time permissions: macOS may ask for Automator/System Events permissions. Allow these in System Settings → Privacy & Security.
Edit ~/Library/Scripts/ProcessText/process_text.sh and change the model name:
"model": "llama3.2", # Change to gemma2:2b, phi3:mini, etc.Smaller models (gemma2:2b, phi3:mini) are faster but less accurate.
./uninstall.shMIT