Skip to content
TilloTech Docs

Harbourmaster command-line interface

The harbourmaster-ai-review executable supports GitHub pull request review. The package script ai-review builds the executable before running it.

Invocation

From the EOS repository root, the package-script form is:

text
pnpm --filter @eos/harbourmaster ai-review -- [options]

GitHub mode

text
harbourmaster-ai-review --repo OWNER/NAME --pull-number NUMBER [options]
OptionEnvironment fallbackDefaultDescription
--repoGITHUB_REPOSITORYnoneRepository in owner/name form. Required.
--pull-numberPR_NUMBERnonePositive pull request number. Required.
--head-shaHEAD_SHAnoneExpected pull request head SHA. A mismatch causes a neutral skip in the runner; the action requires a value and also verifies the workspace checkout.
--modeAI_REVIEW_MODEcommentRun mode: silent, check-only, comment, or blocking.
--workspace-rootGITHUB_WORKSPACEcurrent directoryCanonical checkout that the code-quality reviewer can inspect alongside the staged diff.
--workspace-boundaryGITHUB_WORKSPACEcurrent directoryCanonical directory boundary that must contain the workspace root.
--config-pathOPENCODE_CONFIG_PATHbundled config when called by the actionTrusted OpenCode configuration directory.
--strict-runtimeHARBOURMASTER_STRICT_RUNTIMEfalseFails when runtime degradation prevents real review execution.
--debugDEBUGfalseEnables runner outcome details.

GitHub authentication is read from GITHUB_AUTH_MODE and its corresponding credential variables before Octokit is created. The runner masks the resolved credentials and removes them from its environment before OpenCode starts.

VariableRequired whenDescription
GITHUB_AUTH_MODENogithub_token (default) or github_app.
GITHUB_TOKENgithub_tokenToken used to create Octokit.
GITHUB_APP_IDgithub_appGitHub App ID.
GITHUB_APP_PRIVATE_KEYgithub_appPEM private key.
GITHUB_APP_INSTALLATION_IDgithub_appInstallation ID.
VariableDescription
HARBOURMASTER_OPENCODE_EVENT_LOG_PATHOptional path for the raw OpenCode JSON event log. The Action sets this to a job artifact file.

GitHub mode streams raw OpenCode standard output and emits Effect logfmt telemetry to standard output. Raw OpenCode standard error is also forwarded unchanged. Fatal CLI parsing or startup errors are emitted as a redacted cli_error logfmt record on standard error.

Dashboard command

The dashboard has a separate package entry point:

text
pnpm --filter @eos/harbourmaster dashboard:build -- \
  --input INPUT.log --output OUTPUT [--format FORMAT]

--input and --output are required. --format accepts markdown, html, or json. Without --format, .html selects HTML, .json selects JSON, and all other extensions select Markdown.

Exit codes

CodeMeaning
0Successful, skipped, check-only, or allowed degraded outcome.
10Harbourmaster or OpenCode configuration error.
20GitHub, model-provider, or diff-provider error.
30OpenCode or internal runtime error.
40Model context or structured-output validation error.
50GitHub publication error.

Argument validation errors outside the classified runner contract exit with code 1.