Blacksmith transparently caches your Turborepo task outputs across runs
Overview
Blacksmith natively and transparently caches your Turborepo outputs. The cache stores the files each task produces, and a later job restores them when the inputs match. Those tasks do not run again, so the build finishes sooner. No workflow change is required.
How it works
A task’s hash covers the files it reads, the environment variables Turborepo includes, and its configuration in turbo.json. Blacksmith stores the outputs under that hash. A job that produces the same hash restores the outputs instead of running the task, including a job on another branch.Each repository has its own cache, shared across branches and pull requests, so merging to main warms the cache for every branch that follows. Caches are separated by CPU architecture and never shared across repositories or organizations.
Enable Turborepo build caching
Turborepo build caching is on by default for new organizations. An organization admin can turn it on or off from Settings > Caching in the Blacksmith dashboard, under Build systems. The switch is Turborepo build cache.
Existing remote caches
If a job already sets TURBO_API, TURBO_TOKEN, or TURBO_TEAM, Blacksmith leaves that configuration in place. Remove those variables to use this cache instead. --no-cache and --remote-only still follow the Turborepo CLI.
Branch protection
Build cache branch protection is available in Settings > Caching, under Dependencies. When enabled, only jobs running on the default branch (push, schedule, workflow_dispatch) or in a merge queue can write to the cache. Every other job gets read-only access. The setting is off by default and applies to every build cache at once.Fork pull requests get no Turborepo remote cache at all, regardless of this switch.
Task outputs
A hit restores only the files named in outputs for that task. If the task writes other files, Turborepo replays the log and skips those files. A later step can then fail looking for a generated client. Every file the task creates belongs in outputs.
Do not list .next/cache/**. It changes on every build, and the upload is large for a hash that will not match the next run. Turborepo’s guide to specifying outputs covers the full rules.
Limitations
The cache runs on the runner. A job that uses container: cannot reach it, and neither can turbo inside docker build. The log says Remote caching disabled, and the tasks run.Tasks that depend on external state should stay uncached. A test that reads a database, or anything that depends on the clock, is replayed when the inputs Turborepo can see are unchanged. Set "cache": false on those tasks.
Logs and the Cache page
The job log should contain Remote caching enabled. Tasks that matched print cache hit, replaying logs. A run where every task hit prints FULL TURBO. For the full picture, open the Cache page, choose a repository, and open the Turborepo tab.
Hit rate there counts what your runs actually experienced. The first builds populate the cache, so compare hit rate and step durations across later runs.Blacksmith evicts entries that are no longer read. The same page shows what the repository is storing. Turning Turborepo build cache off deletes the organization’s Turborepo cache.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Blacksmith","colors":{"primary":"#393C00","light":"#393C00","dark":"#393C00"},"logo":{"light":"https://mintcdn.com/blacksmith/TP7SlQhj6komojne/logo/blacksmith.svg?fit=max\u0026auto=format\u0026n=TP7SlQhj6komojne\u0026q=85\u0026s=3309b1dface9b871016167449c254539","dark":"https://mintcdn.com/blacksmith/TP7SlQhj6komojne/logo/blacksmith.svg?fit=max\u0026auto=format\u0026n=TP7SlQhj6komojne\u0026q=85\u0026s=3309b1dface9b871016167449c254539"},"favicon":"https://mintcdn.com/blacksmith/RMBIa5U5GnHQ2Ykn/favicon.png?fit=max\u0026auto=format\u0026n=RMBIa5U5GnHQ2Ykn\u0026q=85\u0026s=1e405751b6e60900bb357a9dc9d04ddb","appearance":{"default":"light","strict":true},"background":{"color":{"light":"#F5F5F5","dark":"#F5F5F5"}},"footer":{"socials":{"twitter":"https://twitter.com/useblacksmith","linkedin":"https://linkedin.com/company/blacksmithrun","youtube":"https://www.youtube.com/@useblacksmith"}},"fonts":{"family":"IBM Plex Sans"},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-NHKFLSK4"},"posthog":{"apiKey":"phc_dYSW8XuNzq0Snnz1swp7QZs4bS6c6jL9cwGyISPALnk","apiHost":"https://us.posthog.com"},"plausible":{"domain":"docs.blacksmith.sh"}},"contextual":{"options":["copy","cursor","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"signal-bars","href":"https://status.blacksmith.sh"},{"anchor":"Support","icon":"bell-concierge","href":"https://app.blacksmith.sh/?support=open"},{"anchor":"Security","icon":"lock","href":"https://www.blacksmith.sh/security"},{"anchor":"Pricing","icon":"dollar-sign","href":"https://www.blacksmith.sh/pricing"},{"anchor":"Console","icon":"square-terminal","href":"https://app.blacksmith.sh"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"blacksmith","hasAudioNarration":false,"actualSubdomain":"blacksmith","customDomains":["docs.blacksmith.sh"],"gitSource":{"type":"github","owner":"useblacksmith","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b09dbbd2af8fdfe8728d23b","clientVersion":"0.0.4347","searchFilterCounts":[{"language":"default","tag":"GitHub Actions","count":44},{"language":"default","tag":"[code]smith","count":12},{"language":"default","tag":"Caching","count":10},{"language":"default","tag":"CLI","count":7},{"language":"default","tag":"Observability","count":7},{"language":"default","tag":"Support and Terms","count":6},{"language":"default","tag":"2x Faster Runners","count":5},{"language":"default","tag":"Remote Build Cache","count":4},{"language":"default","tag":"Administration","count":3},{"language":"default","tag":"Selective Execution","count":3}]},"assistantConfig":{"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":false}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"selectively-prewarm","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false,"authValue":{"userAuth":{"type":"shared-session","apiUrl":"https://dashboardbackend.blacksmith.sh/api/docs/user"}}},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/blacksmith/e8b4ce6e35a2dcb8/style.css"}]}
{"page":{"pagePath":"blacksmith-caching/turborepo-build-caching","slug":"/blacksmith-caching/turborepo-build-caching","pageMetadata":{"title":"Turborepo Build Caching","sidebarTitle":"Turborepo","description":"Blacksmith transparently caches your Turborepo task outputs across runs","icon":"/images/turborepo-icon.svg","href":"/blacksmith-caching/turborepo-build-caching"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Blacksmith transparently caches your Turborepo task outputs across runs\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const ProductEmbed=({story,title,width,height})=>{const productionOrigin=`https://docs-embeds.blacksmith.sh`;const knownOrigin=()=>{if(typeof window===`undefined`)return undefined;if(!/^localhost$|\\.mintlify\\.(app|site)$/.test(window.location.hostname))return productionOrigin;return window.__blacksmithEmbedOrigin};const designWidth=width||960;const designHeight=height||600;const frameRef=useRef(null);const[embedOrigin,setEmbedOrigin]=useState(knownOrigin);const[ready,setReady]=useState(false);const[live,setLive]=useState(false);const[requested,setRequested]=useState(false);useEffect(()=>{const frame=frameRef.current;const box=frame\u0026\u0026frame.parentElement;if(requested||!box)return undefined;const request=()=>setRequested(true);const observer=new IntersectionObserver(entries=>{if(entries.some(entry=>entry.isIntersecting))request()},{rootMargin:`100px 0px`});observer.observe(box);frame.addEventListener(`blacksmith-embed-load`,request);return()=>{observer.disconnect();frame.removeEventListener(`blacksmith-embed-load`,request)}},[embedOrigin,requested]);useEffect(()=>{if(embedOrigin)return undefined;const resolve=()=>setEmbedOrigin(knownOrigin()||productionOrigin);if(knownOrigin())return resolve();window.addEventListener(`blacksmith-embed-origin`,resolve);const timer=setTimeout(resolve,5e3);return()=>{window.removeEventListener(`blacksmith-embed-origin`,resolve);clearTimeout(timer)}},[embedOrigin]);useEffect(()=>{const frame=frameRef.current;const box=frame\u0026\u0026frame.parentElement;if(!box)return undefined;const fit=()=>{frame.style.transform=`scale(${box.clientWidth/designWidth})`};fit();const observer=new ResizeObserver(fit);observer.observe(box);return()=>observer.disconnect()},[designWidth,embedOrigin]);useEffect(()=>{const onMessage=event=>{if(event.origin!==embedOrigin)return;if(!frameRef.current||event.source!==frameRef.current.contentWindow)return;if(event.data\u0026\u0026event.data.source===`blacksmith-docs-embed`\u0026\u0026event.data.type===`ready`){setReady(true);if(!event.data.snapshot)setLive(true)}};window.addEventListener(`message`,onMessage);return()=>window.removeEventListener(`message`,onMessage)},[embedOrigin]);if(!embedOrigin)return null;return _jsx(`iframe`,{ref:frameRef,className:ready?`is-ready`:undefined,\"data-embed-live\":live?``:undefined,src:requested?`${embedOrigin}/embeds/${story}`:undefined,\"data-embed-story\":story,width:designWidth,height:designHeight,title,onLoad:event=>{if(event.currentTarget.getAttribute(`src`))event.currentTarget.setAttribute(`data-loaded`,``)},tabIndex:-1})};function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Blacksmith natively and transparently caches your Turborepo outputs. The cache stores the files each task produces, and a later job restores them when the inputs match. Those tasks do not run again, so the build finishes sooner. No workflow change is required.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`A task’s hash covers the files it reads, the environment variables Turborepo includes, and its configuration in `,_jsx(_components.code,{children:`turbo.json`}),`. Blacksmith stores the outputs under that hash. A job that produces the same hash restores the outputs instead of running the task, including a job on another branch.`]}),`\n`,_jsxs(_components.p,{children:[`Each repository has its own cache, shared across branches and pull requests, so merging to `,_jsx(_components.code,{children:`main`}),` warms the cache for every branch that follows. Caches are separated by CPU architecture and never shared across repositories or organizations.`]}),`\n`,_jsx(Heading,{level:`2`,id:`enable-turborepo-build-caching`,children:`Enable Turborepo build caching`}),`\n`,_jsxs(_components.p,{children:[`Turborepo build caching is on by default for new organizations. An organization admin can turn it on or off from `,_jsx(_components.a,{href:`https://app.blacksmith.sh/settings/caching`,children:_jsx(_components.strong,{children:`Settings > Caching`})}),` in the Blacksmith dashboard, under `,_jsx(_components.strong,{children:`Build systems`}),`. The switch is `,_jsx(_components.strong,{children:`Turborepo build cache`}),`.`]}),`\n`,_jsx(`div`,{className:`product-embed not-prose`,children:_jsx(`div`,{className:`product-embed-window`,children:_jsxs(`div`,{className:`product-embed-screen`,style:{backgroundImage:`url(data:image/webp;base64,UklGRl4IAABXRUJQVlA4IFIIAABwNwCdASpAAcgAPtFoq1CoJiSipNQZ4QAaCWlu9JWPCpojSZfaydqlGGw+E8a+l131yvSk2W5WTpJMfIX3qfv3/rCSjnSG6j6x6TmDFcq3G5/KhiinG1OUuZHCShKHYHArVwo+2NqcuL0BJsI24+xBxlTAXJ22Kjl87MTTL7ySXEKdC3Pe9mMDjeJbbLBQQS0XoiqyrWljFHhey7GRTwyJYO9/SS8+xmMuDAPsBj3Vn5RrnufAzpmj54qi7yGNLgcmGUMLPb+B9QDca57Gqw/egBoQMmTH8L1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N7b2P3Ntg2iq1pHJkZMZdupVThcquoeHNoUN98rz1cB5YaLDEDk/me4fIiF6WaNvKhBpIrrdCFSukg05t0ZXptNYVpT/2Ed3ccBSaU44SVKMJ13tbdtq0KXB+gM6RrOJ1LhxXLj6H5vk63dkivqrmDJsB9JQlu8yqL0RKbHGyOIYi7kfwW3uNSvEiNfZ6+i8HmDQj9gaCY8WSkmNOPOD+hWJKp/+oH1NNs3Q07UCxFvFCx2pAR3kM5Cuc8HEasGoCptrxwY7NE7Gx0gZE6cIqutktDhVAdDJRuGiqHBAMRAgtSQDRK+ejtJ5hCQfBWef0D+zfRyfL4O62pBiDq2r28KkZe6RSBECpWj5is42AG6qx0gWLj+oAAAA=)`},children:[_jsx(`img`,{className:`product-embed-poster`,src:`https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=e677f9e566a39b3544a6ffcc7bf8c1a6`,alt:`An admin turning on Turborepo build cache in Settings > Caching`,noZoom:true,\"data-og-width\":`1920`,width:`1920`,\"data-og-height\":`1200`,height:`1200`,\"data-path\":`images/embeds/settings-caching.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?w=280\u0026fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=b657979423df10a61798c34aeb3493b9 280w, https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?w=560\u0026fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=f4dbd11c9851767805ab0e62cc7c7358 560w, https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?w=840\u0026fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=5cd9c53f184f1f7eeb1e785d59d0e692 840w, https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=2492457d83714c744c73827365796f45 1100w, https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=582359d20e48a076179220458050858d 1650w, https://mintcdn.com/blacksmith/MQ-ynRVrOUv23S_z/images/embeds/settings-caching.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MQ-ynRVrOUv23S_z\u0026q=85\u0026s=e45834bdfde9bf98b42c6c636448893d 2500w`}),_jsx(_MdxComponentBoundary,{name:`ProductEmbed`,children:_jsx(ProductEmbed,{story:`docs-embeds-settings--turbo-build-cache`,title:`An admin turning on Turborepo build cache in Settings > Caching`})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`existing-remote-caches`,children:`Existing remote caches`}),`\n`,_jsxs(_components.p,{children:[`If a job already sets `,_jsx(_components.code,{children:`TURBO_API`}),`, `,_jsx(_components.code,{children:`TURBO_TOKEN`}),`, or `,_jsx(_components.code,{children:`TURBO_TEAM`}),`, Blacksmith leaves that configuration in place. Remove those variables to use this cache instead. `,_jsx(_components.code,{children:`--no-cache`}),` and `,_jsx(_components.code,{children:`--remote-only`}),` still follow the Turborepo CLI.`]}),`\n`,_jsx(Heading,{level:`2`,id:`branch-protection`,children:`Branch protection`}),`\n`,_jsxs(_components.p,{children:[`Build cache branch protection is available in `,_jsx(_components.a,{href:`https://app.blacksmith.sh/settings/caching`,children:_jsx(_components.strong,{children:`Settings > Caching`})}),`, under `,_jsx(_components.strong,{children:`Dependencies`}),`. When enabled, only jobs running on the default branch (`,_jsx(_components.code,{children:`push`}),`, `,_jsx(_components.code,{children:`schedule`}),`, `,_jsx(_components.code,{children:`workflow_dispatch`}),`) or in a merge queue can write to the cache. Every other job gets read-only access. The setting is off by default and applies to every build cache at once.`]}),`\n`,_jsx(_components.p,{children:`Fork pull requests get no Turborepo remote cache at all, regardless of this switch.`}),`\n`,_jsx(Heading,{level:`2`,id:`task-outputs`,children:`Task outputs`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A hit restores only the files named in `,_jsx(_components.code,{children:`outputs`}),` for that task. If the task writes other files, Turborepo replays the log and skips those files. A later step can then fail looking for a generated client. Every file the task creates belongs in `,_jsx(_components.code,{children:`outputs`}),`.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tasks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"build\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"outputs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dist/**\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\".next/**\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"!.next/cache/**\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Do not list `,_jsx(_components.code,{children:`.next/cache/**`}),`. It changes on every build, and the upload is large for a hash that will not match the next run. Turborepo’s guide to `,_jsx(_components.a,{href:`https://turborepo.dev/docs/crafting-your-repository/caching#specifying-outputs`,children:`specifying outputs`}),` covers the full rules.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limitations`,children:`Limitations`}),`\n`,_jsxs(_components.p,{children:[`The cache runs on the runner. A job that uses `,_jsx(_components.a,{href:`https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container`,children:_jsx(_components.code,{children:`container:`})}),` cannot reach it, and neither can `,_jsx(_components.code,{children:`turbo`}),` inside `,_jsx(_components.code,{children:`docker build`}),`. The log says `,_jsx(_components.code,{children:`Remote caching disabled`}),`, and the tasks run.`]}),`\n`,_jsxs(_components.p,{children:[`Tasks that depend on external state should stay uncached. A test that reads a database, or anything that depends on the clock, is replayed when the inputs Turborepo can see are unchanged. Set `,_jsx(_components.code,{children:`\"cache\": false`}),` on those tasks.`]}),`\n`,_jsx(Heading,{level:`2`,id:`logs-and-the-cache-page`,children:`Logs and the Cache page`}),`\n`,_jsxs(_components.p,{children:[`The job log should contain `,_jsx(_components.code,{children:`Remote caching enabled`}),`. Tasks that matched print `,_jsx(_components.code,{children:`cache hit, replaying logs`}),`. A run where every task hit prints `,_jsx(_components.code,{children:`FULL TURBO`}),`. For the full picture, open the `,_jsx(_components.a,{href:`https://app.blacksmith.sh/cache`,children:`Cache page`}),`, choose a repository, and open the `,_jsx(_components.strong,{children:`Turborepo`}),` tab.`]}),`\n`,_jsx(`div`,{className:`product-embed not-prose`,children:_jsx(`div`,{className:`product-embed-window`,children:_jsxs(`div`,{className:`product-embed-screen`,style:{backgroundImage:`url(data:image/webp;base64,UklGRsYMAABXRUJQVlA4ILoMAAAwTACdASpAAcgAPtFeqE6oJSOjKZXakQAaCWdu1SWGJj8eM9J6axfbdwOax1Ir0AOmJyC30f2tZAf5fu79afe7LmQD9ZV8++vHG/34dAbix/w/pQbwAMK0djJswcT4uV4fFIint96zzW9V54JH7vd7uPx8C5nJ952rRaX+Jw2n054F1mBnMk07V74y441M0+vGqOpck9N27uIBvGNEV/N7cnYIfcfy3hKA9kmP/mdG49PyKXQNXd1v217J5oYVapo9MT3l4en2demh35wxR5sZHcELnjUQRZ9uSby/hUwLKIu7cWRZz3JMsbK7TP6Ugd6uEL2kATB82hhl9MG/j/CMvktCSrCJF4+cpIol4PhpSxUYrIChQ4TBIcO/C4ecQ8m+e413AkaneFst5tpLQ0VM3xt6AU3VscKo2EUk9nKFOKQlC8o7DlJef6fbCFHi7/CoCBcgL4+j+nmN6L3ClUZ3SLcFfynME+wQ2r5WGsW77IoRJ7hdlv8r9cpUimUymUyzWJhJa9gPs5oklugFNh4V6rv2iV5LQJtqYgdQ7ZCTOWmWLUvF3fIwnTBq36euUNSBhJbfyy6Sr2dc1cS5hdNrQQt4vUjBDS1xdwP450Uo+0ixGSiRJ6/+/v6Nq/qjkMXLW5L1d7mYTEb8U7VZiR+MhBA9XKVCYWKqVMmdCy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2Ho/JjfjMP2YXv8te7opSWboiSgsRB0itXbte47GUU2TPKtQIT9PiM/0yggSBelc4UjL21b9rFbH0mUck3bdhAQCRowAYYvpT/rsqfF1AiQ3+bn1Y2Gx9CboJyKOKvXTEtv1694odONo/9DZaESANRWwrR99RkQWTNDn74sZgSmvLdSDV++XfFic08riIepRvUjNNaEypI5i+KO/cC5f/xqHysjMstYD+KLBzbgsfYCmm8qkcNf19+VWGNHFWqQ06E8/dnLmu8L8V1OYAfL25hT4W1TWP+dPXhwD4HlN+sIm+pCG8qcrpGStDJL56SysPdH2ZW8srEBSJ+wel4LSVdziaKnf+yYqv2gKLQNtrfeLOZObzB9JNpTRU53aiEQwUNnN14Qk+VjJ/xNFT6YLlcWd1HM0Zr78q2t+Uz2HHGH+oQ4eE0VOuXK/lpXF1HqHAAAAAAA=)`},children:[_jsx(`img`,{className:`product-embed-poster`,src:`https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=2e60c0f82b94cb417cc054cce944c96b`,alt:`Opening the Turborepo tab on a repository's Cache page to see hit rate, transfers, build duration and recent jobs`,noZoom:true,\"data-og-width\":`2240`,width:`2240`,\"data-og-height\":`1400`,height:`1400`,\"data-path\":`images/embeds/cache-turbo-tab.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?w=280\u0026fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=cac62da7f267732633f37716619c8a1e 280w, https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?w=560\u0026fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=a023fad748b602d43d76a104b6e85ca0 560w, https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?w=840\u0026fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=03c06afdc29ee7092755ca3be90a32d9 840w, https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?w=1100\u0026fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=237fd0799c2799e6c8086395404cd49d 1100w, https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?w=1650\u0026fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=a5c7d500f313ad80d6d2edb441787ce8 1650w, https://mintcdn.com/blacksmith/qXGgMwrQ3nf-E1Tw/images/embeds/cache-turbo-tab.png?w=2500\u0026fit=max\u0026auto=format\u0026n=qXGgMwrQ3nf-E1Tw\u0026q=85\u0026s=51233a171712a8d4da99b705eeb681c9 2500w`}),_jsx(_MdxComponentBoundary,{name:`ProductEmbed`,children:_jsx(ProductEmbed,{story:`docs-embeds-cache--turbo-tab`,width:1120,height:700,title:`Opening the Turborepo tab on a repository's Cache page to see hit rate, transfers, build duration and recent jobs`})})]})})}),`\n`,_jsx(_components.p,{children:`Hit rate there counts what your runs actually experienced. The first builds populate the cache, so compare hit rate and step durations across later runs.`}),`\n`,_jsxs(_components.p,{children:[`Blacksmith evicts entries that are no longer read. The same page shows what the repository is storing. Turning `,_jsx(_components.strong,{children:`Turborepo build cache`}),` off deletes the organization’s Turborepo cache.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{ProductEmbed,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Turborepo Build Caching","sidebarTitle":"Turborepo","description":"Blacksmith transparently caches your Turborepo task outputs across runs","icon":"/images/turborepo-icon.svg","href":"/blacksmith-caching/turborepo-build-caching"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[148,2665,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Enable Turborepo build caching","slug":"enable-turborepo-build-caching","depth":2,"children":[{"title":"Existing remote caches","slug":"existing-remote-caches","depth":3,"children":[]}]},{"title":"Branch protection","slug":"branch-protection","depth":2,"children":[]},{"title":"Task outputs","slug":"task-outputs","depth":2,"children":[]},{"title":"Limitations","slug":"limitations","depth":2,"children":[]},{"title":"Logs and the Cache page","slug":"logs-and-the-cache-page","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/blacksmith/68d485bc83951428/rb2b.js","/_mintlify/custom/blacksmith/34754e950d334b05/embed-warmup.js"],"subdomain":"blacksmith","siteName":"Blacksmith","title":"Turborepo Build Caching - Blacksmith","contextualStarterQuestions":[],"lastModified":"2026-11-16T23:19:54.500Z","originalFileLocation":"blacksmith-caching/turborepo-build-caching.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Blacksmith transparently caches your Turborepo task outputs across runs\">\u003cmeta data-mint-head name=\"application-name\" content=\"Blacksmith\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Turborepo Build Caching - Blacksmith\">\u003cmeta data-mint-head property=\"og:description\" content=\"Blacksmith transparently caches your Turborepo task outputs across runs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Blacksmith\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://blacksmith.mintlify.site/_mintlify/api/og/v2?division=Remote+Build+Cache\u0026amp;title=Turborepo+Build+Caching\u0026amp;description=Blacksmith+transparently+caches+your+Turborepo+task+outputs+across+runs\u0026amp;theme=20ea005b887f7bf11bf0e974\u0026amp;signature=a9c0472a64c379369c38648c6234677321246da32f95c4d7f380ea3af80bf5de\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Turborepo Build Caching - Blacksmith\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Blacksmith transparently caches your Turborepo task outputs across runs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://blacksmith.mintlify.site/_mintlify/api/og/v2?division=Remote+Build+Cache\u0026amp;title=Turborepo+Build+Caching\u0026amp;description=Blacksmith+transparently+caches+your+Turborepo+task+outputs+across+runs\u0026amp;theme=20ea005b887f7bf11bf0e974\u0026amp;signature=a9c0472a64c379369c38648c6234677321246da32f95c4d7f380ea3af80bf5de\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/blacksmith/2q4HNC6AytjX39ui/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Blacksmith\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#393C00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/blacksmith-caching/turborepo-build-caching.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.blacksmith.sh/#organization\",\"name\":\"Blacksmith\",\"url\":\"https://docs.blacksmith.sh\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/blacksmith/TP7SlQhj6komojne/logo/blacksmith.svg?fit=max\u0026auto=format\u0026n=TP7SlQhj6komojne\u0026q=85\u0026s=3309b1dface9b871016167449c254539\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.blacksmith.sh#website\",\"name\":\"Blacksmith\",\"url\":\"https://docs.blacksmith.sh\",\"publisher\":{\"@id\":\"https://docs.blacksmith.sh/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching#webpage\",\"url\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching\",\"name\":\"Turborepo Build Caching\",\"description\":\"Blacksmith transparently caches your Turborepo task outputs across runs\",\"dateModified\":\"2026-11-16T23:19:54.500Z\",\"isPartOf\":{\"@id\":\"https://docs.blacksmith.sh#website\"},\"breadcrumb\":{\"@id\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Caching\",\"item\":\"https://docs.blacksmith.sh/blacksmith-caching/dependencies-actions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Remote Build Cache\",\"item\":\"https://docs.blacksmith.sh/blacksmith-caching/bazel-build-caching\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Turborepo Build Caching\",\"item\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching#article\",\"headline\":\"Turborepo Build Caching\",\"name\":\"Turborepo Build Caching\",\"description\":\"Blacksmith transparently caches your Turborepo task outputs across runs\",\"url\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching\",\"mainEntityOfPage\":{\"@id\":\"https://docs.blacksmith.sh/blacksmith-caching/turborepo-build-caching#webpage\"},\"dateModified\":\"2026-11-16T23:19:54.500Z\",\"publisher\":{\"@id\":\"https://docs.blacksmith.sh/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.blacksmith.sh#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Blacksmith\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Blacksmith\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/blacksmith-caching/turborepo-build-caching.md","siteName":"Blacksmith","nav":{"global":{"anchors":[{"anchor":"Status","icon":"signal-bars","href":"https://status.blacksmith.sh"},{"anchor":"Support","icon":"bell-concierge","href":"https://app.blacksmith.sh/?support=open"},{"anchor":"Security","icon":"lock","href":"https://www.blacksmith.sh/security"},{"anchor":"Pricing","icon":"dollar-sign","href":"https://www.blacksmith.sh/pricing"},{"anchor":"Console","icon":"square-terminal","href":"https://app.blacksmith.sh"}]},"tabs":[{"tab":"GitHub Actions","icon":"github","groups":[{"group":"Getting Started","pages":[{"title":"Quickstart","description":"Try the fastest way to run your GitHub Actions in under 5 minutes","icon":"play","href":"/introduction/quickstart"},{"title":"GitHub Enterprise","description":"Run Blacksmith on GitHub Enterprise Server and Cloud","icon":"server","href":"/introduction/github-enterprise"}]},{"group":"2x Faster Runners","pages":[{"title":"Instance Types","description":"Blacksmith runners are 2x faster and costs 67% less than GitHub-hosted runners","icon":"person-running-fast","href":"/blacksmith-runners/overview"},{"title":"Right-sizing","description":"Find jobs on the wrong runner size and move them in one PR","icon":"scale-balanced","href":"/blacksmith-runners/rightsizing"},{"title":"Unlimited concurrency","description":"Blacksmith never caps how many jobs or vCPUs you run at once","icon":"infinity","href":"/blacksmith-runners/concurrency"},{"title":"Flex scheduling","description":"Some CI jobs can wait. Run them at 40% off","icon":"moon","href":"/blacksmith-runners/flex-scheduling"},{"title":"Static IP","description":"Use Blacksmith runners with a dedicated static IP","icon":"bolt","href":"/blacksmith-runners/static-ip"}]},{"group":"Caching","pages":[{"title":"4x Faster Actions Cache","description":"Blacksmith automatically caches your dependencies to speed up your workflows","icon":"github","href":"/blacksmith-caching/dependencies-actions"},{"title":"40x Faster Docker Builds","description":"Blacksmith can cache your Docker layers to speed up your workflows","icon":"layer-group","href":"/blacksmith-caching/docker-builds"},{"title":"Faster Container Init","description":"Blacksmith caches Docker images across runs to eliminate pull and extraction overhead","icon":"cube","href":"/blacksmith-caching/docker-container-caching"},{"title":"Faster Git Checkouts","description":"Blacksmith can cache your Git repositories to speed up checkouts across runs","icon":"code-branch","href":"/blacksmith-caching/git-checkout-caching"},{"title":"Sticky Disks","description":"Blacksmith optionally offers Sticky Disks to speed up your workflows","icon":"hard-drive","href":"/blacksmith-caching/dependencies-sticky-disks"},{"title":"Machine definitions","description":"Blacksmith bakes your setup steps into a machine image to speed up your workflows","icon":"server","href":"/blacksmith-caching/machine-definitions"},{"group":"Remote Build Cache","icon":"cubes","pages":[{"title":"Bazel Build Caching","sidebarTitle":"Bazel","description":"Blacksmith transparently caches your Bazel build artifacts with zero configuration","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/bazel-icon.svg","href":"/blacksmith-caching/bazel-build-caching"},{"title":"Go Build Caching","sidebarTitle":"Go","description":"Blacksmith caches your Go builds and test results across runs","icon":"golang","href":"/blacksmith-caching/go-build-caching"},{"title":"Turborepo Build Caching","sidebarTitle":"Turborepo","description":"Blacksmith transparently caches your Turborepo task outputs across runs","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/turborepo-icon.svg","href":"/blacksmith-caching/turborepo-build-caching"},{"title":"Nx Build Caching","sidebarTitle":"Nx","description":"Blacksmith restores Nx task outputs across runs","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/nx-icon.svg","tag":"Opt-in","href":"/blacksmith-caching/nx-build-caching"}]}]},{"group":"Selective Execution","pages":[{"title":"Vitest Test Selection","sidebarTitle":"Vitest","tag":"Beta","description":"Blacksmith runs only the Vitest tests a change can affect","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/vitest-icon-mono.svg","href":"/blacksmith-selective-execution/vitest"},{"title":"Jest Test Selection","sidebarTitle":"Jest","tag":"Beta","description":"Blacksmith runs only the Jest tests a change can affect","icon":"vial","href":"/blacksmith-selective-execution/jest"},{"title":"Mocha Test Selection","sidebarTitle":"Mocha","tag":"Beta","description":"Blacksmith runs only the Mocha tests a change can affect","icon":"mug-hot","href":"/blacksmith-selective-execution/mocha"}]},{"group":"Testboxes","pages":[{"title":"Testboxes","tag":"Beta","description":"Let coding agents run CI against local changes, instantly","icon":"flask-vial","href":"/blacksmith-testbox/overview"}]},{"group":"CLI","pages":[{"title":"Overview","description":"Allow your agents to access Blacksmith usage data through the terminal","icon":"terminal","href":"/blacksmith-cli/overview"},{"title":"Cache","description":"List and delete cache entries from the terminal","icon":"database","href":"/blacksmith-cli/cache"},{"title":"Sticky disks","description":"List and delete sticky disks from the terminal","icon":"hard-drive","href":"/blacksmith-cli/stickydisk"},{"title":"Jobs","description":"Inspect job runs and aggregate CPU/memory metrics","icon":"list-check","href":"/blacksmith-cli/jobs"},{"title":"Logs","description":"Search and analyze CI logs across your organization from the terminal","icon":"magnifying-glass-chart","href":"/blacksmith-cli/logs"},{"title":"Usage and cost reporting","description":"Pull your Blacksmith usage and cost data programmatically for billing and cost reporting workflows","icon":"file-invoice-dollar","href":"/blacksmith-cli/usage"},{"title":"Testbox","description":"Testbox CLI commands and flags","icon":"flask-vial","href":"/blacksmith-cli/testbox"}]},{"group":"Observability","pages":[{"title":"Run History","description":"Fastest way to search, filter, and debug past CI runs on Blacksmith runners","icon":"rectangle-history","href":"/blacksmith-observability/history"},{"title":"Logs","description":"Fastest way to search and filter logs across all CI jobs running on Blacksmith runners","icon":"magnifying-glass","href":"/blacksmith-observability/logs"},{"title":"SSH Access","description":"Fastest way to debug running jobs and inspect VM state","icon":"terminal","href":"/blacksmith-observability/ssh-access"},{"title":"Monitors","description":"The fastest way to debug your CI jobs","icon":"bell","href":"/blacksmith-observability/monitors"},{"title":"Metrics","description":"Easiest way to monitor machine metrics on Blacksmith runners","icon":"chart-area","href":"/blacksmith-observability/metrics"},{"title":"Test Analytics","description":"Easiest way to monitor your test suite health across your team","icon":"vial","href":"/blacksmith-observability/test-analytics"},{"title":"CI Analytics","description":"Fastest way to monitor your GitHub Actions performance and costs across your team","icon":"chart-line-up","href":"/blacksmith-observability/dashboard"}]},{"group":"Administration","pages":[{"title":"Permissions","description":"How GitHub permissions map to Blacksmith access","icon":"shield-check","href":"/blacksmith-administration/permissions"},{"title":"GitHub App","description":"Permissions the Blacksmith GitHub App requests, and which product features use them","icon":"github","href":"/blacksmith-administration/github-app"},{"title":"Network \u0026 IP Allowlisting","description":"Control plane IPs to allowlist in GitHub for Blacksmith to register runners","icon":"globe","href":"/blacksmith-administration/network-allowlisting"}]},{"group":"Support and Terms","pages":[{"title":"Settings","description":"Learn more about the Blacksmith Settings page","icon":"gear","href":"/introduction/settings"},{"title":"Terms of Service","icon":"memo-pad","description":null,"href":"/about/terms-of-service"},{"title":"Privacy Policy","icon":"lock","description":null,"href":"/about/privacy-policy"},{"title":"Support Terms","icon":"headset","description":null,"href":"/about/support-terms"},{"title":"Data Processing Addendum","icon":"file-contract","rss":true,"description":null,"href":"/about/data-processing-addendum"},{"title":"Sub-processors","icon":"users","rss":true,"description":null,"href":"/about/sub-processors"}]}]},{"tab":"[code]smith","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/codesmith-icon.svg","groups":[{"group":"[code]smith","pages":[{"title":"Why [code]smith","description":"You handed the task to an agent. Why does it stop when you close your laptop?","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/codesmith-icon.svg","href":"/codesmith/why"},{"title":"Wait, it can do that?","description":"Each example replays a [code]smith session and ends with a prompt you can try on your own code.","icon":"sparkles","href":"/codesmith/examples"},{"title":"Get started","description":"Connect GitHub, then send your first task.","icon":"rocket","href":"/codesmith/get-started"},{"title":"Integrations","description":"Extend [code]smith with external MCP servers to debug production systems and add context","icon":"plug","href":"/codesmith/integrations"},{"title":"Machine definitions","description":"Let [code]smith run your tests before it opens a PR","icon":"server","href":"/codesmith/machine-definitions"},{"title":"Pricing \u0026 FAQs","description":"What [code]smith and Proof cost, and how to keep spend in check.","icon":"circle-dollar","href":"/codesmith/pricing-and-faqs"}]},{"group":"Support and Terms","pages":[{"title":"Settings","description":"Learn more about the Blacksmith Settings page","icon":"gear","canonical":"https://docs.blacksmith.sh/introduction/settings","noindex":true,"href":"/codesmith/settings"},{"title":"Terms of Service","icon":"memo-pad","canonical":"https://docs.blacksmith.sh/about/terms-of-service","noindex":true,"description":null,"href":"/codesmith/terms-of-service"},{"title":"Privacy Policy","icon":"lock","canonical":"https://docs.blacksmith.sh/about/privacy-policy","noindex":true,"description":null,"href":"/codesmith/privacy-policy"},{"title":"Support Terms","icon":"headset","canonical":"https://docs.blacksmith.sh/about/support-terms","noindex":true,"description":null,"href":"/codesmith/support-terms"},{"title":"Data Processing Addendum","icon":"file-contract","canonical":"https://docs.blacksmith.sh/about/data-processing-addendum","noindex":true,"description":null,"href":"/codesmith/data-processing-addendum"},{"title":"Sub-processors","icon":"users","canonical":"https://docs.blacksmith.sh/about/sub-processors","noindex":true,"description":null,"href":"/codesmith/sub-processors"}]}]},{"tab":"Proof","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/proof-icon.svg","groups":[{"group":"Trust, but verify","pages":[{"title":"Proof","tag":"Beta","description":"Runs your code change and posts visual evidence that you can check in seconds.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/blacksmith/images/proof-icon.svg","href":"/proof/overview"},{"title":"Proof rules","description":"Tell Proof which pull requests are worth an automatic run.","icon":"filter","href":"/proof/proof-md"},{"title":"Pricing","description":"What Proof costs and how to control how often it runs.","icon":"circle-dollar","href":"/proof/pricing"}]}]}]},"basePath":"","title":"Turborepo Build Caching - Blacksmith","deploymentId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","buildId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","dynamics":[],"chunks":[]}