Image Paste for Remote SSH (macOS)
Install locally, not on the remote server. This extension runs on your local machine to access the clipboard. VS Code should install it on the local (UI) side automatically, but if prompted, choose "Install Locally".
Requires macOS as local machine. This extension uses macOS-native AppleScript to read the clipboard. It does not work on Windows or Linux local machines.
Compatible with Claude Code, which accepts image file paths as input.
Paste clipboard screenshots into any VSCode terminal — locally or over Remote SSH. The image is saved to /tmp/screenshots/ and the file path is pasted into the terminal.
How It Works
- You press
Alt+I with a terminal focused
- The extension reads the clipboard image from your Mac using native
osascript
- The image is saved as a PNG to
/tmp/screenshots/ on the remote server (or locally)
- The file path is pasted into the active terminal (without pressing Enter)
[macOS Clipboard] → [osascript] → [vscode.workspace.fs] → [/tmp/screenshots/screenshot-<timestamp>.png]
↓
[path pasted into terminal]
Usage
- Copy a screenshot to your clipboard (
Cmd+Shift+4, or any screenshot tool)
- Focus on a terminal in VSCode
- Press
Alt+I
- The file path (e.g.
/tmp/screenshots/screenshot-1710000000000.png) appears in your terminal
With Claude Code
When using Claude Code in the terminal, the pasted file path is recognized as an image input — Claude will read and understand the screenshot.
With any terminal
In a regular terminal session, the pasted path can be used with any command:
# View the image
open /tmp/screenshots/screenshot-1710000000000.png
# Copy it somewhere
cp /tmp/screenshots/screenshot-1710000000000.png ./my-image.png
Storage
Screenshots are saved to /tmp/screenshots/ on the target machine:
- Remote SSH: saved on the remote server
- Local: saved on your Mac
Files are named screenshot-<timestamp>.png. The directory is created automatically. Files in /tmp/ are typically cleared on reboot.
Settings
| Setting |
Default |
Description |
claude-image-paste.screenshotDirectory |
/tmp/screenshots |
Directory to save screenshots on the target machine |
claude-image-paste.filenamePrefix |
screenshot |
Prefix for filenames. Files are named <prefix>-<timestamp>.png |
Configure in VS Code Settings (Cmd+,) or settings.json:
{
"claude-image-paste.screenshotDirectory": "/home/user/images",
"claude-image-paste.filenamePrefix": "clip"
}
Requirements
| Requirement |
Details |
| Local machine |
macOS (required — uses AppleScript) |
| VSCode |
1.85.0 or later |
| Remote server |
Any OS via Remote SSH (Linux, macOS, etc.) |
Limitations
- macOS only — will not work on Windows or Linux local machines
- PNG images only — reads clipboard as PNG format (macOS screenshots are PNG by default)
- Keybinding override —
Alt+I may conflict with other keybindings. Rebind via Keyboard Shortcuts if needed (Cmd+K Cmd+S, search claude-image-paste.paste)
- Requires an active terminal — won't activate without a focused terminal
Troubleshooting
"No image found in clipboard"
- Make sure you've copied an image, not a file or text. Use
Cmd+Shift+4 to capture a region.
File appears on Mac instead of remote server
- Open the Output panel (
Cmd+Shift+U → select "Claude Image Paste") to see which mode was detected.
License
MIT