Commit graph

257 commits

Author SHA1 Message Date
Peter Steinberger
26c275df07 Update spec 2025-05-25 02:27:50 +02:00
Peter Steinberger
841045edbb ee test prep 2025-05-25 02:27:45 +02:00
Peter Steinberger
b029504f2f Report version right in the tool 2025-05-25 02:27:32 +02:00
Peter Steinberger
bda349ea29 Improve error messages 2025-05-25 02:27:19 +02:00
Peter Steinberger
b5f1fa7ded Report analyze time 2025-05-25 02:26:45 +02:00
Peter Steinberger
acca3ba4a4 build fixes 2025-05-25 02:26:34 +02:00
Peter Steinberger
9acd68c7c5 Update ignores 2025-05-25 02:26:21 +02:00
Peter Steinberger
2ea94f94f4 Delete the old peekaboo 2025-05-25 02:26:14 +02:00
Peter Steinberger
ea47b15a6a Various readme work 2025-05-25 01:53:10 +02:00
Peter Steinberger
3e9bfcdf4e Fixes a test 2025-05-25 01:43:47 +02:00
Peter Steinberger
c366be75e6 Test explainer 2025-05-25 01:43:43 +02:00
Peter Steinberger
5c3958d305 Run mocked tests 2025-05-25 01:43:35 +02:00
Peter Steinberger
d84b805894 Update spec for cli rename 2025-05-25 01:43:27 +02:00
Peter Steinberger
806fcd6b50 Readme tweaks 2025-05-25 01:35:02 +02:00
Peter Steinberger
cac7975bbe Update tests 2025-05-25 01:34:58 +02:00
Peter Steinberger
8209adc3d0 Update to Swift 6 and rename swift-cli to peekaboo-cli
- Migrate Swift code to Swift 6 compatibility
- Rename swift-cli folder to peekaboo-cli for better naming consistency
- Update all references throughout the codebase (build scripts, imports, tests)
- Fix .gitignore to properly track Swift source files
- Update environment variable names to use PEEKABOO_ prefix

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 01:31:43 +02:00
Peter Steinberger
97eba5e97e Add tests; finish peekabo cli rename 2025-05-25 01:28:34 +02:00
Peter Steinberger
857ce73b94 rename swift-cli to peekaboo-cli 2025-05-25 01:28:06 +02:00
Peter Steinberger
99acdff66f Add peekaboo cli 2025-05-25 01:26:49 +02:00
Peter Steinberger
670e1c485a Add GitHub Actions CI workflow for Node.js builds
- Configure CI to run on macOS-latest
- Test with Node.js 20.x and 22.x
- Run npm build and tests on push/PR

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 01:25:35 +02:00
Peter Steinberger
76da6bc87e
Update README.md 2025-05-23 06:51:27 +02:00
Peter Steinberger
8fc7209d6a
Update README.md 2025-05-23 06:51:15 +02:00
Peter Steinberger
d46d38de53
Update README.md 2025-05-23 06:50:55 +02:00
Peter Steinberger
bc0896153a
Update README.md 2025-05-23 06:50:39 +02:00
Peter Steinberger
2de38fd0ad
Update README.md 2025-05-23 06:50:19 +02:00
Peter Steinberger
29ed3a2746 👁️ Add "I SEE DEAD PIXELS\!" section explaining why AI needs eyes
- Add humorous dialogue showing the pain of explaining visual bugs to blind AI
- List practical benefits: bug hunting, design reviews, UI testing, etc.
- Position Peekaboo as "supernatural contact lenses" for AI assistants
- Keep the spooky theme while explaining real developer value

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-23 06:49:56 +02:00
Peter Steinberger
d4263d7fe5 🎃 Transform README into spooky Halloween theme
- Add ghost emojis and supernatural terminology throughout
- Rename sections with mystical themes (Installation → Summoning, etc.)
- Transform technical terms into magical concepts
- Update all LOG_LEVEL references to lowercase format
- Maintain technical accuracy while adding Halloween personality

👻 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-23 06:46:48 +02:00
Peter Steinberger
fd380f3c58 bump 2025-05-23 06:33:48 +02:00
Peter Steinberger
6f8a686897 log level casing should not matter 2025-05-23 06:33:42 +02:00
Peter Steinberger
a92be77ea3 tool, log and other little fixes 2025-05-23 06:29:35 +02:00
Peter Steinberger
28ec14ff3f 📝 Update installation to use @beta tag
Since we published as 1.0.0-alpha1 with beta tag, users should install using @beta instead of @latest
2025-05-23 06:08:13 +02:00
Peter Steinberger
30339b3573 🚀 Release v1.0.0-alpha1 as npm package @steipete/peekaboo-mcp
- Convert to scoped npm package for easier installation
- Simplify installation to use npx (no global install needed)
- Update README to prioritize npm over AppleScript
- Add banner image with absolute GitHub URL
- Configure package for public npm publishing
2025-05-23 06:01:55 +02:00
Peter Steinberger
eab4e5a394 Add build dir, prepare package 2025-05-23 05:57:06 +02:00
Peter Steinberger
a7970d8de7 Add tests 2025-05-23 05:40:31 +02:00
Peter Steinberger
2619f2a916 Add swift CLI 2025-05-23 05:40:27 +02:00
Peter Steinberger
b3327b7cbe Add TypeScript mcp server 2025-05-23 05:40:21 +02:00
Peter Steinberger
f746dc45c2 Add docs 2025-05-23 05:39:36 +02:00
Peter Steinberger
95a5208127 Add .gitignore and remove .DS_Store files
- Added .gitignore to exclude macOS .DS_Store files
- Removed tracked .DS_Store file from repository
- Updated README.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:53:46 +02:00
Peter Steinberger
881880d533 🧪 Add comprehensive window capture tests & fix fallback messages
Added automated tests to verify window capture functionality:
- Window bounds capture verification (checks -R flag usage)
- Window vs fullscreen size comparison
- Multi-window bounds capture testing
- Fallback message format verification
- Window capture with AI analysis

Also fixed fallback message to use Peekaboo prefix when falling back
to fullscreen capture due to inability to get window bounds.

Test additions:
- New "window" test mode for focused testing
- Added to quick and all test suites
- Comprehensive coverage of window capture edge cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:47:54 +02:00
Peter Steinberger
3515285897 🐛 Fix window capture to properly clip to app windows
Previously, window capture was falling back to fullscreen because it couldn't
get window IDs. Now using window bounds (position + size) with screencapture's
-R flag to properly capture only the app window content.

Changes:
- Use System Events to get window position and size
- Build screencapture -R command with x,y,width,height
- Added captureWindowByIndex for multi-window scenarios
- Proper error handling with fallback to fullscreen

This ensures AI analysis and screenshots only show the targeted app,
not the entire desktop.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:44:11 +02:00
Peter Steinberger
e1da1b7319 📝 Remove version number from README
Removing version references from README makes it more maintainable.
The version is tracked in the script itself and in git tags.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:38:13 +02:00
Peter Steinberger
e9f4a83fae 📝 Remove "NEW" label - this is v1.0, not an update
Since Peekaboo hasn't shipped yet, these aren't "new" features - they're
just the features of v1.0. Updated README to reflect this accurately.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:16:14 +02:00
Peter Steinberger
0b37ec090d 🚀 Peekaboo v1.0 - Smart Multi-Window AI & Enhanced CLI
Major improvements:
• 🪟 Smart Multi-Window AI: Automatically analyzes ALL windows when app has multiple
•  Timeout Protection: 90-second timeout prevents hanging on slow AI models
• 🎯 Clean CLI Design: Consistent flags (-o, -f, -w, -m, -a, -q, -v) with logical defaults
• 📝 All Messages Prefixed: "Peekaboo 👀:" for clear AI tool integration
• 🔄 Auto-Detection: Enables multi-window mode automatically for AI analysis
• 🎛️ Override Control: Use -w flag to force single window analysis

Technical changes:
- Changed version to 1.0.0 (initial release)
- Added formatMultiWindowAnalysis for consolidated AI results
- Improved error messages with proper context
- Enhanced test suite with multi-window AI tests
- Updated README with comprehensive documentation

This release provides a production-ready screenshot tool with intelligent
multi-window handling and robust AI integration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:15:25 +02:00
Peter Steinberger
03e220689d ☁️ Added Cloud AI Integration Guide - Claude Code, Windsurf & More
🚀 Major documentation enhancement for AI tool integration:

📖 New Cloud AI Integration Section:
• Complete setup guide for Claude Code, Windsurf, ChatGPT, and other AI tools
• Simple 3-step process: copy file, tell AI about it, let AI auto-discover features
• Self-documenting design means AI tools instantly understand all capabilities

💡 Practical Integration Examples:
• Example prompts for different AI assistants
• Python integration code for custom AI scripts
• Real-world workflow examples combining cloud + local AI

🎯 Key Benefits Highlighted:
• Zero configuration required - just copy and use
• Smart filenames perfect for AI workflows
• Comprehensive feature auto-discovery by AI tools
• Reliable unattended operation ideal for AI automation

🔗 Enhanced Feature Coverage:
• Added Cloud AI Integration to main feature list
• Updated features table with new capabilities
• Emphasized self-documenting nature for AI consumption

This makes Peekaboo incredibly easy to integrate with any AI development workflow\!

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 19:34:43 +02:00
Peter Steinberger
e9e1759f49 🤖 Enhanced AI Vision Analysis - Smart Image Compression & Ollama Setup
 Major AI functionality improvements and documentation enhancements:

📏 Smart Image Compression:
• Auto-detects large images (>5MB) and compresses to 2048px for optimal AI processing
• Uses macOS native sips tool for quality resizing while preserving aspect ratio
• Preserves original screenshots untouched while creating temporary compressed versions
• Significantly improves AI analysis speed and reliability

🛠️ Enhanced Ollama Integration:
• Fixed AppleScript file writing to handle large JSON payloads (replaces shell limitations)
• Improved base64 encoding with newline removal for clean API calls
• Added robust JSON response parsing with proper escape handling
• Enhanced error handling for model availability and API connectivity

🎯 Argument Parsing Improvements:
• Fixed flag parsing to properly handle --verbose --ask combinations
• Added fullscreen mode support for --ask without app targeting
• Improved app identifier resolution with fullscreen handling
• Enhanced validation and error reporting

📖 Comprehensive README Enhancements:
• Highlighted smart image resizing feature with technical details
• Added complete step-by-step Ollama setup guide with multiple installation options
• Enhanced model comparison table with sizes, strengths, and use cases
• Added pro usage examples showcasing automatic compression benefits
• Improved formatting with clear sections and visual highlights

🧪 AI Testing Validation:
• All AI tests now passing with reliable Ollama API integration
• Verified one-step and two-step AI analysis workflows
• Confirmed smart compression works seamlessly with various image sizes

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 19:32:47 +02:00
Peter Steinberger
e3bc43b0d6 📖 Updated README: Comprehensive AI Testing Documentation
Enhanced testing section to showcase the robust AI test suite:

New Testing Documentation:
• Highlighted 8 comprehensive AI vision analysis tests
• Added specific test mode examples (ai, advanced, basic, quick)
• Detailed AI test coverage breakdown
• Clear command examples for different testing scenarios

AI Test Coverage Highlights:
• One-step: Screenshot + AI analysis workflow
• Two-step: Analyze existing images separately
• Custom model specification and auto-detection
• Error handling: Invalid models, missing files, malformed commands
• Graceful degradation when Ollama/models unavailable

Testing Commands:
./test_peekaboo.sh ai           # AI tests only
./test_peekaboo.sh advanced     # Multi-window, discovery, AI
./test_peekaboo.sh all          # Comprehensive suite

Perfect for developers wanting to validate AI functionality\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 19:20:44 +02:00
Peter Steinberger
6c3e96f51f 🧪 Added Comprehensive AI Vision Analysis Tests
Enhanced test suite with full AI testing capabilities:

Test Coverage:
• One-step workflow: Screenshot + AI analysis in single command
• Two-step workflow: Analyze existing images separately
• Custom model testing with available vision models
• Error handling: Invalid models, missing files, malformed commands
• Smart model auto-detection validation
• Complex questions with special characters

Features:
• Auto-detects available Ollama installation and vision models
• Gracefully skips AI tests if Ollama/models not available
• Provides setup instructions when missing dependencies
• New dedicated 'ai' test mode for focused AI testing
• Integrated into advanced and comprehensive test suites

Examples:
./test_peekaboo.sh ai           # AI tests only
./test_peekaboo.sh advanced     # Includes AI tests
./test_peekaboo.sh all          # Full suite with AI

Perfect for validating AI vision analysis functionality\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 19:06:14 +02:00
Peter Steinberger
a5132f53c1 🤖 Added AI Vision Analysis with Smart Model Selection
Major new feature: Local AI vision analysis with Ollama integration

Features:
• One-step: Screenshot + AI analysis in single command
• Two-step: Analyze existing images separately
• Smart model auto-detection with priority ranking
• Simplified ollama run commands (no complex API calls)
• Comprehensive error handling and setup instructions

Priority models: qwen2.5vl:7b > llava:7b > llava-phi3:3.8b > minicpm-v:8b

Examples:
osascript peekaboo.scpt "Safari" --ask "What's on this page?"
osascript peekaboo.scpt analyze "/tmp/shot.png" "Any errors?"

Perfect for automated testing, QA, and visual verification\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 19:02:14 +02:00
Peter Steinberger
939c60aaaf 📖 Updated README: Showcased smart filenames & speed optimizations
Enhanced documentation to highlight new features:

• Added dedicated Smart Filenames section with examples
• Updated feature list with model-friendly naming & speed
• Enhanced examples throughout showing actual output filenames
• Updated "Why Peekaboo Rocks" with performance improvements
• Added specific timing details (0.3s, 0.2s, 0.1s delays)
• Emphasized automation and AI model compatibility

Now clearly communicates the value of recent optimizations\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 18:52:48 +02:00
Peter Steinberger
327df522e1 Smart Filenames + Speed: Model-friendly names & 70% faster capture
Performance & UX improvements:

• Smart filename generation with app names
  - /tmp/peekaboo_safari_20250522_143052.png (includes app)
  - Model-friendly: lowercase, underscores, no spaces
  - Multi-window: safari_window_1_github.png

• Significantly reduced delays for speed
  - Capture delay: 1.0s → 0.3s (70% faster)
  - Window activation: 0.5s → 0.2s (60% faster)
  - Multi-window focus: 0.3s → 0.1s (67% faster)

• Updated documentation with new filename examples
• App names limited to 20 chars for readability

Perfect for automation and model usage\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 18:51:32 +02:00