| name | cli-tester |
| description | Test and validate CLI commands for the cohe CLI tool. Use when testing CLI commands, validating command output, verifying flags, checking error handling, or running integration tests for the cohe CLI (built with oclif and Ink). |
CLI Tester
Overview
This skill provides guidance for testing the cohe CLI tool. It helps verify that CLI commands work correctly, handle errors properly, and provide good user feedback.
Project Context
- CLI Name:
cohe (short for "coding helper")
- Package Manager: Bun
- Test Framework: Bun test
- Commands:
bun test - Run unit tests
bun run dev - Start development server
bun run build - Build CLI
bun run typecheck - TypeScript validation
Testing Checklist
When testing CLI commands:
- Build first: Always run
bun run build before testing the built CLI
- Test success cases: Verify normal operation works
- Test failure cases: Verify error handling and messages
- Check exit codes: Use
echo $? after running commands
- Validate output: Check both stdout and stderr
- Test flags: Verify all CLI flags work as expected
- Test help: Verify
--help and -h flags work
Running Tests
Unit Tests
bun
bun :watch
bun run :coverage