MCPcopy Index your code
hub / github.com/devxoul/vibe-haptic

github.com/devxoul/vibe-haptic @1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.0 ↗ · + Follow
53 symbols 113 edges 19 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Vibe Haptic 🫨

Haptic feedback from your coding agents.

Vibe Haptic

Get tactile feedback when your AI agent completes tasks, encounters errors, or requests input — feel the rhythm of your coding session through your MacBook's trackpad.

Why?

"Why not just use system notifications?"

I tried that. Banners popping up, sounds dinging — it felt noisy and annoying. Every notification pulled my eyes away from what I was doing, broke my flow, and honestly just became another thing to dismiss.

I wanted something quieter. A subtle nudge that says "hey, I'm done" without screaming for attention. Something I could feel without having to look. (I'm the kind of person who always has Do Not Disturb on.)

That's what haptic feedback does — it's silent, ambient, and stays out of your way until you need it.

How It Works

Modern MacBooks have a Force Touch trackpad that doesn't physically click. Instead, it uses a linear actuator (Taptic Engine) to simulate the sensation of a click through precise vibrations.

Vibe Haptic taps into macOS's private MultitouchSupport.framework to trigger these haptic actuations programmatically. When your AI agent finishes a task or needs attention, the trackpad vibrates with distinct patterns you can feel under your fingers.

Installation

Claude Code

claude plugin marketplace add devxoul/vibe-haptic
claude plugin install vibe-haptic

Or within Claude Code:

/plugin marketplace add devxoul/vibe-haptic
/plugin install vibe-haptic

OpenCode

Add to your opencode.jsonc:

{
  "plugins": [
    "vibe-haptic@1.1.0"
  ]
}

Configuration

Everything works out of the box — just install and go. But if you want to tweak the patterns or map different events, here's how.

Configuration File

Create vibe-haptic.json in your config directory:

  • Claude Code: ~/.claude/vibe-haptic.json or .claude/vibe-haptic.json
  • OpenCode: ~/.config/opencode/vibe-haptic.json or .opencode/vibe-haptic.json
{
  "patterns": {
    "success": { "beat": "6/1.5 6/0.8  4/0.5" },
    "error": { "beat": "6/2.0 6/2.0 6/2.0" }
  },
  "events": {
    "stop": "dopamine",
    "prompt": "alert"
  }
}

Events

Events map agent actions to haptic patterns:

Event Trigger Claude Code OpenCode
stop Agent finishes and becomes idle
prompt Agent asks for input (select option, permission, etc.)

Trigger Details

stop event — Fires when the agent completes its work: - Claude Code: Triggered by the Stop hook event when the agent finishes responding - OpenCode: Triggered when session status changes to idle

prompt event — Fires when the agent needs your attention: - Claude Code: Triggered by Notification hook events (permission requests, tool approvals, etc.) - OpenCode: Triggered by permission.updated or question.asked events

Beat Patterns

Haptic feedback is defined using a beat notation:

"6/0.8 4/1.0  6/0.5"
  • Digits (3-6): Actuation strength — 3 minimal, 4 medium, 5 weak, 6 strong
  • /intensity: Optional intensity (0.0-2.0) — 6/0.5 = strong actuation at half intensity
  • Spaces: Pauses between taps (100ms per space)

Examples: - 6 6 6 — three strong taps with short pauses - 6/2.0 6/0.5 — loud tap followed by soft tap - 66 — rapid double tap (no pause) - 6 6 — two taps with longer pause

Built-in Patterns

Pattern Beat Description
vibe 6/0.8 3/1.0 6/1.0 Signature rhythm (default for stop event)
alert 6/0.5 6/1.0 6/0.5 Attention pulse (default for prompt event)
dopamine 6666666 5/1.0 4/1.0 3/1.0 Reward cascade
noise 6543654365436543 Rapid texture

License

MIT

Extension points exported contracts — how you extend this code

BeatToken (Interface)
(no doc)
src/haptic.ts
PatternConfig (Interface)
(no doc)
src/types.ts
ClaudeHookInput (Interface)
(no doc)
src/claude/hook.ts
HapticEngineOptions (Interface)
(no doc)
src/haptic.ts
HapticConfig (Interface)
(no doc)
src/types.ts
ResolvedPattern (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

parseBeat
called by 8
src/haptic.ts
trigger
called by 8
src/haptic.ts
triggerForEvent
called by 7
src/haptic.ts
actuate
called by 6
native/src/lib.rs
debug
called by 4
src/claude/hook.ts
debug
called by 4
hooks/haptic-hook.js
createHapticEngine
called by 3
src/haptic.ts
getConfigPath
called by 2
src/config.ts

Shape

Function 31
Method 12
Interface 6
Class 4

Languages

TypeScript87%
Rust13%

Modules by API surface

hooks/haptic-hook.js18 symbols
src/haptic.ts12 symbols
native/src/lib.rs6 symbols
src/claude/hook.ts5 symbols
src/types.ts3 symbols
src/opencode/plugin.ts3 symbols
src/config.ts3 symbols
tests/integration.test.ts1 symbols
src/patterns.ts1 symbols
native/build.rs1 symbols

For agents

$ claude mcp add vibe-haptic \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact