A macOS utility that adds customizable prompt snippets to the system Services menu, accessible via right-click context menu in any text field.
- Native macOS Integration: Prompts appear in the right-click Services menu
- Works Everywhere: Use in any app that supports Services (VS Code, Terminal, browsers, etc.)
- Easy Configuration: Define prompts in a simple YAML file
- Fast Access: No need to switch windows or copy/paste manually
- Organized: Group prompts by category
# Install UV if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/mjenior/pasteprompt.git
cd pasteprompt
uv venv
uv pip install -e .pip install -e .
# or directly from GitHub
pip install git+https://github.com/mjenior/pasteprompt.git# 1. Initialize configuration (creates ~/.config/pasteprompt/prompts.yaml)
pasteprompt init
# 2. Edit prompts to your liking
nano ~/.config/pasteprompt/prompts.yaml
# 3. Build workflows
pasteprompt build
# 4. Enable Services in System Settings (required on macOS Ventura+)
# Go to: System Settings > Keyboard > Keyboard Shortcuts > Services
# Enable the PastePrompt services under "Text"
# 5. Verify installation
pasteprompt list- In any text field (VS Code, Terminal, Notes, browser, etc.)
- Right-click to open context menu
- Navigate to Services submenu
- Select PastePrompt - [Prompt Name]
- Prompt text is inserted at cursor position
Alternatively, access via the application menu: App Name > Services > PastePrompt - [name]
For faster access, use the menu bar app with global hotkey support:
# Install menu bar dependencies
pip install pasteprompt[menubar]
# Start the menu bar app
pasteprompt menubar startThen:
- Press ⌘⇧P (Cmd+Shift+P) anywhere to open the quick picker
- Type to search prompts by name or content
- Press Enter to paste the selected prompt instantly
Or click the 📋 menu bar icon to see all prompts in a dropdown.
# Install for automatic startup
pasteprompt menubar install
# Check status
pasteprompt menubar status
# Remove from login items
pasteprompt menubar uninstallPrompts are defined in ~/.config/pasteprompt/prompts.yaml:
settings:
prefix: "PastePrompt"
include_key_in_name: false # Set to true for "[key] Name" format
prompts:
# Simple format
investigate:
content: "Investigate the root causes for these logs..."
display_name: "Investigate"
category: "Analysis"
# Multi-line content
code_review:
content: |
Please review this code with attention to:
1. Correctness and logic errors
2. Performance implications
3. Security vulnerabilities
display_name: "Code Review"
category: "Review"| Setting | Default | Description |
|---|---|---|
prefix |
"PastePrompt" |
Prefix for all menu items |
include_key_in_name |
false |
When true, shows key in menu (e.g., "[investigate] Investigate") |
Add these under settings.menubar in your config:
settings:
menubar:
hotkey: "cmd+shift+p" # Global hotkey (default: ⌘⇧P)
restore_clipboard: true # Restore clipboard after paste
show_notifications: true # Show notification messages| Setting | Default | Description |
|---|---|---|
hotkey |
"cmd+shift+p" |
Global hotkey for quick picker |
restore_clipboard |
true |
Restore original clipboard after pasting |
show_notifications |
true |
Show macOS notifications |
Hotkey format: Use + to combine modifiers: cmd, shift, ctrl/control, alt/option/opt
Examples: cmd+shift+p, cmd+shift+1, ctrl+alt+v
| Field | Required | Description |
|---|---|---|
content |
Yes | The prompt text to insert |
display_name |
No | Name shown in Services menu (defaults to formatted key) |
description |
No | Optional description for documentation |
category |
No | Group prompts for organization |
pasteprompt [command]
Core Commands:
init Create default configuration file
build Generate Automator workflows from config
list List all available prompts
paste Output prompt content (used by workflows)
validate Validate configuration file
clean Remove all PastePrompt workflows
refresh Refresh macOS Services menu
status Show current installation status
Menu Bar Commands:
menubar start Start the menu bar app (foreground)
menubar install Install for auto-start on login
menubar uninstall Remove from login items
menubar status Show menu bar app status
# Create initial configuration
pasteprompt init
# Build workflows (generates .workflow files)
pasteprompt build
# Rebuild after editing prompts
pasteprompt build --force
# List all prompts
pasteprompt list
# Show detailed prompt content
pasteprompt list --verbose
# Validate configuration
pasteprompt validate
# Check installation status
pasteprompt status
# Remove all workflows
pasteprompt clean
# Force refresh Services menu
pasteprompt refresh# Use a specific config file
pasteprompt build --config ./my-prompts.yaml
pasteprompt list --config ./my-prompts.yaml| Variable | Default | Description |
|---|---|---|
PASTEPROMPT_CONFIG |
~/.config/pasteprompt/prompts.yaml |
Path to config file |
PASTEPROMPT_DEBUG |
false |
Enable debug logging |
-
Enable Services in System Settings (most common issue on macOS Ventura+):
- Open System Settings > Keyboard > Keyboard Shortcuts > Services
- Scroll to the Text section
- Enable the PastePrompt services you want to use
- Alternatively, open directly via Terminal:
open "x-apple.systempreferences:com.apple.Keyboard-Settings.extension?Services"
-
Refresh Services Cache:
pasteprompt refresh # or manually: /System/Library/CoreServices/pbs -flush /System/Library/CoreServices/pbs -update -
Check Workflow Location:
ls -la ~/Library/Services/PastePrompt*
-
Log out and back in - Sometimes required for Services to update
-
Rebuild workflows if you upgraded from an older version:
pasteprompt build --force
-
Test CLI Directly:
pasteprompt paste investigate # Should output the prompt content -
Check Installation:
pasteprompt status
-
Ensure cursor is in a text field - Services only work in editable text contexts
The first time a workflow runs, macOS may prompt for permissions:
- Go to System Settings > Privacy & Security > Privacy
- Enable Accessibility for Automator
- Enable Automation for your terminal app
Global hotkey not working:
-
Grant Accessibility permissions:
- Open System Settings > Privacy & Security > Accessibility
- Add and enable your terminal app (Terminal, iTerm, etc.)
- If running as a standalone app, add Python or the app itself
-
Restart the menu bar app:
pasteprompt menubar start
Paste not inserting text:
- Ensure the cursor is in an editable text field
- Check that Accessibility permissions are granted
- Try clicking the menu bar icon and selecting a prompt directly
Menu bar icon not appearing:
- Check that the app is running:
pasteprompt menubar status - Ensure rumps dependencies are installed:
pip install pasteprompt[menubar]
# Clone repository
git clone https://github.com/mjenior/pasteprompt.git
cd pasteprompt
# Create virtual environment
uv venv
source .venv/bin/activate
# Install in development mode
uv pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check src/- Configuration: User defines prompts in
prompts.yaml - Build:
pasteprompt buildgenerates macOS Automator Quick Action workflows - Integration: Workflows are placed in
~/Library/Services/ - Execution: When selected from Services menu, workflow runs
pasteprompt paste <key> - Output: Prompt content is output to stdout and inserted by Automator
MIT License - see LICENSE file for details.
Contributions welcome! Please open an issue or submit a pull request.