You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Complete CLI tool integration with comprehensive testing and documentation
Finalize the ccap CLI tool implementation with extensive refactoring, comprehensive
test coverage, CI/CD integration, and complete documentation. This commit addresses
all code review feedback and ensures production-ready quality.
Major improvements:
- Refactor CLI build system: rename CMakeLists.txt to ccap-cli.cmake, remove wuffs
dependency, simplify configuration
- Add dev.cmake.example for optional CLI tool development configuration
- Enhance device listing with improved formatting and detail levels
- Add internal-format option for raw frame data export
- Implement release packaging for all platforms in workflows
Testing enhancements:
- Add 12 comprehensive CLI integration tests covering all functionality
- Implement device selection and error handling tests
- Add rigorous YUV to BMP format conversion validation tests
- Enforce clean test environment with proper setup/teardown
- Add stricter validation for captured image files
- Achieve complete code coverage for CLI module
- Fix Windows compilation errors in CLI tests
CI/CD updates:
- Enable CLI building in Linux, macOS, and Windows workflows
- Add CLI artifacts to release workflow for distribution
- Update test scripts to include CLI tests
- Add VS Code launch configurations for CLI debugging
- Add VS Code tasks for CLI operations
Documentation:
- Add comprehensive CLI tool documentation (cli/README.md, cli/README.zh-CN.md)
- Add CLI tool reference in main README with direct links
- Streamline main README by removing redundant CLI sections
- Document all command-line options with usage examples
- Add integration examples (Bash, Python, Makefile)
- Include performance tips and troubleshooting guide
- Update CMAKE_OPTIONS.md with CLI-related build flags
- Add CLI tool setup instructions in BUILD_AND_INSTALL.md
- Update version to 1.4.0 with CLI feature inclusion
- Fix markdown table formatting in README files
Code quality improvements:
- Remove unnecessary references to external tools in code comments
- Fix all CodeRabbit and Copilot code review issues
- Resolve compilation warnings across all platforms
- Improve code structure and readability
- Add proper error handling and validation
- Fix minor issues in example code comments
- Update .github/copilot-instructions.md with development guidelines
This commit brings the CLI tool to production-ready state with full test coverage,
comprehensive documentation, and seamless CI/CD integration.
Co-authored-by: LeeGoDamn <243561453+LeeGoDamn@users.noreply.github.com>
> **CLI Tool**: The CLI packages contain only the standalone `ccap-cli` executable (statically linked). Perfect for quick testing and simple capture tasks without requiring library integration.
694
+
461
695
### 📁 Package Contents
462
696
463
697
**Static Library Packages:**
@@ -511,6 +745,19 @@ jobs:
511
745
- **Linux ARM64**: Link `lib/libccap.so`, ensure so is in LD_LIBRARY_PATH or install location
512
746
5. Refer to example code in the `examples` directory
513
747
748
+
**For CLI Tool:**
749
+
1. Download the appropriate CLI package for your platform
750
+
2. Extract the archive
751
+
3. Run the `ccap-cli` executable directly (no installation required):
752
+
```bash
753
+
# List available cameras
754
+
./ccap-cli --list-devices
755
+
756
+
# Capture a frame
757
+
./ccap-cli --output my-capture.bmp
758
+
```
759
+
4. See `USAGE.md` in the package for complete usage guide
0 commit comments