Skip to content

Run locally

Running from a source checkout is the fastest way to develop or evaluate ReviewPhin. It uses your local Node.js instead of the container image.

  • Node.js 22 or newer.
  • pnpm (the repo pins a version through packageManager; corepack enable picks it up).
  • The GitHub Copilot CLI on your PATH if you plan to use the default Copilot model path, or a model profile pointing at another provider.
Terminal window
pnpm install --frozen-lockfile

Copy the example file and edit it. For local runs the worker reads .env:

Terminal window
cp .env.example .env

At minimum, set model authentication. For the Copilot path, set one GitHub token:

.env
GH_TOKEN=github_pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

For a BYOK provider, leave GH_TOKEN unset and create a model profile after startup. See environment variables for every setting.

Development mode with reload:

Terminal window
pnpm dev

Or build and run the compiled output:

Terminal window
pnpm build
pnpm start

The worker listens on port 3000 by default.

Terminal window
curl http://localhost:3000/healthz
# {"status":"ok"}

Use pnpm cli from a local checkout wherever the docs write reviewphin:

Terminal window
pnpm cli platform connection add \
--name main-gitlab \
--platform gitlab \
--base-url https://gitlab.example.com \
--api-token glpat-xxxxxxxx

Continue with platform connections and tenants.

  • Local instances are not reachable by GitLab or GitHub yet. Expose the worker with a tunnel before configuring webhooks.
  • Previewing the GitHub setup screens without starting the App flow? pnpm dev logs a /github/setup/samples URL with sample data.