feat(MaaPiCli): 重构为基于子命令的 CLI,新增任务配置文件支持与运行进度输出#1346
Open
srdr0p wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Sorry @srdr0p, your pull request is larger than the review limit of 150000 diff characters
- reconfig_adb 返回 std::optional,修复设备未找到时的处理 - load() 新增 interactive 参数,支持脚本/CI 非交互式调用 - 新增 ProgressSink:集成可配置的任务进度输出
- 引入 CLI11,用子命令(run / list / generate-config pi|task)替换原有 -d 标志 - 新增 TaskConfig 模块:支持解析 TOML/JSON 格式的任务配置文件 - 新增 generate-config 子命令:自动生成 PI 配置或任务配置模板 - 新增 list 子命令:列出可用任务及其配置 - 更新 README 文档
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.
feat(MaaPiCli): 重构 CLI 接口,支持非交互式/脚本化运行
原版 MaaPiCli 只能通过交互式菜单逐步操作,无法用于 CI/CD、
定时任务或脚本自动化场景。本次重构将其改造为标准子命令式 CLI。
新增子命令:
generate-config pi:非交互式生成 maa_pi_config.json,run [--task-config <file>]:运行任务,可通过 TOML/JSON配置文件指定本次运行的任务列表与选项覆盖,无需重走交互流程
不带参数时与原来的
-d等价。--task-config用于临时指定任务,比如临时跑单个任务。此时会复用maa_pi_config.json中的选项list:列出所有可用控制器、任务和选项支持 --controller / --resource / --adb-controller 参数
generate-config task:生成含默认值的示例任务配置文件(TOML)其他改进: