✨ add support for V2 CLI#200
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a V2-focused CLI surface (new top-level V2 commands while preserving V1 via a v1 group + legacy dispatch), plus documentation and CI coverage to validate both command sets.
Changes:
- Introduces V2 CLI commands (
extraction,classification,crop,ocr,split,search-models) and V1 backward-compatible argv rewriting inbin/cli.php. - Adds unit + functional PHP tests for V2 CLI and new smoke-style shell scripts for V1/V2 CLI.
- Updates docs/changelog and wires new reusable workflows for CLI testing + workflow linting.
Reviewed changes
Copilot reviewed 14 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
bin/cli.php |
Registers V1+V2 commands, adds global --error-log, and rewrites argv for legacy V1 invocation compatibility. |
bin/MindeeCliCommand.php |
Renames the V1 command to v1 and updates help/description accordingly. |
bin/V2/InferenceCommand.php |
Implements per-product V2 inference CLI command with shared/common options and output modes. |
bin/V2/SearchModelsCommand.php |
Implements search-models V2 command with filters and raw JSON output. |
bin/V2/V2CliProducts.php / bin/V2/V2CliCommandConfig.php |
Defines a V2 command registry/config to drive per-command option exposure. |
tests/V2/Cli/MindeeCliV2TestingUtilities.php |
New helper to execute CLI from tests (currently has cross-platform/env override issues). |
tests/V2/Cli/MindeeCliCommandV2Test.php |
New unit tests for V2 CLI (currently contains a PHP parse error). |
tests/V2/Cli/MindeeCliCommandV2TestFunctional.php |
New functional tests hitting the V2 API (env-gated). |
tests/test_v1_cli.sh / tests/test_v2_cli.sh |
Adds CLI smoke scripts (V2 script should validate model-id env presence explicitly). |
CLI.md |
Documents the new CLI shape and V2 usage examples. |
CHANGELOG.md |
Notes CLI restructuring + V2 CLI feature (flags “Breaking Changes”, which conflicts with PR metadata). |
composer.json |
Adds test:cli:v1 and test:cli:v2 scripts. |
.github/workflows/* |
Adds CLI test workflow and workflow lint job; workflow lint currently uses an unpinned curl-executed script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ianardee
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Types of changes