Skip to content

Tenants

A tenant attaches one project (GitLab) or repository (GitHub) to a platform connection. One ReviewPhin instance can serve many tenants, but each tenant maps to exactly one project or repository.

Examples use reviewphin for readability — see running the CLI for the Docker Compose and local forms.

Terminal window
reviewphin tenant add \
--platform gitlab \
--connection main-gitlab \
--project-id 123 \
--webhook-secret replace-me

The --webhook-secret is the value ReviewPhin expects in the X-Gitlab-Token header for this project’s webhooks. It protects the worker from untrusted traffic that could otherwise spend platform and model tokens.

After adding the tenant, configure the project webhook and make the endpoint reachable — that is a deployment concern, covered in exposing webhooks.

The assigned connection must have completed GitHub App installation first.

Terminal window
reviewphin tenant add \
--platform github \
--connection main-github \
--repository example-org/example-repository

Registration scans existing open pull requests and idempotently provisions missing Run Review check runs. A failed scan aborts registration; rerunning the command safely retries the backfill. The GitHub App configures its own webhook, so there is no separate webhook secret to set here.

Pin a model profile to a tenant at registration with --model-profile <name>, or later:

Terminal window
reviewphin tenant set-profile \
--key https://gitlab.example.com::123 \
--model-profile byok-gpt5.4

Clear it to fall back to the database default:

Terminal window
reviewphin tenant clear-profile --key https://gitlab.example.com::123
Terminal window
reviewphin tenant list

The JSON output includes each tenant’s id, key, platform, and modelProfileName.

Terminal window
reviewphin tenant remove --key https://gitlab.example.com::123 --yes

Removal prints a deletion summary (database rows, run-log directories, hydrated workspaces) and asks for confirmation unless you pass --yes.

For non-built-in platforms, set PLATFORM_MODULES in the environment before running tenant add; CLI platform registration uses the same comma-separated module list as the server. See custom platform providers.

All tenant flags are listed in the CLI reference.