A CLI that records Cursor, Claude Code, and Devin agent events to a local SQLite database and serves a live browser dashboard.
Try it
npx -y happenin install # show plugin setup for Cursor, Claude Code, and Devin
npx -y happenin import # import existing transcripts
npx -y happenin dashboard # open the live dashboard
No global install needed: the packaged hooks run through npx. For a permanent setup, use the global install.
Why
Cursor, Claude Code, and Devin can emit local hooks for each session, tool use, prompt, file edit, and lifecycle event. happenin adds record hooks to those agents, writes the payloads to a local SQLite database, and serves a live browser dashboard. Data never leaves your machine.
Stability
happenin is pre-1.0. The CLI, database schema, and dashboard output may change in small ways between releases until v1.0.0. Any breaking changes will be minor and listed in the changelog.
Requirements
macOS, Linux, or Windows
Node.js >= 22.13.0 (uses the built-in node:sqlite module, available since Node 22.13)
Zero runtime dependencies
The dashboard loads htmx and htmx-ext-sse from a CDN
Install
npm install -g happenin
Or run from source:
git clone [email protected]:YogliB/happenin.git
cd happenin
npm install
npm run build
Quick start
# Show the plugin setup for Cursor, Claude Code, and Devin
happenin install
# Import existing transcripts
happenin import
# Start the live dashboard
happenin dashboard
The dashboard opens at http://localhost:8765. New events appear automatically.
Commands
happenin install [--cursor] [--claude] [--devin]
Prints the supported plugin setup for Cursor, Claude Code, and Devin. The packaged plugins call npx -y happenin record, so they work with both the trial and global-install flows without rewriting ~/.cursor/hooks.json or ~/.claude/settings.json. Use --cursor, --claude, or --devin to show one client only.
Migrating from a pre-plugin install? Remove the old happenin record entries from ~/.cursor/hooks.json and ~/.claude/settings.json by hand (one-time step). Keep every unrelated hook.
The hook target. Reads a JSON payload from stdin, writes it to ~/.happenin/happenin.db, and prints the required non-blocking response for the agent.
source — cursor, claude, or devin.
event — only required for Claude; Cursor and Devin payloads include hook_event_name.
This command is normally called by the agent hooks, not directly:
echo '{"hook_event_name":"sessionStart","sessionId":"abc123"}' | happenin record cursor
echo '{"sessionId":"abc123"}' | happenin record claude SessionStart
echo '{"hook_event_name":"PreToolUse","session_id":"abc123","tool_name":"exec"}' | happenin record devin
happenin import [--force]
Imports existing transcripts:
Claude Code JSONL from ~/.claude/projects/<project>/<session>.jsonl. Each tool_use block in an
assistant message becomes its own event with tool_name set (and file_path for file-editing
tools, skill_name for Skill calls), so tool usage, skills used, and files touched are
queryable per session and show up on the dashboard.
Cursor prompt_history.json and meta.json from ~/.cursor/chats/<hash>/<session>/.
Imported events share the agent source (claude/cursor); the imported file is kept in
source_path (sourcePath in query output), which live hook events leave empty.
store.db is skipped because it is encrypted.
Files are only re-parsed when their modification time changes; pass --force to clear that
tracking and re-import everything from scratch (useful after upgrading happenin).
happenin query [options]
Query events from the local database and print them as JSON, JSONL, or a summary.