locally ci

Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

locally ci

This page is part of the CLI Reference and is generated from the CLI's own help output, so it matches what locally ci --help prints.

For more information see Using Locally in CI.

locally ci

Launch the Locally environment in CI mode.

Launches the Locally environment in CI mode on this machine. It runs in the foreground until it's
stopped, so start it in the background and wait for the endpoints it prints before using it.

CI mode is a subset of the Locally environment and includes:

* The Control Plane API
* The Authorization API
* The Directory API
* An Automation API

This lets your CI pipeline build and test against Locally. Run 'locally ci --stop' at the end of the
job to stop what it started.

Authentication is attempted in the following order:
1. LOCALLY_OIDC_TOKEN or LOCALLY_OIDC_TOKEN_FILE (custom OIDC provider, or
   Jenkins via its OpenID Connect Provider plugin credential binding)
2. LOCALLY_CI_KEY or LOCALLY_CI_KEY_FILE (a CI Key from your Locally Account,
   for CI systems that can't issue OIDC tokens)
3. GitHub Actions OIDC (auto-detected)
4. GitLab CI OIDC (via id_tokens)

With an OIDC token, set exactly one of:
  - LOCALLY_TEAM_UUID for team OIDC trusts
  - LOCALLY_USER_UUID for personal OIDC trusts
A CI Key already says which team or user it belongs to, so neither is needed.
Prefer OIDC where your CI system supports it: a CI Key is a long-lived secret.

Set LOCALLY_CI_APPLY_RUNBOOKS=true on a team run to apply the team's auto-deploy
runbooks, data scripts and directory objects before the endpoints are printed. If
any of them fails to apply, 'locally ci' exits with an error.

Set LOCALLY_ACCEPT_SQL_SERVER_LICENCE=true to accept Microsoft's SQL Server licence
(Developer edition) for this run. Azure SQL servers run Microsoft's SQL Server
engine in a container, and Locally won't start one until you accept its licence:
  - SQL Server 2025 (amd64): https://www.microsoft.com/content/dam/microsoft/usetm/documents/sql-server/sql-server-2025-developer%2c-express%2c-evaluation/retail/SQL_Server_2025_Developer_Express_and_Evaluation_Edition_English.pdf
  - Azure SQL Edge (arm64):  https://go.microsoft.com/fwlink/?linkid=2139274
Without it, creating an Azure SQL server fails; everything else works.

Usage

locally ci [flags]

Flags

-h, --help[=true|false]   help for ci
      --stop[=true|false]   Stop a running Locally CI environment
Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

A local cloud for you and your AI agents.

Your Azure infrastructure, running on your machine. Deploy in seconds, break things freely, and ship to Azure when you're ready.