
Control your Apple TV from Raycast. No Python, no helper apps, nothing to install beyond the extension. It talks to the Apple TV directly over Apple's Companion protocol in pure TypeScript.

pause, open netflix, play severance, play the latest MKBHD video, what's playing, type stranger things, or sleep.@apple-tv-remote pause or @apple-tv-remote play Rick and Morty on Netflix (needs Raycast Pro).
Pairing is interactive because the Apple TV shows the PIN on screen, which is why setup is a command rather than an extension preference.
Open Apple TV Remote and either click the buttons or use the keyboard.
| Control | Bare key | With ⌥ |
|---|---|---|
| Navigate | W A S D (or H J K L) | ⌥↑ ⌥↓ ⌥← ⌥→ |
| Select | F (or G) | ⌥↩ |
| Back | B | ⌥⌫ |
| Home | Q | |
| Play/Pause | Space | ⌥P |
| Skip 10s | , / . | |
| Previous / Next | [ / ] | |
| Context menu (hold select) | V | |
| App switcher | X | |
| Control Center | C | |
| Type text on TV | T | |
| Screensaver | ⌥S |
The bare keys work because the view treats your typing as button presses, so no modifiers are needed. Volume has optional hotkey commands (Volume Up and Volume Down), but they only do anything when the Apple TV controls volume over HDMI-CEC. Most TVs handle volume themselves.
play <title> [on <app>] looks the title up on JustWatch, prefers a streaming service installed on the Apple TV (the closest signal to a subscription), and opens the title there. It does not guess at app IDs. Netflix ignores deep links on tvOS and keeps its catalog out of Apple TV Search, so for Netflix the extension types the title into Netflix's own search and opens the top result, accepting the highlighted profile if Netflix asks for one. Titles that do not resolve go to the Apple TV's universal Search. By default it then presses the title page's Play button, which resumes from the last episode watched in Netflix, Disney+, and Max, and confirms playback started from the Apple TV's own now-playing reports before saying so. The Play Automation preference can stop at the title page instead.
YouTube requests skip all of that. play <query> on youtube plays YouTube's top result, and play the latest <channel> video plays that channel's newest full-length upload.
play <title> goes once it finds the title: press Play or Resume (the default), stop on the title page, or only type the title into search. Apps not known to land on a Play button or a profile picker stay on the title page, and a purchase is never started.The extension speaks Apple's Companion protocol, the same one the iOS Remote uses, straight from Raycast's Node runtime through @bharper/atv-js, a pure-TypeScript port of pyatv. Discovery is Bonjour, pairing is HAP SRP with the on-screen PIN, and the session is chacha20-poly1305 encrypted. App launching, app listing, sleep/wake, Control Center, hold-select, and 10-second skip are built on top of the library in this extension, ported from pyatv's reference implementation.
Pairing produces machine-generated key material rather than a password you type, so it lives in Raycast's encrypted LocalStorage, scoped to this extension. The extension never touches the macOS Keychain, and it sends nothing off your local network. Its only internet requests are title lookups: JustWatch for shows and movies, and youtube.com for YouTube requests.
npm install
npm run dev # ray develop, hot-reloads into Raycast
npm run lint # ray lint
npm run build # ray build
| Module | Role |
|---|---|
src/lib/actions.ts | Every remote action by id, with phrases and HUD text; all commands, tools and views dispatch here |
src/lib/connection.ts | openConnection() with timeout and error classification, plus per-command withConnection() |
src/lib/use-persistent-connection.ts | One live session for the remote view: wakes the TV, coalesces connects, tracks drops |
src/lib/companion-extras.ts | Companion requests ported from pyatv (refusal checks, launch app, app list, HID press, skip) |
src/lib/apps.ts | Curated app catalog (bundles, providers, deep-link quirks), installed-app cache, launch by name |
src/lib/play-flow.ts | Deep link, then universal-search typing, then app launch |
src/lib/justwatch.ts | Title to deep-link resolution (keyless GraphQL, cached) |
src/lib/pairing.ts | The paired device and its credentials (JSON in LocalStorage) |
src/lib/errors.ts | Errors that carry their own toast title and "Set up" action |
@bharper/atv-js by Brian Harper (MIT). The TypeScript Companion-protocol port, itself derived from pyatv (© Pierre Ståhl).See NOTICE for third-party license details.
MIT
On-screen remote with d-pad, playback, volume, and text input.
One-off natural-language commands: pause, open Netflix, play a show.
Discover and pair with an Apple TV on your network.
Browse and open apps installed on your Apple TV.
Toggle playback on your Apple TV.
Jump to the Apple TV home screen.
Quick Apple TV controls from your menu bar.
Press Up on the Apple TV remote.
Press Down on the Apple TV remote.
Press Left on the Apple TV remote.
Press Right on the Apple TV remote.
Press Select on the Apple TV remote.
Go back (Menu) on the Apple TV.
Turn the Apple TV volume up.
Turn the Apple TV volume down.
Skip forward in the current video.
Skip backward in the current video.
Long-press select on the Apple TV to open the context menu for the focused item.
Open the Apple TV app switcher.
Open Control Center on the Apple TV.
Put the Apple TV to sleep.
Wake the Apple TV up.
Start the Apple TV screensaver (can be flaky on some models).
Send text into the focused field on the Apple TV (e.g. a search box).