A High-Performance System for Voice-Driven Computing.
Turn Natural Speech Into Instant, Deterministic Desktop Action.
🌐 Live Web Simulator: Experience Hands Free live in your browser at https://handsfree.vercel.app
Live Demo · About · Foundational Principles · Quick Start · Core Features · Visual Identity · Architecture · Project Structure · Supported Commands · Documentation · Contributing · License
Most voice assistants suffer from conversational drag—they ask clarifying questions, introduce artificial latency, hallucinate non-deterministic actions, or require round-tripping through cloud AI models just to switch a window or click a button. Meanwhile, legacy accessibility software often relies on clunky numbered grids or sluggish speech engines that fail to keep pace with modern developer workflows.
Hands Free (Pilot) is an open-source, dual-layer system designed for effortless, high-speed, voice-driven computing:
- A Native macOS Menu-Bar Daemon written in Swift 5.9 that intercepts speech dictation from Wispr Flow via low-level
CGEventtaps, resolves commands deterministically in under 2 ms usingPilotBrain, and synthesizes native keystrokes, clicks, window focus, and screen navigation through Apple Accessibility APIs. - An Interactive Web Desktop Simulator built with React 19, TypeScript 5.9, Tailwind CSS v4, Vite, and Framer Motion that runs the exact same matching engine in-browser, offering a sandboxed virtual macOS desktop environment to test voice commands and shortcuts before running them natively.
- Zero-Latency Execution (<2 ms Matching): Voice command parsing uses a deterministic rule matcher (
PilotBrain) rather than conversational LLM inference for routine desktop operations. Commands are evaluated in 1.4 to 1.9 ms. - Clean Clipboard Isolation: Wispr Flow dictates text by simulating a paste operation. Pilot intercepts the paste directly from Wispr's process bundle via session taps, swallows the clipboard payload before any frontmost application receives it, and keeps the user's system pasteboard uncontaminated.
- Dual Architecture with 100% Logic Parity: The command matching rules, token normalization, context routing, and app aliasing are authored identically in Swift (
Brain.swift) and TypeScript (brain.ts), verified by reciprocal unit test suites (BrainCheckand Vitest). - Privacy-First Local Execution: Pilot runs entirely on-device. Audio buffers for the "Pilot" wake word are processed locally via Apple's Speech framework, and command execution never leaves your Mac.
- Human-Centric Feedback: Status is communicated through a floating HUD toast, a subtle menu-bar indicator, and a single warm amber waveform that illuminates strictly while Pilot is acting.
| Component | Native macOS App | Web Desktop Simulator |
|---|---|---|
| Operating System | macOS 14.0+ (Sonoma or Sequoia) | Any modern OS (macOS, Linux, Windows) |
| Runtime / Compiler | Swift 5.9+ / Xcode Command Line Tools | Node.js v20.x or higher |
| Dependencies | Wispr Flow (recommended for voice dictation) | npm (v10+) or pnpm |
| Permissions | Accessibility & Input Monitoring | None (Browser sandboxed) |
# 1. Clone the repository
git clone https://github.com/TheVicky1/Hands-Free.git
cd Hands-Free
# 2. Build, run BrainCheck, sign, and install Pilot.app to ~/Applications
cd app
./build.sh
# 3. Launch Pilot from Applications
open ~/Applications/Pilot.app- Accessibility: Open System Settings → Privacy & Security → Accessibility and toggle Pilot ON.
- Input Monitoring: In Privacy & Security → Input Monitoring, ensure Pilot is authorized to observe global shortcut taps.
- Wispr Flow Dictionary: In Wispr Flow Settings → Dictionary, add the term
Pilotso voice triggers are never transcribed as "Pilate" or "pilot's".
# 1. Navigate to the web workspace
cd web
# 2. Install reproducible dependencies
npm install
# 3. Start local Vite development server
npm run dev
# 4. Open in browser
# Navigate to http://localhost:5173# Run Swift native BrainCheck test suite (27+ assertion benchmarks)
cd app && swift run BrainCheck
# Run Web unit test matrix (Vitest: brain matcher, simulator reducer, said parser)
cd web && npm test
# Run Playwright End-to-End browser test suite
cd web && npx playwright test
# Run ESLint quality audit
cd web && npm run lint
# Run TypeScript strict type verification
cd web && npm run typecheck
# Run production Vite compilation build
cd web && npm run buildHands.swift: Synthesizes hardware-level keyboard events, unicode character streams, smooth cursor trajectories, left/right clicks, and targeted scroll events using QuartzCGEvent. Focuses applications and waits for frontmost confirmation before typing.Screen.swift: Queries macOS Display Services andAXUIElementaccessibility hierarchies to locate window bounds, controls, file dialogs, and button coordinates.Taps.swift: Hooks into macOS event taps at the session level to catch Wispr Flow pastes (com.electron.wispr-flow), inspect clipboard contents, match voice commands, and drop unwanted text cleanly.WakeWord.swift: Continuously listens for the "Pilot" wake word using Apple's on-deviceSFSpeechRecognizer. Employs smart partial-transcript guards to prevent false wakes on phrases like "Hands Free".UI.swift: Houses the custom menu-bar status icon (airplane), dark/light appearance coordinator, floating HUD status toast with animation physics, and the "What can I say?" command cheat sheet window.main.swift: Coordinates application lifecycle, registers the globalControl+Option+Pshortcut for direct keyboard input, and maintains the daily usage count.
- Sub-2ms Evaluation: Eliminates neural inference overhead for deterministic desktop commands.
- App-Scoped Execution: Commands containing prepositions ("search docker in Chrome", "find main in VS Code") automatically route to the target application without polluting the global search scope.
- Multi-Action Chaining: Splits continuous speech into sequential atomic steps using conjunctions (
"and",",",", then"). - Macro Expansion: Translates conversational voice requests into multi-step UI operations (e.g. "upload the screenshot" navigates file dialogs via
Cmd+Shift+G, pastes the latest screenshot path, downsamples if over 5 MB, and submits).
- Virtual macOS Environment: A full in-browser replica of macOS with draggable windows, Dock bounce animations, active MenuBar with live clock, and realistic traffic light window controls.
- Interactive CommandBar: Type or dictate commands with live autocomplete, keyboard navigation, and immediate visual feedback.
- Simulated Apps & Pages: Includes functional stand-ins for Chrome, VS Code, Notes, Finder, Terminal, and System Settings.
- Fluid Motion System: Powered by Framer Motion with custom spring physics that honor user
prefers-reduced-motionsettings.
Following web/DESIGN.md, Hands Free embodies a calm, precise, and cinematic aesthetic:
- Palette: Deep near-black ink (
#08090B) paired with warm paper-white (#F2EDE4). - The Signal: A singular cockpit caution amber (
#FFB02Ein dark mode,#A85700in light mode). The amber signal is reserved strictly for moments when Pilot is actively hearing or executing a command. - Typography:
- Fraunces: Variable display serif with high-contrast optical sizing for hero headlines.
- Instrument Sans: Clean, modern humanist sans-serif for UI elements and explanatory prose.
- JetBrains Mono: Monospace font for commands, parameters, code, and system metrics.
- Texture: Subtle 4.5% film grain overlay on the landing page creates depth without distracting from the crisp mock desktop.
sequenceDiagram
autonumber
actor User as Voice User
participant Mic as Microphone / Speech API
participant Wispr as Wispr Flow Daemon
participant Tap as CGEvent Session Tap (Pilot)
participant Brain as PilotBrain Pattern Engine
participant Hands as Quartz CGEvent Synthesizer
participant Target as Frontmost App (Chrome / VS Code)
User->>Mic: "Pilot, open Chrome and search for docker networking"
Mic->>Wispr: Raw Audio Stream
Wispr->>Wispr: Fast On-Device ASR Transcribe
Wispr->>Tap: Paste CGEvent (Cmd+V) into frontmost window
Tap->>Tap: Intercept paste from Wispr bundle ID
Tap->>Tap: Inspect NSPasteboard text & swallow event
Tap->>Brain: Parse "open Chrome and search for docker networking"
Brain->>Brain: Match Chain: [1: Open Chrome, 2: Search docker networking]
Brain->>Hands: Dispatch Action 1: Focus App ("Google Chrome")
Hands->>Target: Activate Window & wait for focus (158 ms)
Brain->>Hands: Dispatch Action 2: Cmd+T -> Type URL -> Return
Hands->>Target: Send CGEvents (keystrokes)
Hands-->>User: HUD Toast: "✓ Google Chrome · Search docker networking"
Hands-Free/
├── .gitignore # Git exclusion rules for macOS, Node, Swift
├── .vercelignore # Vercel deployment exclusions
├── app/ # Native macOS Swift Application
│ ├── Package.swift # SPM Manifest (Pilot, PilotBrain, BrainCheck)
│ ├── build.sh # Automated compilation, signing & install script
│ ├── Resources/ # Native assets
│ │ ├── AppIcon.icns # macOS Application icon bundle
│ │ ├── MenuIcon.png # Standard menu-bar airplane icon
│ │ └── MenuIcon@2x.png # Retina menu-bar airplane icon
│ └── Sources/
│ ├── BrainCheck/main.swift # Verification harness with 27+ test cases
│ ├── Pilot/ # Main application daemon
│ │ ├── Hands.swift # CGEvent input synthesis (keys, clicks, scroll)
│ │ ├── Screen.swift # AXUIElement hierarchy & coordinate mapping
│ │ ├── Taps.swift # Session event taps for Wispr interception
│ │ ├── UI.swift # Menu bar item, HUD toast & cheat sheet UI
│ │ ├── WakeWord.swift # SFSpeechRecognizer on-device audio listener
│ │ └── main.swift # NSApplication delegate & shortcut coordinator
│ └── PilotBrain/
│ └── Brain.swift # Core voice pattern matcher & command resolver
├── commands/
│ └── commands.json # Canonical dictionary of 84+ voice commands
├── docs/ # Project technical documentation
│ ├── demo.md # Timed 2-minute live demo presentation script
│ ├── plan-review.md # Architectural evaluation & technical decisions
│ ├── progress.md # Reverse-chronological engineering build log
│ └── setup.md # Detailed permissions & Wispr setup guide
├── scripts/
│ └── export-stats.mjs # Usage metrics extraction script
└── web/ # React 19 + TypeScript + Vite Web Simulation
├── package.json # Web manifest and script definitions
├── vite.config.ts # Vite bundling configuration
├── tsconfig.json # Strict TypeScript compiler options
├── eslint.config.js # ESLint code hygiene rules
├── index.html # HTML entrypoint with pre-paint theme script
├── DESIGN.md # Authoritative design system specifications
├── e2e/
│ └── autoplay.spec.ts # Playwright automated browser test suite
├── public/ # Static web assets and mock statistics
│ ├── favicon.svg # Hand monogram logo with signal waveform
│ ├── og.png # OpenGraph social preview card
│ ├── robots.txt # Search crawler directives
│ ├── stats.json # Real production usage metrics
│ └── wispr-usage.png # Wispr Flow Insights verification proof
└── src/
├── main.tsx # React application bootstrap
├── index.css # Tailwind CSS v4 design tokens (@theme)
├── theme.ts # System / Light / Dark theme store
├── motion.ts # Framer Motion animation tokens
├── stats.ts # Real-time usage statistics parser
├── brain/ # TypeScript port of PilotBrain
│ ├── brain.ts # Rule matcher with 100% Swift parity
│ ├── brain.test.ts # Vitest unit test suite for matcher
│ └── site.ts # Website shortcut resolution
├── desktop/ # Virtual macOS Desktop components
│ ├── PilotDesktop.tsx # Integrated virtual workspace container
│ ├── sim.ts # Desktop state reducer and dispatchers
│ ├── sim.test.ts # Vitest test suite for desktop actions
│ ├── CommandBar.tsx # Interactive command bar with autocomplete
│ ├── Dock.tsx # macOS Dock with animated icon bouncing
│ ├── MenuBar.tsx # macOS MenuBar with real-time clock
│ ├── Window.tsx # Draggable macOS window frames
│ ├── Hud.tsx # Floating desktop HUD notifications
│ └── apps.tsx # Simulated application component registry
└── landing/ # Product landing page components
├── Landing.tsx # Hero section, feature grids, and showcase
├── Story.tsx # Narrative walkthrough of voice computing
├── Media.tsx # Wispr Flow usage card showcase component
└── Usage.tsx # Wispr Flow statistics and metrics card
| Layer | Technologies | Role & Implementation |
|---|---|---|
| Native macOS App | Swift 5.9, AppKit, Quartz | Daemon lifecycle, CGEvent keystroke/click synthesis, menu bar |
| Accessibility Engine | Apple Accessibility API (AXUIElement) |
Screen coordinate targeting, window bounds, UI element inspection |
| Speech Processing | Wispr Flow + Apple Speech.framework |
Fast speech-to-text dictation + local "Pilot" wake word recognition |
| Pattern Matcher | Swift & TypeScript (Dual Parity) | Sub-2ms deterministic rule resolution, chain splitting, synonym normalization |
| Web Frontend | React 19.2, TypeScript 5.9, Vite 6 | Component architecture, virtual desktop simulation, interactive try demo |
| Styling & Design | Tailwind CSS v4, Framer Motion | Tokenized obsidian/paper color system, fluid spring physics, reduced-motion |
| Testing & Quality | Swift BrainCheck, Vitest, Playwright | Native benchmarking, matcher unit tests, browser E2E integration tests |
| Deployment | Vercel Serverless Hosting | High-speed global edge distribution for web simulation and documentation |
Hands Free ships with 84+ out-of-the-box voice commands across 17+ supported applications, documented in commands/commands.json:
| Category | Example Voice Phrase | Triggered Action |
|---|---|---|
| Application Switching | "Pilot, open Chrome" |
Focuses or launches Google Chrome, confirms frontmost window |
| Web Navigation | "Pilot, open github dot com" |
Opens a new Chrome tab and navigates directly to URL |
| Search Queries | "Pilot, search docker networking on youtube" |
Resolves YouTube shortcut and runs query in a fresh tab |
| Tab Management | "Pilot, switch to tab three" |
Synthesizes Cmd+3 in active browser window |
| Window Layout | "Pilot, zoom window" |
Toggles window zoom state via macOS accessibility actions |
| Developer Tools | "Pilot, new terminal tab" |
Dispatches Cmd+T in active terminal / VS Code session |
| AI Assistants | "Pilot, ask Claude how do I invert a binary tree" |
Focuses Claude.app and types prompt directly into input |
| Media & Volume | "Pilot, volume up" / "Pilot, pause music" |
Dispatches macOS hardware media keys without bringing app to front |
| File Management | "Pilot, upload the screenshot" |
Opens picker, navigates via Cmd+Shift+G, selects latest screenshot |
| Compound Chains | "Pilot, open Chrome, new tab, and search for tailwind" |
Executes three atomic actions sequentially with 140ms intervals |
| Document | Focus & Content |
|---|---|
| 📖 Setup & Permissions | Step-by-step macOS Accessibility permissions, Wispr dictionary, and initial testing |
| 🎬 Demo Presentation Script | Timed 2-minute live demo script utilizing verified BrainCheck commands |
| 📝 Build Progress Log | Complete reverse-chronological development log documenting engineering milestones |
| 📐 Plan & Architecture Review | Technical investigation into Wispr event taps, SPM manifest selection, and tradeoffs |
| 🎨 Design System Specs | Obsidian/paper color tokens, Fraunces typography rules, and spring animation parameters |
| 📋 Command Inventory | Complete JSON schema of all 84+ voice commands, aliases, macros, and fillers |
| 📊 Metrics Exporter | Automated extraction script for generating live usage statistics |
We welcome contributions from developers, accessibility researchers, and voice computing enthusiasts!
- Fork the Repository: Create a personal fork on GitHub.
- Clone Locally:
git clone https://github.com/<your-username>/Hands-Free.git cd Hands-Free
- Create a Feature Branch:
git checkout -b feat/new-voice-command
- Implement & Test:
- For native commands: Add definitions to
commands/commands.jsonand verify withswift run BrainCheck. - For web simulator: Verify changes pass
npm testandnpx playwright test.
- For native commands: Add definitions to
- Commit with Conventional Messages:
git commit -m "feat(commands): add voice shortcut for Discord mute" - Submit a Pull Request: Push your branch and open a PR against
main.
Copyright © 2026 Vicky Patel. All rights reserved.
This software, including all source code, algorithms, assets, and documentation, is proprietary. Unauthorized copying, reproduction, distribution, sublicensing, modification, reverse engineering, or commercial exploitation in any form is strictly prohibited under applicable copyright laws. For full terms, see the LICENSE file.
Speak. Execute. Repeat.