VS Code extension that saves clipboard images to DevContainer workspaces and provides the file path in the terminal.
Features
Image Paste in Terminal: Press Cmd+V in a DevContainer terminal to automatically save clipboard images to your workspace
Smart Detection: Automatically detects images in clipboard and falls back to normal paste for text
Customizable: Configure save location and filename patterns
File Path Insertion: Automatically inserts the saved image path into your terminal
Requirements
VS Code 1.74.0 or higher
macOS (currently only supports macOS due to AppleScript dependency)
Active DevContainer or remote connection
Installation
Install from the VS Code Marketplace or manually:
# Clone the repository
git clone https://github.com/touyu/devcontainers-terminal-image-paste.git
# Install dependencies
npm install
# Package the extension
npm run package
# Install the VSIX file in VS Code
code --install-extension devcontainers-terminal-image-paste-0.0.1.vsix
Usage
Open a terminal in your DevContainer
Copy an image to your clipboard (screenshot, file copy, etc.)
Focus the terminal and press Cmd+V
The image will be saved to your workspace and the file path inserted
Extension Settings
Configure the extension through VS Code settings:
devcontainersTerminalImagePaste.enabled: Enable/disable the extension (default: true)
devcontainersTerminalImagePaste.saveDir: Directory to save images relative to workspace root (default: "images")
devcontainersTerminalImagePaste.fileNamePattern: Filename pattern for saved images (default: "clipboard-{timestamp}.png")
{timestamp} will be replaced with current date/time