A VS Code extension that seamlessly pastes clipboard images directly into your terminal, automatically saving them to your project and inserting the file path. Perfect for Claude Code users and any workflow that requires quick image sharing in terminal environments.
β If this extension saves you time and makes your workflow smoother, please consider starring the repository! Your support means the world to us and helps the project grow. β
If this extension helps you, consider supporting the development:
Your support helps maintain and improve this extension!
- Zero Configuration Required - Works out of the box across all platforms
- Cross-Platform Support - Windows, macOS, Linux, and WSL/WSL2 compatible
- Smart Clipboard Detection - Automatically detects when images are in your clipboard
- Automatic File Management - Saves images to configurable folder (default:
.cp-images/) with timestamps - Instant Path Insertion - Immediately inserts the relative path into your active terminal
- Claude Code Optimized - Perfect for sharing images with Claude Code AI assistant
- WSL Integration - Seamless PowerShell integration for WSL environments
- Keyboard Shortcut - Quick
Ctrl+Alt+V(Windows/Linux) orCmd+Alt+V(macOS) - Terminal Focus Aware - Only activates when terminal is in focus
- Multiple Image Formats - Supports PNG and other common clipboard image formats
- Smart Git Integration - Automatically adds images folder to .gitignore (configurable)
- Customizable Folder Name - Configure where images are saved (default:
.cp-images/) - Automatic Cleanup - Keeps only recent images (default: 10) to prevent folder bloat
- Visual Studio Code 1.74.0 or higher
- For Windows/WSL: PowerShell (included by default)
- For macOS:
pngpasteutility (install viabrew install pngpaste) - For Linux:
xcliputility (install via your package manager)
If you find this extension useful:
- β Star this repository on GitHub
- π Leave a review on the VS Code Marketplace
- π Report issues or suggest features
- π¬ Share with other developers
Perfect for sharing screenshots, diagrams, or images with Claude Code AI assistant:
- Copy any image to clipboard (screenshot, design, diagram)
- Press
Ctrl+Alt+Vin terminal - Image path is automatically inserted for Claude Code to reference
- Share UI mockups or designs with team members
- Include error screenshots in bug reports
- Add visual context to code discussions
- Document visual issues or features
- Quickly include screenshots in documentation workflows
- Save and reference images during technical writing
- Create visual guides and tutorials
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for "Terminal Paste Image"
- Click "Install"
- Download the latest
.vsixfile from releases - Open VS Code
- Press
Ctrl+Shift+Pand type "Install from VSIX" - Select the downloaded file
- Copy an image to your clipboard (screenshot, image file, etc.)
- Focus on any terminal in VS Code
- Press
Ctrl+Alt+V(Windows/Linux) orCmd+Alt+V(macOS) - The image is saved to your configured folder and path is inserted in terminal
- Open Command Palette (
Ctrl+Shift+P) - Type "Paste Image to Terminal"
- Execute the command
The extension integrates with the command palette and keyboard shortcuts - no additional context menu items.
- Works out of the box with PowerShell
- No additional setup required
- Automatically detects WSL environment
- Uses Windows PowerShell for clipboard operations
- No additional configuration needed
Install pngpaste for optimal performance:
brew install pngpasteInstall xclip for clipboard operations:
# Ubuntu/Debian
sudo apt-get install xclip
# Fedora/RHEL
sudo dnf install xclip
# Arch
sudo pacman -S xclipImages are automatically saved to:
your-project/
βββ .cp-images/
β βββ pasted-image-2024-01-15T10-30-45.png
β βββ pasted-image-2024-01-15T10-31-02.png
β βββ ...
Path format inserted in terminal:
.cp-images/pasted-image-2024-01-15T10-30-45.png
| Platform | Shortcut |
|---|---|
| Windows/Linux | Ctrl+Alt+V |
| macOS | Cmd+Alt+V |
Note: Shortcuts only work when terminal is focused to avoid conflicts with normal paste operations.
The extension provides several configuration options that can be customized in VS Code settings:
| Setting | Type | Default | Description |
|---|---|---|---|
terminalPasteImage.folderName |
string | .cp-images |
Name of the folder where pasted images will be saved |
terminalPasteImage.autoGitIgnore |
boolean | true |
Automatically add the images folder to .gitignore if not present |
terminalPasteImage.maxImages |
number | 10 |
Maximum number of images to keep (older images are automatically deleted) |
- Open VS Code Settings (
Ctrl+,orCmd+,) - Search for "Terminal Paste Image"
- Modify the settings as needed
By default, the extension will:
- Check if a
.gitignorefile exists in your workspace - Verify if your images folder is already ignored
- Automatically add the folder to
.gitignoreif not present - Add a helpful comment indicating it's for Terminal Paste Image
This behavior can be disabled by setting terminalPasteImage.autoGitIgnore to false.
You can change the default folder name from .cp-images to any folder name you prefer:
{
"terminalPasteImage.folderName": "screenshots"
}The folder will be created relative to your workspace root.
By default, the extension keeps only the 10 most recent images to prevent folder bloat:
{
"terminalPasteImage.maxImages": 10
}- When you paste a new image, older images beyond the limit are automatically deleted
- Images are sorted by modification time (newest kept, oldest deleted)
- Only images matching the
pasted-image-*.pngpattern are managed - Set to a higher number if you need to keep more images
- Minimum value is 1, maximum is 100
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Clone this repository
- Run
npm install - Open in VS Code
- Press
F5to launch extension development host - Test your changes
- Initial release
- Cross-platform clipboard image detection
- Automatic image saving with timestamps
- Terminal path insertion
- WSL/WSL2 support
- Keyboard shortcut integration
- Configurable folder name (default:
.cp-images/) - Auto .gitignore management
- Smart git integration settings
- Automatic image cleanup (keeps last 10 images by default)
- Configurable maximum image count (1-100)
- macOS requires
pngpasteutility for best experience - Linux requires
xclipfor clipboard operations - Some image formats may need conversion to PNG
This project is licensed under the MIT License - see the LICENSE file for details.
- π GitHub: @doonfrs
- β Support: Buy me a coffee
Made with β€οΈ for the VS Code and Claude Code community
