EN / JP
← olbin.dev
VS Code Extension

Terminal Image Paster

Paste clipboard images into the VS Code integrated terminal as absolute file paths — reliably on macOS.

01. Problem → fix

Agent workflows often need “here is a screenshot path” in the terminal. Saving files by hand or flaky [CLIP] helpers breaks the flow. This extension saves the clipboard image as a temp PNG and types the absolute path into the active terminal.

Smart fallback: if the clipboard is not an image, normal text paste still works.

02. Why it is more reliable

TechniqueBenefit
Deterministic JXAUses script return values instead of fragile console.log capture
execFile + temp scriptsAvoids shell injection / buffer issues from string piping
/usr/bin/osascriptBypasses PATH / env conflicts inside VS Code’s terminal

03. Install

1. Download terminal-image-paster-0.0.1.vsix from GitHub
2. VS Code → Extensions → … → Install from VSIX…
3. Copy an image, focus the terminal, paste (Cmd+V)

Requires macOS (osascript / JXA) and VS Code ^1.80.0.

04. Privacy

Images are written as local temporary PNG files. Nothing is uploaded to olbin.dev.

Related: All projects

Source is open on GitHub.

View on GitHub Back to olbin.dev