← All projects

CodeSense

Drive Claude Code with hardware you already own — analog-trigger approvals, lightbar agent status, haptics, a touchscreen orb.

Open source
TypeScriptClaude CodeHardwareHID

Why it exists

Watching a terminal to catch the moment an agent needs you is a bad use of attention. CodeSense moves that signal onto hardware: the agent’s state drives lights, haptics, and a screen so you feel when it wants something, and your buttons drive it back — approve a tool with a trigger squeeze, talk to it with push-to-talk, switch modes, all without breaking flow.

What’s in it

  • Two devices, no shared code — a PS5 DualSense (RGB lightbar status, analog-trigger approval with programmable resistance) and an M5Stack CoreS3 touchscreen orb. Deleting either adapter leaves the other untouched.
  • State comes from Claude Code hooks, never screen-scraping — hook events feed an agent state machine that renders to whatever device happens to be attached.
  • Two backends, one contractpty wraps a normal claude session unchanged; sdk owns sessions in-process through the Agent SDK. Both emit the same events and consume the same actions.

Notes

pnpm monorepo of TypeScript packages plus a live dashboard, MIT, published as @binliu14/code-sense. No hardware? codesense start --mock gives you a virtual pad in the browser. Community project — not affiliated with Sony, M5Stack, or Anthropic.

© 2026 Dr. Bin Liu