A comprehensive image management system designed to work seamlessly with Claude Code and AI development workflows. This server allows you to easily transfer screenshots and images from any device to your development environment and provides intelligent command integration.
- 🖼️ Drag & Drop Upload: Upload images from any browser
- 📱 Cross-Device Access: Works from Windows, Mac, mobile, or any device with a browser
- 🔄 Auto-Refresh: Real-time file list updates
- 🤖 Claude Code Integration: One-click commands for AI image analysis
- 🚀 Zero Dependencies: Uses only Python standard library
- 💾 Smart Organization: Automatic file management and organization
- 🔧 Multi-Script Support: Various image transfer methods (SSH, mounted shares, direct upload)
- ⚡ Smart Commands: Auto-server management with the
ricommand system
git clone https://github.com/jasonvanwyk/image-server.git
cd image-server
chmod +x image-upload-server.pypython3 image-upload-server.pyOpen http://YOUR_SERVER_IP:8888 in any browser and drag/drop images.
ri "your-image.png"- Python 3.6+
- Linux/Unix environment
- Network access between devices
-
Clone the repository:
git clone https://github.com/jasonvanwyk/image-server.git cd image-server -
Make scripts executable:
chmod +x image-upload-server.py
-
Test the server:
python3 image-upload-server.py
For full integration with development workflows, set up the complete ri command system:
You'll need these additional scripts for full functionality:
ri-smart.sh- Main command interface with auto-server managementread-image.sh- SSH-based Windows screenshot fetchingread-image-simple.sh- Manual transfer fallbackread-image-winscp.sh- WinSCP-based transfersmount-windows-share.sh- Windows share mountingimage-server.service- SystemD service file
# Create central screenshots directory
mkdir -p /home/$USER/screenshots
# Update image-upload-server.py to use central location
# Edit UPLOAD_DIR = "/home/$USER/screenshots"# Make ri-smart.sh accessible globally
sudo ln -sf /path/to/ri-smart.sh /usr/local/bin/ri
# Or add to ~/.bashrc:
echo 'alias ri="/path/to/ri-smart.sh"' >> ~/.bashrc
source ~/.bashrcEdit the configuration variables in each script:
ri-smart.sh:
LOCAL_IMAGE_DIR="/home/$USER/screenshots"
IMAGE_SERVER_PORT=8888
IMAGE_SERVER_SCRIPT="/path/to/image-upload-server.py"For Windows Integration (read-image.sh):
WINDOWS_USER="your-windows-username"
WINDOWS_HOST="192.168.x.x" # Your Windows machine IP
WINDOWS_SCREENSHOT_DIR="/c/Users/YourName/Downloads"# Copy service file to systemd
sudo cp image-server.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable image-server
sudo systemctl start image-server| Command | Description |
|---|---|
ri |
List images and start server if needed |
ri filename.png |
Prepare specific image for Claude to read |
ri --server |
Start image upload server |
ri --stop |
Stop image upload server |
ri --status |
Check server status |
ri --help |
Show help information |
| Command | Description |
|---|---|
ri --latest |
Fetch latest screenshot from Windows |
ri --list |
List available images |
| Windows Integration | SSH-based screenshot fetching |
- Access the server:
http://YOUR_SERVER_IP:8888 - Upload methods:
- Drag & drop images onto the upload area
- Click "Choose Files" to browse and select
- Mobile/tablet friendly interface
- File management: View uploaded files with ready-to-use commands
- Setup OpenSSH on Windows
- Use
ri --latestto fetch screenshots automatically - Requires Windows PowerShell setup (see
setup-windows-openssh.ps1)
- Mount Windows shared folder
- Direct file access without SSH
- Use
mount-windows-share.shscript
- Use web interface from Windows browser
- Drag/drop screenshots directly
- No additional setup required
ri - Start server and list images
ri <filename> - Prepare image for Claude to read
ri --server - Just start the image server
ri --stop - Stop the image server
ri --status - Check server status
ri --help - Show this help
# Override default settings
export LOCAL_IMAGE_DIR="/custom/path/screenshots"
export WINDOWS_HOST="192.168.1.100"
export IMAGE_SERVER_PORT="9999"Edit image-upload-server.py:
UPLOAD_DIR = "/home/user/screenshots" # Change upload directory
PORT = 8888 # Change server port- Default Port: 8888
- Bind Address: 0.0.0.0 (all interfaces)
- Upload Directory:
/home/user/screenshots
Server won't start:
# Check if port is in use
lsof -i:8888
# Kill existing process
pkill -f image-upload-server.pyPermission denied:
# Make sure scripts are executable
chmod +x *.sh *.py
# Check directory permissions
ls -la /home/$USER/screenshotsNetwork access issues:
# Check firewall
sudo ufw status
# Allow port if needed
sudo ufw allow 8888Windows SSH issues:
- Ensure OpenSSH is installed and running
- Check Windows firewall settings
- Verify SSH key authentication
Run with verbose output:
python3 image-upload-server.py --debug{
"tasks": [
{
"label": "Start Image Server",
"type": "shell",
"command": "ri --server"
}
]
}# In any project directory
ri screenshot.png # Image is ready for Claude analysis#!/bin/bash
# Auto-capture and prepare for Claude
ri --latest
echo "Latest screenshot ready for analysis"GET /- Web interfaceGET /list- JSON list of uploaded filesPOST /upload- File upload endpoint
File List (/list):
["image1.png", "image2.jpg", "screenshot.png"]Upload Response:
File filename.png uploaded successfully
- Local Network Only: Server binds to all interfaces but intended for local network use
- No Authentication: Anyone with network access can upload/view files
- File Validation: Only image files are accepted
- Directory Traversal: Protected against path traversal attacks
- Recommended: Use on trusted networks only
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
git clone https://github.com/jasonvanwyk/image-server.git
cd image-server
# Make changes
python3 image-upload-server.py # Test locallyMIT License - see LICENSE file for details.
- Issues: GitHub Issues
- Documentation: This README and inline code comments
- Community: Contributions and feature requests welcome
- Central screenshot directory (
/home/user/screenshots) - Improved ri command integration
- Enhanced Windows compatibility
- SystemD service support
- Comprehensive documentation
- Basic web upload functionality
- Claude Code integration
- Cross-platform support
