https://github.com/citizenll/clipboard-image-watcher
A Windows tray app that converts clipboard memory images to local files, solving the issue where Claude Code CLI cannot paste screenshots in Windows terminal. Automatically saves screenshots as PNG files and replaces clipboard content with file references
https://github.com/citizenll/clipboard-image-watcher
claude-code clipboard png-converter screenshot terminal tray-app windows
Last synced: 6 months ago
JSON representation
A Windows tray app that converts clipboard memory images to local files, solving the issue where Claude Code CLI cannot paste screenshots in Windows terminal. Automatically saves screenshots as PNG files and replaces clipboard content with file references
- Host: GitHub
- URL: https://github.com/citizenll/clipboard-image-watcher
- Owner: citizenll
- License: mit
- Created: 2025-08-22T06:34:31.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-22T07:57:27.000Z (6 months ago)
- Last Synced: 2025-08-22T08:26:57.202Z (6 months ago)
- Topics: claude-code, clipboard, png-converter, screenshot, terminal, tray-app, windows
- Language: C#
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
- License: LICENSE
Awesome Lists containing this project
README
# π Clipboard Image Watcher

English | [δΈζ](README.md)
> Solve the issue where Claude Code CLI cannot paste screenshots in Windows terminal
A lightweight Windows tray application designed to solve the problem of Claude Code CLI not being able to paste memory screenshots in Windows terminal. Automatically converts clipboard memory images to local files, enabling normal screenshot pasting in terminal.
## π― Problem Solved
**Can't paste screenshots in Claude Code CLI?** This happens because terminals can only handle file paths, not binary image data from memory.
**Our Solution:**
- πΈ Automatically detects memory images in clipboard when you take screenshots
- πΎ Saves memory images as local PNG files
- π Replaces clipboard memory data with file paths
- β
Now you can paste screenshots in Claude Code CLI normally!
## β¨ Features
- **π― Optimized for Claude Code** - Perfectly solves terminal screenshot pasting issue
- **β‘ Automatic Processing** - Converts screenshots instantly, no manual action needed
- **ποΈ Smart Cache Management** - Keeps max 3 files, each for 1 hour
- **π» Invisible Operation** - Pure tray app that doesn't disturb your workflow
- **π‘ Real-time Feedback** - Mouse hover shows last screenshot time
- **π§Ή Auto Cleanup** - Cleans all temp files when program exits
## π Quick Start
### System Requirements
- Windows 10/11
- .NET 9.0
### Installation & Running
1. Download from [Releases](https://github.com/citizenll/clipboard-image-watcher/releases)
2. Download `ClipboardImageWatcher.exe` file
3. Double-click to run (icon is embedded, no additional files needed)
4. The program will display an icon in the system tray
### Usage
1. **Start App** - Double-click to run, tray icon appears
2. **Open Claude Code CLI** - Start Claude Code in your terminal
3. **Take Screenshot** - Use Windows + Shift + S or any screenshot tool
4. **Paste to Claude Code** - Press Ctrl+V in Claude Code CLI
5. **β
Success!** - Now you can paste and send screenshots in terminal normally
#### π‘ Workflow
```
Screenshot β Memory Image β Auto Convert β Local File β Terminal Ready β
```
**Without this app:**
```
Screenshot β Memory Image β Paste to Terminal β β Fail (Terminal can't handle memory images)
```
**With this app:**
```
Screenshot β Memory Image β Auto Save as File β Paste File Path β β
Success!
```
## π§ How It Works
```
User Screenshots β Image enters clipboard memory
β
App Detection β Monitors clipboard changes
β
Save File β Saves memory image as local PNG
β
Replace Clipboard β Replaces memory image with file reference
β
User Paste β Pastes local file (reduces memory usage)
```
## π Feature Details
### Cache Management
- **File Limit**: Maximum of 3 screenshot files
- **Time Limit**: Each file preserved for up to 1 hour
- **Auto Cleanup**: Checks and deletes expired files every 5 minutes
- **Exit Cleanup**: Deletes all cache files when program closes
### User Interface
- **Tray Icon**: Shows application running status
- **Tooltip**: Mouse hover displays last capture time
- **Context Menu**: Provides exit option
- **No Main Window**: Doesn't show in taskbar, doesn't interrupt work
## π οΈ Development & Building
### Environment Requirements
- Visual Studio 2022 or higher
- .NET 9.0 SDK
- Windows SDK
### Build Steps
```bash
# Clone repository
git clone https://github.com/citizenll/clipboard-image-watcher.git
cd clipboard-image-watcher
# Build project
dotnet build ClipboardImageWatcher/ClipboardImageWatcher.csproj
# Run project
dotnet run --project ClipboardImageWatcher/ClipboardImageWatcher.csproj
```
### Project Structure
```
cc-paste/
βββ ClipboardImageWatcher/
β βββ App.xaml # WPF application entry point
β βββ App.xaml.cs # Application startup logic
β βββ MainWindow.xaml # Main window (hidden)
β βββ MainWindow.xaml.cs # Core functionality implementation
β βββ ClipboardMonitor.cs # Clipboard monitoring
β βββ tray.ico # Tray icon
β βββ ClipboardImageWatcher.csproj
βββ .gitignore
βββ README.md
βββ README.en.md
βββ cc-paste.sln
```
## π Logging
The application creates a `log.txt` file in the program directory, recording:
- Application startup and shutdown
- Screenshot capture and processing
- File saving and cleanup
- Error information
## π€ Contributing
Issues and Pull Requests are welcome!
### Contribution Guidelines
1. Fork this repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## π Issue Reporting
If you encounter problems or have feature suggestions, please submit them on the [Issues](https://github.com/citizenll/clipboard-image-watcher/issues) page.
## β FAQ
### Q: Why can't Claude Code CLI paste screenshots?
A: Because terminal applications can only handle text and file paths, not binary image data from clipboard memory.
### Q: How does this app solve the problem?
A: It automatically saves clipboard memory images as local PNG files, then replaces clipboard content with file paths that terminals can recognize and process.
### Q: Which screenshot tools are supported?
A: All screenshot tools that save images to clipboard, including:
- Windows + Shift + S (Windows built-in)
- Snipping Tool
- Third-party tools like PicPick, Greenshot, etc.
### Q: Will it affect pasting in other applications?
A: No. When you paste to image editors or other apps, the system automatically loads the image from the file, with identical results.
## π Version History
- **v1.0.0** - Initial release
- Optimized for Claude Code CLI
- Automatic screenshot conversion
- Smart cache management
- Single-file deployment
---
**Designed for Claude Code Users** | Windows Only