Claude Screenshot Uploader 📸
Automatically upload macOS screenshots to remote servers for seamless Claude Code integration. Perfect for when you're running Claude Code on a remote server via SSH and need to share screenshots from your local Mac.
🎯 Problem Solved
When using Claude Code on a remote server via SSH, you can't directly paste local images. This tool automatically:
- Detects new screenshots on your Mac
- Uploads them to your server via SSH
- Copies the server path to your clipboard
- Allows you to paste the path in Claude Code to view the image
✨ Features
- 🚀 Automatic Detection - Monitors for new screenshots in real-time
- 📋 Clipboard Integration - Server path instantly copied, ready to paste
- 🟢🟡🔴 Visual Status - Menu bar icon shows upload status (via xbar)
- 🔒 Secure Transfer - Uses SSH with key authentication
- ⚡ Fast & Efficient - Uses rsync for smart transfers
- 🎯 Zero Interaction - Completely automatic workflow
- 🗑️ Optional Auto-Delete - Can remove local files after upload
📋 Requirements
- macOS (tested on macOS 13+)
- SSH access to a remote server
- Homebrew (for installing dependencies)
- xbar (optional, for menu bar status)
🚀 Quick Install
# Clone the repository git clone https://github.com/mdrzn/claude-screenshot-uploader.git cd claude-screenshot-uploader # Run the setup script ./setup.sh
The setup script will:
- Install required dependencies (fswatch)
- Configure your server settings
- Set up SSH keys if needed
- Install the background service
- Configure screenshot save location
- Install xbar plugin (if xbar is installed)
⚙️ Manual Installation
Click to expand manual installation steps
-
Install dependencies:
brew install fswatch brew install --cask xbar # Optional -
Clone and configure:
git clone https://github.com/mdrzn/claude-screenshot-uploader.git cd claude-screenshot-uploader # Create config from template cp config.example.sh ~/.claude-screenshot-uploader.conf # Edit the config with your server details open ~/.claude-screenshot-uploader.conf
-
Install the service:
# Copy files cp -r . ~/claude-screenshot-uploader/ cp com.claudecode.screenshot-uploader.plist ~/Library/LaunchAgents/ # Start the service launchctl load ~/Library/LaunchAgents/com.claudecode.screenshot-uploader.plist
-
Configure screenshot location:
defaults write com.apple.screencapture location ~/Screenshots killall SystemUIServer -
Install xbar plugin (optional):
cp xbar/screenshot-uploader.1s.sh ~/Library/Application\ Support/xbar/plugins/ # Restart xbar
🔧 Configuration
Edit ~/.claude-screenshot-uploader.conf:
# Server settings SERVER_HOST="your-server.com" # Your server hostname/IP SERVER_USER="username" # SSH username SERVER_PATH="/tmp/screenshots" # Remote directory # Local settings LOCAL_SCREENSHOTS="$HOME/Screenshots" # Where screenshots are saved # Options AUTO_DELETE="false" # Delete local files after upload
📸 Usage
-
Take a screenshot using macOS shortcuts:
Cmd + Shift + 4- Select areaCmd + Shift + 3- Full screenCmd + Shift + 5- Screenshot tools
-
Automatic upload happens instantly:
- xbar icon turns 🟡 during upload
- Returns to 🟢 when complete
-
Paste in Claude Code:
- The server path is already in your clipboard
- Just paste it in Claude Code to reference the image
Example:
You: Can you look at this screenshot?
You: /tmp/screenshots/SCR-20250910-abcd.png
Claude: [Views and analyzes the image]
🎛️ Service Control
Start service:
launchctl load ~/Library/LaunchAgents/com.claudecode.screenshot-uploader.plistStop service:
launchctl unload ~/Library/LaunchAgents/com.claudecode.screenshot-uploader.plistView logs:
tail -f /tmp/screenshot-uploader.log
Check status via xbar:
- Click the 📸 icon in your menu bar
- Shows current status and recent uploads
🔒 SSH Key Setup
For passwordless uploads, set up SSH keys:
# Generate SSH key (if you don't have one) ssh-keygen -t rsa -b 4096 # Copy to server ssh-copy-id username@your-server.com # Test connection ssh username@your-server.com
🗑️ Uninstall
To completely remove the uploader:
This will:
- Stop and remove the background service
- Remove xbar plugin
- Optionally remove configuration and logs
- Reset screenshot location to Desktop
🐛 Troubleshooting
Screenshots not uploading
-
Check if service is running:
launchctl list | grep screenshot -
Check logs for errors:
tail -30 /tmp/screenshot-uploader-error.log
-
Test SSH connection:
ssh username@server "echo 'Connection OK'" -
Verify fswatch is installed:
Permission errors
If you see "Operation not permitted":
- Go to System Settings → Privacy & Security → Files and Folders
- Ensure Terminal has access to your Screenshots folder
- Or use a different screenshot location (like ~/Screenshots)
xbar icon not showing
- Ensure xbar is running
- Refresh xbar plugins (Cmd+R in xbar menu)
- Check plugin is executable:
chmod +x ~/Library/Application\ Support/xbar/plugins/screenshot-uploader.1s.sh
📝 How It Works
-
File Monitoring: Uses
fswatchto monitor the Screenshots directory for new files matching the patternSCR-*.png -
Automatic Upload: When a new screenshot is detected, it's immediately uploaded via
rsyncover SSH -
Clipboard Integration: The remote file path is copied to clipboard using
pbcopy -
Status Indication: An xbar plugin shows real-time status in the menu bar
-
Background Service: Runs as a launchd service, starts automatically on login
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built for Claude Code users
- Uses fswatch for file monitoring
- Menu bar integration via xbar
📬 Support
If you encounter any issues or have questions:
- Open an issue
- Check existing discussions
Made with ❤️ for the Claude Code community