claude-utils-0.1.0/demo-watch.sh 0000755 0000000 0000000 00000005367 10461020230 0014617 0 ustar 0000000 0000000 #!/bin/bash
# Claude-Utils Watch Mode Demo
echo "🎬 Claude-Utils Watch Mode Demo"
echo "================================"
echo ""
echo "This demo shows the magic clipboard watching feature!"
echo ""
# Check if built
if [ ! -f "target/release/claude-utils" ]; then
echo "Building claude-utils..."
cargo build --release
fi
# Function to copy test image to clipboard (macOS)
copy_test_image() {
if [[ "$OSTYPE" == "darwin"* ]]; then
# Create a simple test image using macOS
osascript -e 'tell application "System Events" to key code 4 using {command down, shift down, control down}'
echo "📸 Take a screenshot now (Cmd+Shift+4) or copy any image!"
else
echo "📋 Copy any image to your clipboard to test!"
fi
}
echo "1️⃣ Starting claude-utils in watch mode..."
./target/release/claude-utils start --watch --no-auth &
DAEMON_PID=$!
# Wait for startup
sleep 3
echo ""
echo "2️⃣ How to test:"
echo " - Copy any image to clipboard (screenshot, image from web, etc.)"
echo " - Watch your Desktop - a file 'claude-paste.png' will appear!"
echo " - Press Cmd+V in any terminal - the path will paste!"
echo ""
# Instructions based on OS
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "🍎 macOS Quick Test:"
echo " 1. Press Cmd+Shift+Ctrl+4 to screenshot to clipboard"
echo " 2. Open Terminal and press Cmd+V"
echo " 3. See the magic! Path appears instead of binary data!"
echo ""
echo " Try it in other apps too:"
echo " - Preview.app → Cmd+V → Original image pastes!"
echo " - Terminal → Cmd+V → File path pastes!"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "🐧 Linux Quick Test:"
echo " 1. Take a screenshot to clipboard"
echo " 2. Press Ctrl+V in terminal"
echo " 3. File path appears!"
else
echo "🪟 Windows Quick Test:"
echo " 1. Use Snipping Tool or Win+Shift+S"
echo " 2. Press Ctrl+V in terminal"
echo " 3. File path appears!"
fi
echo ""
echo "3️⃣ Watch the Desktop folder..."
echo " You should see:"
echo " - claude-paste.png (latest image)"
echo " - claude-paste-YYYYMMDD-HHMMSS.png (timestamped)"
echo ""
echo "4️⃣ Monitor running... Press Ctrl+C to stop"
echo ""
# Function to show status
show_status() {
echo "📊 Status Check:"
echo -n " Latest symlink: "
if [ -L ~/Desktop/claude-paste.png ]; then
ls -la ~/Desktop/claude-paste.png | awk '{print $NF}'
else
echo "Not created yet"
fi
echo -n " Clipboard content: "
./target/release/claude-utils clip get --format text 2>/dev/null | head -1
}
# Trap Ctrl+