Mouse support for Claude Code's terminal UI.
Claude Code has no native mouse support — this tool adds it by wrapping Claude Code in a PTY and translating mouse events into keyboard navigation.
- Click to select options in approval prompts (Yes/No, file edits, bash commands)
- Click checkboxes in multi-select questions
- Click the Submit button
- Hover to move the focus pointer across options
- Scroll works normally when no interactive options are visible
- Text selection works normally when no options are visible
claude-mouse spawns Claude Code inside a pseudo-terminal and tracks the screen buffer with pyte. When interactive options appear on screen, it enables SGR mouse mode to capture clicks and hover events, translating them into the arrow keys and Enter/Space that Claude Code expects. When options disappear, mouse mode is disabled so terminal-native scrollback and text selection work normally.
pip install git+https://github.com/Ofear/claude-mouse.gitclaude-mouse # instead of 'claude'
claude-mouse --help # passes args through to claudeCLAUDE_MOUSE_DEBUG=1 claude-mouse
# logs to /tmp/claude_mouse_debug.txt- Python 3.10+
- Claude Code CLI (
claude) installed and in PATH - A terminal with SGR mouse support (most modern terminals: kitty, iTerm2, gnome-terminal, etc.)
MIT