One harness setup path: pipelines harness setup <claude|codex|opencode|pi>

Checks the CLI on the server's PATH (install command when missing), signs in
with the harness's own login only when needed (--login forces it), keeps the
OpenCode/Pi model pickers, and verifies with the server's check. Works on
native and Docker installs (Docker delegates to the container setup); --host
is a hidden compatibility alias. harness list shows all four harnesses'
installed/signed-in/configured/default status. ./install --opencode|--pi now
point to the command; ./install ends with the next-step hint.
This commit is contained in:
2026-11-02 16:11:04 +00:00
parent 9d1c8bf910
commit 108c29f9eb
23 changed files with 1033 additions and 222 deletions
+7 -2
View File
@@ -1,5 +1,10 @@
#!/usr/bin/env python3
"""Reconfigure one harness without reinstalling/restarting services or deleting login."""
"""Docker backend of `pipelines harness setup opencode|pi`.
Reconfigures one harness in the Docker installation without reinstalling or
restarting services or deleting login. Run `pipelines harness setup <name>`
instead of calling this directly.
"""
import importlib.util
from pathlib import Path
import subprocess
@@ -19,7 +24,7 @@ setup_docker = module("setup_docker", "setup-docker.py")
def main():
root = Path(__file__).resolve().parents[1]
if len(sys.argv) < 2 or sys.argv[1] not in ("opencode", "pi"):
sys.exit("Usage: setup-harness.py opencode|pi [harness setup options]")
sys.exit("Usage: pipelines harness setup opencode|pi [--login] [--model P/M] [--pipeline-model P/M] [--default]")
name = sys.argv[1]
settings = root / ".env"
docker = settings.is_file() and "PIPELINES_HOST_REPOSITORY=" in settings.read_text()