- Add 2-second timeout for stdin input to prevent hanging
- Update README with pronunciation guide and go install instructions
- Fix command references in documentation from ./cnotes to cnotes
- Update settings.json to use /Users/jason/go/bin/cnotes run
- Improve generated by message formatting in notes output
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
BREAKING CHANGE: Complete restructure from hooks to cnotes
Major Changes:
- Removed all hook handler code except git commit detection
- Simplified to focused git notes functionality only
- Renamed binary from 'hooks' to 'cnotes'
- Restructured CLI: cnotes (hook handler), cnotes show, cnotes install, etc.
- Updated module path to github.com/imjasonh/cnotes
- Rewrote README and CLAUDE.md for new focused scope
New Command Structure:
- cnotes # Main hook handler (receives Claude Code calls)
- cnotes show # Pretty-print conversation notes
- cnotes install # Configure Claude Code to use cnotes
- cnotes backup # Backup conversation notes
- cnotes restore # Restore notes from backup
- cnotes list # List commits with notes
This creates a much cleaner, focused tool specifically for git conversation notes.
- Added formatConversationExcerpt function to properly unescape JSON strings
- Replaced escaped newlines (\n) with actual newlines for readability
- Unescaped quotes, backslashes, tabs, and other JSON escape sequences
- Tool interactions and conversation context now display with proper formatting
- Much more readable output with proper line breaks and structure
The conversation context is now properly formatted and easy to read instead of being one long escaped string.
- Added 'hooks notes show [commit]' command that defaults to HEAD
- Formats conversation context in readable Markdown with proper sections
- Shows commit info, session details, tools used, commit context, and conversation excerpt
- Updated documentation to recommend the show command over raw git notes
- Enhanced user experience for viewing conversation context
Usage:
./hooks notes show # Show notes for latest commit
./hooks notes show abc123 # Show notes for specific commit
- Added WarnAboutGitNotesLoss hook that warns before destructive git operations
- Implemented comprehensive backup/restore system for conversation notes
- Added CLI commands: hooks notes backup/restore/list
- Configured git to automatically copy notes during rebase operations
- Created backup.go with full notes backup and restoration functionality
This ensures conversation context is never lost during rebasing, squashing, or other destructive git operations.