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.
GitLab
Section titled “GitLab”reviewphin tenant add \ --platform gitlab \ --connection main-gitlab \ --project-id 123 \ --webhook-secret replace-meThe --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.
GitHub
Section titled “GitHub”The assigned connection must have completed GitHub App installation first.
reviewphin tenant add \ --platform github \ --connection main-github \ --repository example-org/example-repositoryRegistration 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.
Assign a model profile
Section titled “Assign a model profile”Pin a model profile to a tenant at registration with --model-profile <name>, or later:
reviewphin tenant set-profile \ --key https://gitlab.example.com::123 \ --model-profile byok-gpt5.4Clear it to fall back to the database default:
reviewphin tenant clear-profile --key https://gitlab.example.com::123List and remove
Section titled “List and remove”reviewphin tenant listThe JSON output includes each tenant’s id, key, platform, and modelProfileName.
reviewphin tenant remove --key https://gitlab.example.com::123 --yesRemoval prints a deletion summary (database rows, run-log directories, hydrated workspaces) and asks for confirmation unless you pass --yes.
Custom platforms
Section titled “Custom platforms”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.