Skip to content

Turbo Plugin

@theholocron/holocron-plugin-turbo cache

npm · GitHub

Install

pnpm add -D @theholocron/holocron-plugin-turbo

Capabilities

CapabilityToken
cacheHOLOCRON_TURBO_TOKEN (turbo)

Turborepo’s Remote Cache is Vercel’s, so the token is a Vercel token. The plugin is separate from the Vercel plugin on purpose: swapping the cache service must not touch deployment.

providers: {
cache: "turbo",
}

The organization’s holocron_capabilities property must allow cache (holocron apply properties) before a repo declares it.

The team is read from HOLOCRON_TURBO_TEAM, then TURBO_TEAM (a team slug, or a team_... id). It is not a secret, so it is filled from the ci layer’s 1Password Environment like the other organization variables. To pin it in config instead:

providers: {
cache: ["turbo", { team: "my-team" }],
}
Terminal window
# Store in keyring
holocron new token turbo <VERCEL_TOKEN>
# Or via env var
export HOLOCRON_TURBO_TOKEN=<VERCEL_TOKEN>
# Also recognized:
export TURBO_TOKEN=<VERCEL_TOKEN>

The token is held in the ci Environment only today. What can and cannot be checked for it: Fern, Vercel, Turbo and Codecov.

holocron probe turbo token asks Vercel’s remote-cache status endpoint (GET /v8/artifacts/status) for the configured team and never prints the token. Rows:

Row Meaning
team fail naming HOLOCRON_TURBO_TEAM when a token has no team (Turborepo then turns the remote cache off)
token fail when Vercel refuses it (401)
team access fail when the cache does not answer for the team with this token (403, 404)
remote cache ok when enabled; fail for disabled, over_limit, paused (and 402/410); info for a state not listed
upload info when Vercel reports the token read-only (it can read the cache but not fill it)
permissions info: Vercel does not report a token’s scope (Full Account or a team), so it is not checked

--environment ci reads that layer’s token (and the team, from the same Environment) from 1Password and confirms the layer is one that should hold it; --token turbo=<token> checks another token. holocron doctor tokens runs the same probe for every layer that should hold the token and fails when a layer holds one it is not declared for.

holocron provider turbo whoami is read-only and prints no token value. Rows:

Row Meaning
token fail when no token is set, saying how to set one
identity ok with team <team>: remote cache <status> (and read only); fail for a token with no team (naming HOLOCRON_TURBO_TEAM) or one Vercel refuses
expiry, age from GET /v5/user/tokens/current and the rotation the plugin declares (90 days, warn 14); info that the provider does not expose it when Vercel answers 401 or 403
permissions info: the declared layers (ci), with the probe that proves them; Vercel does not report a token’s scope

The identity is the remote-cache check for the team, not a Vercel user lookup, so the plugin needs nothing beyond @theholocron/turbo-client.

  • checkToken() — is the token valid for the configured team, and is the remote cache reachable with it? Returns ok, the cache’s status, readOnly where Vercel reports it, a reason and which part failed (problem: token, team or cache). Names and states only, never the token.

The full API reference is generated from the package’s TSDoc comments.