Skip to content

Add ensure subcommand for resilient SessionStart hook#2

Merged
MaceWindu merged 1 commit into
masterfrom
add-ensure-subcommand
May 11, 2026
Merged

Add ensure subcommand for resilient SessionStart hook#2
MaceWindu merged 1 commit into
masterfrom
add-ensure-subcommand

Conversation

@MaceWindu
Copy link
Copy Markdown
Owner

Summary

  • Adds a new ensure [--color <#RRGGBB>] CLI subcommand: resolve saved device → connect (paired-fast-path or scan fallback) → idempotent PairAsync (restores Windows paired-list fast path if the scan path was needed) → TurnOnSetColor (default #ffffff).
  • Intended for the SessionStart Claude Code hook so a fallen-out Windows pairing or a powered-off strip is repaired on session start — both silently broke a plain color '#ffffff' write.
  • Docs updated: CLAUDE.md subcommand inventory and README.md Example A (SessionStart now uses ensure) + CLI examples block.

Test plan

  • dotnet build Claudelk.slnx — clean
  • dotnet test Claudelk.slnx — all NUnit tests pass
  • dotnet publish src/Claudelk.Cli -c Release — published to user PublishDir
  • Smoke test against live ELK-BLEDOM strip: claudelk.exe ensureEnsured ELK-BLEDOM (BE27A70012DF) on, colour #FFFFFF.
  • Verify SessionStart hook fires ensure cleanly after the next Claude Code session restart on both ~/.claude and ~/.claude-my profiles

🤖 Generated with Claude Code

`ensure` wraps connect → idempotent Windows re-pair → power-on → set
colour (default #ffffff), so a SessionStart hook recovers when the
strip has fallen out of the paired list or is powered off — both of
which silently break a plain `color #ffffff` write.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaceWindu MaceWindu merged commit a804053 into master May 11, 2026
1 check passed
@MaceWindu MaceWindu deleted the add-ensure-subcommand branch May 11, 2026 08:54
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