Skip to content
lighthouse
Menu

CLI command · @houses/lighthouse-cli

lhci-toolkit register

Register a repo as a Project on the LHCI server and print its Build token.

lhci-toolkit --server-url https://lhci.example.com \
  --admin-username "$LHCI_BASIC_AUTH_USERNAME" \
  --admin-password "$LHCI_BASIC_AUTH_PASSWORD" \
  register my-app

Creates a Project named <name> with POST /v1/projects and prints its id and Build token. When the server returns an Admin token, it prints that too: save it, because it is the only way to rename or delete the Project later.

It then prints the lhci autorun flags to use in CI, including upload.basicAuth. The --admin-* flags carry the server basicAuth pair, which registration needs.