
English · 中文
Lean back and drive your coding agent from the couch. padpilot turns a PS5 DualSense controller into a wireless remote for Claude Code, OpenAI Codex CLI, and the Claude desktop app:
- See and feel what the agent is doing. The lightbar breathes blue while thinking, shifts colour by tool type, blinks orange with strong double pulses and a crisp R2 trigger click-point when waiting for approval, and turns solid green when done. Over USB, the controller's built-in speaker also plays status sound cues.
- One button layout across every app.
✕ / R2 approves and submits, ○ / L2 cancels and interrupts, □ clears input, △ sends continue, R3 retries your last prompt, and holding △ opens an 8-direction prompt wheel. Your custom shortcuts in ~/.claude/keybindings.json are respected automatically.
- Interactive built-in Pad School. Run
padpilot tutorial (or /padpilot:tutorial in Claude Code) to learn the controls step by step with your real controller. While the tutorial page is open, practice mode is active so no presses ever reach your agent.

Claude Code / Codex ──Hooks──▶ padpilot daemon ──HID──▶ DualSense (light / rumble / triggers / speaker)
▲ │ ▲
└──── keystrokes ◀───────────┘ └──── buttons / sticks / touchpad
(PTY wrapper, or the Claude desktop app on macOS)
Install
Requires a DualSense controller (USB or Bluetooth), Python ≥ 3.8, and macOS (terminal features also work on Linux; Claude desktop app control is macOS-only).
git clone https://github.com/XixianWasTaken/padpilot.git
cd padpilot
# 1. Set up the runtime environment (installs hidapi into ~/.padpilot/venv) and add to PATH
./bin/padpilot setup
ln -sf "$PWD/bin/padpilot" ~/.local/bin/padpilot
# 2. Install the Claude Code plugin (hooks + slash commands)
claude plugin marketplace add "$PWD"
claude plugin install padpilot@padpilot
# 3. (Optional) Install Codex hooks (backs up ~/.codex/hooks.json first; run /hooks once in Codex to trust)
padpilot install-codex
# 4. Verify & explore
padpilot doctor # check hidapi, controller, and daemon
padpilot demo # test rainbow lightbar + rumble
padpilot tutorial # open the interactive Pad School tutorial
padpilot manual # open the bilingual reference manual
Three Ways to Use It
Add aliases to your shell profile for everyday terminal use:
alias cc='padpilot run claude'
alias cx='padpilot run codex'
| Mode | How to start | Lights / Rumble / Audio | Approvals | Everyday Button Control |
|---|
| 1. Terminal Wrapper (Recommended) | padpilot run claude / codex | ✓ | ✕ approve / ○ deny | Full keystroke injection (auto-detects DECCKM & Kitty keyboard protocol) |
| 2. Claude Desktop App (macOS) | Open the Claude desktop app | ✓ | Hook approval (45s timeout) | Direct control of the input box, reply cards, question boxes & dictation while frontmost |
| 3. Hook-Only Mode (IDEs / Raw CLI) | Run claude / codex directly | ✓ | Hook approval (45s timeout) | Approvals only; regular button presses are not sent |
First-Time Setup for Claude Desktop App (macOS)
To send keystrokes and focus the input box in the Claude desktop app, grant Accessibility permission once:
padpilot desktop # opens the macOS Accessibility prompt (System Settings → Privacy & Security → Accessibility)
padpilot stop && padpilot desktop # restart daemon and verify it reports "ok"
- Permission is granted to the daemon's Python inside
~/.padpilot/venv. Keystrokes are posted directly to the Claude desktop app's process and only while it is the frontmost window.
- When a
padpilot run terminal session is also open, buttons go to the terminal by default—except when the Claude desktop app is frontmost with a mid-turn question box open (and the terminal session is not waiting for input), in which case R1 + face buttons and ✕ answer that question box.
What the Controller Tells You
1. Lightbar & Rumble