# Action Bar

A Quicksilver/Alfred-style floating command bar for quickly executing Forge commands.

## Features

- **Global Hotkey**: Press `Cmd+Shift+K` from anywhere to open the action bar
- **Fuzzy Search**: Type to filter commands with intelligent matching
- **Recent Commands**: Previously used commands appear first for quick re-execution
- **All Forge Commands**: Deploy sites, reboot services, edit configs, view logs, and more

## Usage

1. Press `Cmd+Shift+K` to open the action bar
2. Start typing to filter commands (e.g., "deploy prod" to find deploy commands for production)
3. Use `↑`/`↓` arrows to navigate results
4. Press `Enter` to execute the selected command
5. Press `Escape` to close

## Available Commands

### Site Commands
- Deploy Site
- Edit .env
- Edit Nginx Config
- Edit Deployment Script
- View Deployment Log
- View Site Log
- Visit Site (open in browser)
- Open in Forge
- Open Terminal for Site
- Reboot PHP (site-specific version)

### Server Commands
- Reboot Server
- Reboot PHP
- Reboot MySQL
- Reboot Nginx
- Reboot Postgres
- Open Terminal
- Copy IP Address
- Upload SSH Key
- Test Nginx Config
- View Nginx Access Logs
- View Nginx Error Logs
- View Database Logs
- View PHP Error Logs
- Open Server in Forge

### Global Commands
- Refresh Servers
- Open Preferences

## Smart Suggestions

The action bar remembers your recently executed commands:
- Commands used in the last 30 minutes get highest priority
- Commands used in the last 2 hours get medium priority
- When the search field is empty, recent commands appear at the top

## Architecture

```
ActionBar/
├── ActionBarItem.swift           # Command model
├── ActionBarWindowController.swift   # Window management and UI
├── ActionBarDataSource.swift     # Collects commands from servers/sites
├── FuzzySearch.swift             # Fuzzy string matching algorithm
├── RecentCommandsManager.swift   # Tracks recently used commands
└── GlobalHotkeyManager.swift     # System-wide hotkey registration
```
