Skip to content

feat(cli): add setup select for explicit multi-host plugin install - #1311

Open
knqiufan wants to merge 2 commits into
oceanbase:masterfrom
knqiufan:feat/cli-setup-select
Open

feat(cli): add setup select for explicit multi-host plugin install#1311
knqiufan wants to merge 2 commits into
oceanbase:masterfrom
knqiufan:feat/cli-setup-select

Conversation

@knqiufan

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #1301

Rationale for this change

Multi-agent machines still have to run one fail-closed setup <host> command per integration. Concatenating those commands aborts on the first missing CLI. PATH-driven auto-install would also treat “the CLI is present” as “install this plugin,” including Claude prompt capture.

This PR adds an opt-in orchestration command that installs only the first-class hosts the user selects, keeps the existing single-target commands unchanged, and isolates one host failure from the others.

What changes are included in this PR?

  • Add powercontext setup select over a shared first-class catalog: codex, claude-code, dsh, pi, hermes.
  • Reuse the current installers. Do not scan PATH to build or filter the menu. Do not start the Server or launch a host process.
  • Repeatable --host is the scriptable path. A TTY without --host prints the catalog and accepts numbers or names. --json and non-TTY require --host.
  • Selected hosts that fail (missing CLI, unbuilt DSH plugin, Claude marketplace conflict) report failed and continue. Unselected hosts are skipped.
  • Empty powercontext setup still prints help. setup <host> remains fail-closed. doctor is unchanged; doctor integrations is left for a follow-up PR.
  • Docs: English and Chinese install, troubleshoot, and interfaces pages.
  • Tests: tests/test_setup_select.py covers selection, isolation, TTY/non-TTY, JSON, flag pass-through, and the single-target fail-closed regression.

Are there any user-facing changes?

Yes. New optional command:

powercontext setup select --host codex --host dsh
powercontext setup select --host codex --json

No breaking API or storage-format change. Per-host setup commands keep their current behavior.

How was this change tested?

  • python -m pytest tests/test_setup_select.py
  • python -m pytest tests/test_system_cli.py tests/test_dsh_cli.py tests/test_hermes_cli.py tests/test_pi_cli.py
  • ruff check on the changed Python files
  • ty check on the changed Python files
  • uv lock --locked

AI usage statement

Used for implementation and review against the issue contract. The design, command surface, and acceptance criteria follow #1301 and the follow-up comment on that issue.

Let users choose first-class hosts instead of PATH-scanning, and isolate one host failure from the rest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add opt-in setup for all detected local agent CLIs

1 participant