Skip to content

Replace curl/powershell hooks with npx hook subcommand#60

Merged
kosinal merged 1 commit into
masterfrom
feature/npx-hook-subcommand
Mar 10, 2026
Merged

Replace curl/powershell hooks with npx hook subcommand#60
kosinal merged 1 commit into
masterfrom
feature/npx-hook-subcommand

Conversation

@kosinal

@kosinal kosinal commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a hook CLI subcommand that reads stdin and POSTs to the dashboard server using node:http, always exiting 0
  • Replaces platform-specific curl (Unix) / powershell (Windows) hook commands with a single cross-platform npx @kosinal/claude-code-dashboard hook --port <port> command
  • Eliminates conversation pollution from non-zero exit codes when the dashboard server is not running

Test plan

  • npm run lint passes
  • npm test — all 113 tests pass
  • Manual: echo '{"event":"SessionStart","session":{"sessionId":"test"}}' | npx @kosinal/claude-code-dashboard hook --port 8377 with server stopped — exits 0
  • Manual: same with server running — hook data received on dashboard

Adds a `hook` CLI subcommand that reads stdin and POSTs to the
dashboard server using node:http, always exiting 0. Replaces
platform-specific curl/powershell commands that polluted
conversations with non-zero exit codes when the server was down.
@kosinal kosinal merged commit 3dbfbda into master Mar 10, 2026
6 checks passed
@kosinal kosinal deleted the feature/npx-hook-subcommand branch March 10, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant