All notable changes to MenuCLI will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
π― Alternative Menu Names - Handle menu items that change based on state
- Use pipe
|syntax for alternatives:"Show Sidebar|Hide Sidebar" - Automatically tries each alternative until one works
- Smart detection of toggle patterns
- Use pipe
-
π Fallback Chains - Try multiple complete paths
- Use double pipe
||for fallback paths - Example:
"File > Save As..." || "File > Export..." - Useful for cross-version compatibility
- Use double pipe
-
π State Detection - Check menu item states
- New
statecommand to check enabled/disabled/checked status - Returns detailed state information including keyboard shortcuts
- AppleScript-based state checking for reliability
- New
-
π§ Smart Toggles - Intelligent handling of toggle menu items
- New
togglecommand automatically handles Show/Hide variations - Supports 10+ toggle patterns: Show/Hide, Enable/Disable, Start/Stop, Mute/Unmute, Play/Pause, Connect/Disconnect, Lock/Unlock, Maximize/Minimize, Expand/Collapse
- Automatically detects current state and applies opposite action
- New
-
π― Click with Alternatives - New
click-altcommand- Combines alternatives and fallbacks in one command
--wait-enabledflag to wait for menu availability--timeoutoption for custom wait duration- Verbose mode shows which alternative succeeded
- MenuHelper now exposes public methods for state checking
- AppleScriptBridge enhanced with state detection methods
- Improved error messages to show which alternatives were tried
- getMenuBar made public for StateAwareMenuHelper access
- Added
MenuItemAlternatives.swiftfor alternative resolution logic - Added
StateAwareMenuHelper.swiftfor state-aware operations - Added PatternMatcher class for wildcard/regex support (foundation for future features)
- All performance optimizations from v2.1.0 maintained
-
π Script Caching - 30-50% faster for repeated operations
- Compiled AppleScripts cached and reused
- Thread-safe implementation with concurrent queue
--no-cacheflag for debugging- Cache automatically invalidates on errors
-
π¦ Batch Operations - 60-80% faster for multiple commands
- New
batchcommand for multiple menu operations - Single AppleScript execution for all operations
- Example:
menu batch App "Edit > Copy;Edit > Paste" - Individual success/failure reporting
- New
-
β±οΈ Performance Tuning
- Configurable delays with
--delayoption (milliseconds) - Reduced default delays from 200-300ms to 50ms
- Optimized string building with pre-allocated buffers
- Escape key delay reduced to 20ms
- Configurable delays with
-
π Async Support
- Async execution methods for GUI integration
- Non-blocking operations with completion handlers
- DispatchQueue-based implementation
- Default menu open delay reduced to 50ms
- Improved script generation with StringBuilder pattern
- ExecutionStrategy show delay reduced to 20ms
- Version bumped to 2.1.0
- Single operations: 43-50% faster
- Repeated operations: 70% faster (with cache)
- Multiple operations: 60-80% faster (batch mode)
- Memory usage optimized with string buffer pre-allocation
-
π Initial release of MenuCLI
-
β¨ Core Features:
listcommand to enumerate menu items for any running applicationclickcommand to programmatically trigger menu itemscheckcommand to verify menu item existence for conditional scriptingdiagnosecommand for troubleshooting menu execution methods
-
π Non-Visual Execution:
--no-visualflag for silent menu automation without visual display- AppleScript bridge for guaranteed non-visual execution
- Perfect for background automation and CI/CD pipelines
-
π€ Smart Typography Handling:
- Automatic conversion of
...toβ¦(ellipsis) - Smart quotes normalization (
'β') - Em/en dash handling (
ββ-)
- Automatic conversion of
-
β‘ Multiple Execution Methods:
pick- Direct AXUIElement actionkeyboard- Keyboard shortcut simulationselector- Objective-C selector invocationshow-and-pick- Visual menu opening then selectionclick- Traditional click action--try-allflag to attempt all methods until success
-
ποΈ Modern Application Support:
- Native AppKit applications
- SwiftUI applications
- Electron applications (VS Code, Discord, etc.)
- Java applications (IntelliJ IDEA, etc.)
- Web-based applications
-
π οΈ Developer Experience:
- Comprehensive
--verboseoutput for debugging --quietmode for script-friendly output--metricsflag for performance monitoring- Detailed error messages and troubleshooting guidance
- Comprehensive
-
π Security & Permissions:
- Accessibility API integration
- Proper permission checking and user guidance
- Secure execution model
- Swift 5.9+ with modern async/await patterns
- AXUIElement API for direct UI access
- AppleScript System Events bridge
- CGEvent keyboard simulation
- NSWorkspace application discovery
- Swift Argument Parser for robust CLI interface
- Comprehensive README with examples and use cases
- Built-in help system (
--helpfor all commands) - Troubleshooting guide for common issues
- Professional API documentation
- macOS 10.15 (Catalina) and later
- Intel and Apple Silicon Macs
- Universal binary support
- πΊ Homebrew formula for easy installation
- π± Menu bar application companion
- π Menu item state monitoring and change detection
- π Menu structure export to JSON/XML formats
- π― Menu item fuzzy matching and search
- π Plugin system for custom execution methods
- π Usage analytics and performance optimization
- π Remote menu control over network
- π¨ Customizable output formatting
- π Enhanced security with code signing
- Fuzzy menu item matching
- Menu structure caching for performance
- Homebrew formula
- Enhanced error messages
- JSON output format
- Menu item state monitoring
- Performance improvements
- Plugin architecture
- Menu bar companion app
- Remote control capabilities
- Breaking changes for improved API design
See CONTRIBUTING.md for guidelines on how to contribute to this changelog and the project.
Each release follows this format:
- Added for new features
- Changed for changes in existing functionality
- Deprecated for soon-to-be removed features
- Removed for now removed features
- Fixed for any bug fixes
- Security for vulnerability fixes