Several commands could have friendlier error messages for common user mistakes.
Examples to improve:
- Running
ctx pack without ctx init first → suggest running ctx init
- Running
ctx show with an invalid hash → explain the expected format (full hash, short prefix, or ctx:// URI)
- Running
ctx diff with only one argument → show usage hint
- Running
ctx replay on a non-existent hash → suggest ctx log to find valid hashes
Acceptance criteria:
- Each improved error message includes a helpful suggestion
- No existing tests break
- Add test cases for at least 2 of the improved messages
Files to look at:
cmd/ctx/commands.go — command definitions and validation
internal/store/hash.go — hash parsing and resolution
Several commands could have friendlier error messages for common user mistakes.
Examples to improve:
ctx packwithoutctx initfirst → suggest runningctx initctx showwith an invalid hash → explain the expected format (full hash, short prefix, or ctx:// URI)ctx diffwith only one argument → show usage hintctx replayon a non-existent hash → suggestctx logto find valid hashesAcceptance criteria:
Files to look at:
cmd/ctx/commands.go— command definitions and validationinternal/store/hash.go— hash parsing and resolution