Quick guide for testing the nodcode plugin locally.
-
Install bobble (if not already installed):
brew install hyusap/tap/bobble
-
Verify bobble is working:
bobble --version bobble --check --verbose
Start Claude Code with the plugin loaded:
claude --plugin-dir /Users/ayush/dev/nodcodeOnce Claude Code starts, run:
/nodcode:setupThis should:
- Check if bobble is installed (offer to install if not)
- Verify your AirPods are available (if connected)
- Optionally test gesture detection
- Confirm the plugin is loaded correctly
Trigger a permission request by asking Claude to run a command:
# In the Claude Code chat
Please run: ls -laExpected behavior:
-
If AirPods are connected and worn:
- You'll hear the permission request spoken
- Nod your head to approve
- You should see "✓ Approved via head nod"
-
If AirPods are not connected:
- Normal permission UI appears (graceful fallback)
Try different tools to verify hook works correctly:
- Bash:
Please run: echo "test" - Write:
Please create a file called test.txt - Edit:
Please edit README.md and add a line - Task:
Please analyze this codebase
With AirPods connected:
- Nod test: Trigger permission, nod head → Should approve
- Shake test: Trigger permission, shake head → Should deny
- Timeout test: Trigger permission, don't move → Should fall back to UI after 15s
Add debug logging to the hook by editing hooks/permission-with-gesture.sh:
# Uncomment debug lines (remove leading #)
# echo "[DEBUG] Hook started" >&2
# echo "[DEBUG] Tool name: $TOOL_NAME" >&2Then check stderr output when running Claude Code.
You can test the permission hook script directly:
echo '{"tool_name": "Bash", "tool_input": {"command": "ls"}}' | /Users/ayush/dev/nodcode/hooks/permission-with-gesture.shExpected output (with AirPods connected):
- Voice speaks the permission request
- Wait for gesture
- Returns JSON with decision
-
"bobble not found"
- Solution: Install bobble with Homebrew
-
"Headphone motion not available"
- Solution: Connect and wear your AirPods Pro/Max or Beats Fit Pro
-
No voice output
- Solution: Check macOS sound settings, ensure
saycommand works:say "test"
- Solution: Check macOS sound settings, ensure
-
Hook not triggering
- Solution: Verify hook is registered:
cat /Users/ayush/dev/nodcode/hooks/hooks.json
- Solution: Verify hook is registered:
The hook script must be executable:
ls -l /Users/ayush/dev/nodcode/hooks/permission-with-gesture.sh
# Should show: -rwxr-xr-x (executable)If not executable:
chmod +x /Users/ayush/dev/nodcode/hooks/permission-with-gesture.sh