Overview
Thetest command validates your statusline script using actual Claude Code JSON input data. This provides more accurate testing than the preview command by using real-world data instead of mock values.
Syntax
Options
Path to the configuration file to test. If not specified, uses the default
.claude/statusline.sh location.Current Status
The test command is currently a placeholder that displays:Planned Features
When implemented, the test command will provide:Real Data Testing
Unlikepreview which uses mock data, test will work with actual Claude Code JSON input:
- Real working directory paths
- Current git branch information
- Actual model name and version
- Live context usage statistics
- Real-time cost and token data
Validation Capabilities
- Input Validation - Verify Claude Code provides expected JSON structure
- Output Verification - Ensure statusline renders correctly with real data
- Performance Testing - Measure execution time under actual conditions
- Feature Coverage - Confirm all enabled features work with real data
Configuration File Support
Test specific statusline configurations:Differences from Preview
| Aspect | Preview | Test |
|---|---|---|
| Data Source | Mock JSON data | Real Claude Code input |
| Execution Context | Simulated environment | Actual Claude Code environment |
| Availability | Available anytime | Requires active Claude Code session |
| Use Case | Quick validation before restart | Accurate real-world testing |
| Dependencies | None required | Needs Claude Code running |
Expected Usage
Once implemented, the test command will be used for:Validating New Configurations
Debugging Production Issues
Performance Benchmarking
Input Format
The test command will accept Claude Code JSON input in the format:Expected Output
The test command will provide comprehensive test results:Integration with Claude Code
The test command will integrate with Claude Code’s environment:Error Detection
The test command will detect and report common issues:- Missing Dependencies: Reports if
jq,git, orccusageare unavailable - Invalid Input: Validates Claude Code JSON structure
- Feature Failures: Identifies which features fail with real data
- Performance Issues: Warns if execution exceeds performance targets
Workaround Until Implementation
While the test command is in development, use these alternatives:Use Preview Command
Manual Testing
Install and Restart
The most accurate test is to install and restart Claude Code:Development Status
Track implementation progress:- Repository: cc-statusline
- Source:
src/index.ts:32-37(placeholder) - Status: Planned for future release
Contributing
Interested in implementing the test command? Contributions are welcome!- Check the Contributing Guide
- Open an issue to discuss the implementation approach
- Submit a pull request with your implementation
Related Commands
init- Generate a new statusline configurationpreview- Test statusline with mock data (available now)
Source Reference
Command definition:src/index.ts:32-37Implementation: Currently placeholder - outputs “Test command coming soon!”