Enable Nx Cloud distributed task execution and remote caching with Nx Agents

domain: nx.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Connect the workspace to Nx Cloud by running npx nx connect; this creates an nxCloudAccessToken in nx.json and registers the workspace with cloud.nx.app
  2. In your CI configuration, replace your existing build/test commands with npx nx-cloud start-ci-run --distribute-on='3 linux-medium-js' before your affected commands, then call npx nx-cloud stop-all-agents at the end
  3. Run tasks with npx nx affected -t build test lint --base=origin/main so Nx Cloud knows which projects need work; the orchestrator distributes these tasks across the agent machines
  4. Agent machines in CI must have the same nxCloudAccessToken available as an environment variable; set NX_CLOUD_ACCESS_TOKEN as a CI secret to override the value in nx.json for security
  5. Configure end-to-end encryption by setting NX_CLOUD_ENCRYPTION_KEY to a random secret shared by all CI machines; Nx Cloud then cannot read your artifact contents at rest
  6. View run details, cache hit rates, and task timing on cloud.nx.app to identify bottleneck tasks worth optimizing

Known gotchas

Related routes

control kubeflow pipelines v2 task caching to force re-execution when needed
kubeflow.org/docs · 5 steps · unrated
Enable Turborepo remote caching to share build artifacts across CI runners and developer machines
turbo.build/repo/docs/core-concepts/remote-caching · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans