A Raycast extension that automates your complete development workflow setup with proper focus management and application control.
- Automatically scans your configured development folder
- Displays projects with smart icons:
- 🔧 Projects with
bun.lock(Bun projects) - 📄 Projects with
package.json(npm/Node projects) - 📁 Regular folders
- 🔧 Projects with
- Shows project metadata and status
When you select a project, the extension will:
- Open project in Cursor editor
- Open integrated terminal (Ctrl+Shift+~)
- Execute
bun run devin the terminal - Position Cursor window to left side (Ctrl+Option+←)
- Open Chrome to localhost with your configured port
- Position Chrome to right side (Ctrl+Option+→)
- Start focus session (Ctrl+Option+Shift+F)
Set these in Raycast preferences for the extension:
- Development Folder Path: Path to your projects folder (default:
/Users/matheus/Desktop/dev) - Default Port: Development server port (default:
3010)
The Problem: Raycast's runAppleScript utility doesn't properly transfer focus to other applications, causing commands to execute in Raycast's context instead of the target application.
The Solution: Claude-Recommended Focus Management
Based on Claude's analysis, we now use advanced focus management techniques:
open --activateFlag: Uses macOS built-in focus transfer mechanism- Process-Specific Keystrokes: Sends keystrokes directly to application processes
- Frontmost Application Management: Ensures target app is definitively frontmost
- Proper Timing: Increased delays for application startup and focus transfer
--activateFlag: macOS native focus transfer mechanism- Process-Specific Commands: Keystrokes sent to specific application processes
- Frontmost Management:
set frontmost to trueensures proper focus - Increased Timing: Gives applications time to fully launch and receive focus
- Install the extension: Run
bun run devin the extension directory - Configure preferences: Set your dev folder path and default port in Raycast
- Search for "Start Coding Now" in Raycast
- Select your project from the list
- Click "Start Development Workflow"
- Watch the automation - works identically to your standalone script!
- Enjoy your automated setup! 🚀
Note: Uses Claude's recommended focus management techniques for reliable application control.
- Project Selection: Browse your configured dev folder
- Confirmation: Confirm before starting the workflow
- Progress Feedback: Toast notifications for each step
- Complete Setup: All applications positioned and ready
Problem: Commands executing in Raycast instead of target applications
Solution: The extension now uses:
- Single Comprehensive AppleScript: Entire workflow in one script
- External AppleScript execution via
osascript - Direct application activation without Raycast interference
- Return focus to Raycast after completion
- Verify your Development Folder Path in preferences
- Ensure the folder exists and contains project directories
- Check that you have read permissions
- This issue has been resolved with the enhanced focus management
- If problems persist, ensure Cursor is properly installed
- Check your Default Port preference
- Ensure your development server uses the configured port
- Verify Chrome can access localhost:[port]
- The extension needs accessibility permissions for keyboard simulation
- Grant Raycast accessibility access in System Settings
const getProjects = (folderPath: string): Project[]Scans the configured folder and detects project types based on:
package.jsonpresencebun.lockpresence
const executeAppleScript = (script: string): void- Writes AppleScript to temporary files
- Executes using
osascriptwith system privileges - Handles cleanup automatically
const switchToApplication = (appName: string): void- Hides Raycast completely
- Activates target application
- Sets application as frontmost
- Ensures proper focus transfer
@raycast/api: Core Raycast functionalityfs: File system operationschild_process: System command executionpath: Path manipulationos: Temporary file management
bun install
bun run buildbun run devbun run lintMIT License - see package.json for details.