Keep Cursor, Windsurf, and other AI coding assistants working without disruption.
"I'll be back... to manage your Terminal sessions."
Terminator is an advanced AppleScript-powered Terminal session manager designed to hunt down inefficient workflows and terminate them with extreme prejudice. This cybernetic organism solves a critical problem in AI coding assistants: the dreaded hanging command loop break.
When AI coding assistants like Cursor execute commands that hang or run indefinitely, they break their execution loop and become unresponsive. This forces developers to:
- Manually intervene and kill processes
- Restart the AI assistant
- Lose context and momentum
- Experience frustrating workflow interruptions
The result? Productivity crashes harder than Skynet's network.
Terminator implements process isolation by running commands in separate Terminal sessions. This means:
- ✅ Loop Continuity: AI assistant stays responsive even with hanging commands
- ✅ Faster Execution: Commands run asynchronously in dedicated processes
- ✅ Better Control: Intelligent process termination when needed
- ✅ Context Preservation: Session state persists across operations
Just like the T-800's mission to protect, Terminator's primary objective is to protect your development loop by:
- Creating and managing persistent Terminal sessions
- Isolating command execution from AI assistant processes
- Grouping related tasks by project
- Intelligently interrupting busy processes when needed
- Providing reliable session state management
To maximize loop performance, train your AI coding assistant (Cursor, Claude Code, etc.) to use Terminator instead of direct shell execution:
❌ Instead of this (loop-breaking):
✅ Use this (loop-preserving):
- Project Path (optional): Absolute path for project grouping
- Task Tag (required): Unique identifier for the terminal session
- Command (optional): Shell command to execute
- Lines (optional): Number of output lines to return (default: 30)
Establish a new project perimeter and execute reconnaissance:
Execute follow-up commands in the same tactical session:
Open new operational theaters within the same project:
Retrieve status reports from active sessions:
Establish a session without immediate deployment:
- Automatically groups related tasks in the same project window
- Uses intelligent pattern matching for session organization
- Configurable via enableFuzzyTagGrouping property
- Automatically interrupts busy processes when reusing sessions
- Uses progressive termination: INT signal → KILL signal → Control-C
- Tracks process states and provides detailed status reports
- Real-time monitoring of terminal session states
- TTY tracking for precise process management
- Comprehensive error reporting and status updates
- Handles edge cases and terminal state conflicts
- Provides fallback mechanisms for session recovery
- Timeout protection for long-running commands
Key properties that can be modified in the script:
Ensure these applications have Automation permissions:
- Terminal.app - Primary target application
- System Events.app - System control interface
Access via: System Preferences → Security & Privacy → Privacy → Automation
"Terminal session not found"
- Provide a command or empty command with lines to create the session
- Ensure project path is absolute when establishing new contexts
"Process may still be running"
- Terminator attempted to interrupt but the process resisted termination
- Check terminal manually or wait for natural process completion
"Permission denied"
- Verify Automation permissions for Terminal.app and System Events.app
- Restart Terminal.app after granting permissions
All AppleScript files are automatically validated on every push using GitHub Actions:
- Syntax Check: osacompile -c validation on macOS runners
- Compilation Test: Full compilation to .scptd bundles
- Quality Check: Common AppleScript best practices validation
Note: CI cannot run actual script execution due to macOS automation permission requirements. Full testing must be done locally.
Supercharge your development loop with these Model Context Protocol servers:
- macOS Automator MCP - Execute AppleScript and shell commands directly from Claude Code
- Claude Code MCP - Enhanced Claude Code integration with file system operations
These MCPs work seamlessly with Terminator to maximize your development loop efficiency and keep your AI assistant running smoothly.
"Come with me if you want to live... productively with organized Terminal sessions."
Terminator will be your faithful cybernetic companion, tirelessly managing your Terminal workflows until the very last command is executed. No process left behind, no session unmanaged.
Terminator is future-proof and designed to adapt to your evolving development workflows. Resistance is futile.