cli: integrate craft-cli and add version command (CRAFT-730)
Metadata
Current evaluation
Merged into snapcraft 7.0 via commit 0457d6572: integrated craft-cli, added the version command, and retained the legacy CLI fallback for other commands.
Resolution: closed resolved
Reason: PR #3626 was merged as commit 0457d6572, with implementation commit 1bbe09e88. It added craft-cli message handling and argument parsing, implemented version, and delegated remaining commands to the legacy CLI.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Handle message output and command line arguments parsing using
craft-cli. Implement the `version` command and fall back to the
legacy snapcraft implementation to handle all other functionality.
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged into snapcraft 7.0 via commit 0457d6572: integrated craft-cli, added the version command, and retained the legacy CLI fallback for other commands. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3626 as 0457d6572, integrating craft-cli for messages and argument parsing, adding version, and retaining legacy handling for other commands. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #3626 via commit 0457d6572, integrating craft-cli, adding the version command, and retaining legacy handling for other commands and --help. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3626, integrating craft-cli, adding the version command, and retaining the legacy implementation for other functionality and help output. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged after integrating craft-cli and adding a version command, falling back to the legacy implementation for other functionality. Passed CI, approved, and merged. Help output remains handled by the legacy system until fully updated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Integrated craft-cli for argument parsing and output, added a version command, and retained legacy snapcraft fallback for other functionality. Author noted a follow-up regarding help command fallback behavior. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1746 cli: add version command | snapcraft | merged | Merged in snapcraft#1746 via commit 0820103ae, adding snapcraft version and snapcraft --version with matching output and tests. | |
| #1366 cli: Add --version command | snapcraft | merged | Merged in snapcraft#1366 as commit be4a92ad7, adding a global --version flag; the fix was expected in Snapcraft 2.32. | |
| #2063 many: add snapcraftctl set-version | snapcraft | merged | Merged as commit 278f9b79f, adding snapcraftctl set-version for scriptlets and reusable setter infrastructure; resolves #1676. | |
| #1594794 Embedded version required in snapcraft.yaml | snapcraft (launchpad) | closed | Resolved by introducing the craftctl set version=... scriptlet, enabling dynamic version generation instead of requiring a static version in snapcraft.yaml. | |
| #4614 feat(craft-application): migrate version command | snapcraft | merged | Merged PR #4614 (commit 885106d06) migrated Snapcraft's version command to craft-application, resolving #4468; legacy version handling remained out of scope. | |
| #3616 cli: create new snapcraft entry point (CRAFT-729) | snapcraft | merged | Merged #3616, adding a new Snapcraft CLI entry point that initially delegates to the legacy implementation; dispatch logic was deferred to future work (merge 6d233500c). | |
| #1590349 snapcraft should have a 'version' command | snapcraft (launchpad) | closed | Added the version subcommand via snapcore/snapcraft PR #1746 (commit 0820103ae); the change was merged and released in Snapcraft 2.40. | |
| #3833 cli: update craft-cli to comply with UX guidelines | snapcraft | merged | Merged in snapcraft#3833 as commit 35ed040d2, updating to craft-cli 1.0.0 for shared UX verbosity, consistent output, and hidden trace debugging. | |
| #577 Craft cli integration | charmcraft | merged | Craft CLI integration was merged in canonical/charmcraft#577 via commit 1971d581, updating command handling, logging initialization, and tests across 45 files. |