Properties2
TypePractice
Note createdMar 26, 2026

claude-code-monitor (ccm) is a lightweight Claude Code session monitor that shows the status of all running sessions (working, idle, waiting for input, waiting for permission) in a TUI dashboard, with an optional mobile web UI.

  • GitHub: onikan27/claude-code-monitor
  • Installed globally via npm install -g
  • Uses Claude Code hooks to track session state — non-blocking, no polling
  • Works with Ghostty, iTerm2, and Terminal.app
  • No telemetry, no outbound network calls

My fork

I maintain a fork at diego-vicente/claude-code-monitor with a fix for Ghostty split pane focus.

The upstream implementation searches Ghostty’s Window menu via System Events AppleScript to find the terminal tab. This breaks when the Claude Code session is in an unfocused split pane — the Window menu only shows the focused pane’s title.

The fork replaces this with Ghostty’s native AppleScript API:

tell application "Ghostty"
  set matches to every terminal whose name contains "ccm:ttys009"
  if (count of matches) > 0 then
    focus (item 1 of matches)
  end if
end tell

This queries the terminal object’s own name property (not the tab title), so it works for any pane regardless of focus state. The change is in src/utils/focus.ts.

To install the fork globally:

cd ~/Projects/Personal/claude-code-monitor
npm run build && npm install -g .

Setup

Run ccm setup to install hooks into ~/.claude/settings.json. It registers 5 hooks: Stop, Notification, UserPromptSubmit, PreToolUse, PostToolUse. For Ghostty, it also sets CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1.

A backup of the settings before hook installation lives at ~/.claude/settings.json.bak.20260326-162742.

Focus script

A small script at ~/.claude/bin/focus-ccm uses Ghostty’s AppleScript API to focus the ccm dashboard terminal from anywhere:

#!/bin/bash
osascript -e '
tell application "Ghostty"
  set matches to every terminal whose name starts with "ccm"
  if (count of matches) > 0 then
    focus (item 1 of matches)
    return true
  end if
  return false
end tell
' 2>/dev/null

Keybinding

Cmd+Shift+M is bound globally via Karabiner-Elements to run the focus script. The rule is in ~/.config/karabiner/karabiner.json under “Cmd+Shift+M to focus ccm dashboard”.

Requires:

  • Automation permission: Ghostty must be allowed to control Ghostty + System Events in System Settings > Privacy & Security > Automation
  • Accessibility permission: the terminal or node binary must be listed in System Settings > Privacy & Security > Accessibility