The intersection of AI coding assistants and hardware input just got a weird, wonderful twist with the release of Earshot, a macOS-only plugin for Claude Code. Developed by epavanello and shared on Hacker News, Earshot transforms Apple AirPods into a remote control for AI interaction, allowing developers to initiate dictation with a stem click and submit prompts with a simple head nod. This isn't just a novelty; it addresses a specific friction point in voice-first coding workflows by leveraging existing macOS accessibility APIs to bypass standard audio routing limitations.

Hands-Free Voice Output and Input

The core functionality revolves around two distinct features: spoken replies and gesture-based input. For audio output, Earshot employs a 'voice skill' that instructs Claude to append a short, italicized spoken line to every response, hidden behind an invisible marker. A Stop hook then reads this text aloud using the native macOS say command. Users can toggle this feature via voice command ('voice mode' or 'normal mode') or by configuring environment variables like EARSHOT_VOICE and EARSHOT_VOICE_RATE in their settings.json. The documentation explicitly recommends using Siri voices via System Settings for a more natural experience compared to classic system voices.

The Nod-to-Send Mechanism

The input mechanism is where the technical ingenuity shines. Standard AirPods clicks are often hijacked by macOS for call mute functions, preventing them from reaching active applications. Earshot circumvents this by using CMHeadphoneMotionManager to detect a specific gesture: a chin-down nod of approximately 15 degrees. This gesture releases the dictation mode and sends the prompt to Claude Code. To achieve this, the plugin requires AirPods with head tracking (Pro, Max, or 3rd gen+) and relies on Hammerspoon to manage key presses, ensuring accessibility permissions remain stable even after binary rebuilds.

Installation and Dependencies

Installing Earshot is straightforward via the Claude Code plugin marketplace, but the AirPods remote functionality demands a heavier lift. Users must install the earshot@earshot plugin, then run a separate installation script that builds a background app requiring Xcode command-line tools and Hammerspoon with specific accessibility permissions. The setup also requires enabling require("hs.ipc") in the Hammerspoon configuration. Once installed, the background app starts at login, prompting for Motion permissions on first run. Uninstallation is handled by a dedicated script, and logs are stored in /tmp/earshot-remote.log for debugging.

Key Takeaways

  • Earshot enables hands-free interaction with Claude Code using AirPods head tracking for input and macOS say for output.
  • The solution bypasses macOS audio routing issues by using CMHeadphoneMotionManager to detect chin nods for sending prompts.
  • Requires specific hardware (AirPods Pro/Max/3rd gen+) and software dependencies including Hammerspoon and Xcode tools.
  • Voice output can be customized via environment variables, with Siri voices recommended for naturalness.
  • The plugin is MIT licensed and currently supports macOS only.

The Bottom Line

Earshot is a brilliant hack that solves the 'hands-free' problem for Claude Code, but its reliance on Hammerspoon and specific hardware makes it a niche tool for power users willing to tinker with their macOS environment.