Machine definitions are in private beta. Join the waitlist.
Overview
Every [code]smith session starts in a fresh sandbox with your repository cloned but none of your toolchain installed: no pinned runtime, no package manager, no system packages or browsers your tests need. Without them, [code]smith can write a change but often can’t run it, so it learns whether the change works the way you would: push, wait for CI, read the failure, and try again. A machine definition describes the machine your code needs, once: an Ubuntu base, x64 or ARM, the setup script your CI jobs keep repeating, and the environment variables they expect, with secrets kept secret. Blacksmith builds it into a machine image, and [code]smith’s sandbox starts from that image, so a session begins with your dependencies already installed. You don’t have to write the definition from scratch: Blacksmith drafts one from what your recent jobs installed and what your workflows set up, and you review it before you publish it. A few examples of what a session can do with one:- In a Next.js storefront, change a checkout component and rerun the Playwright end-to-end suite, with Node 22, pnpm, Chromium, WebKit and the screenshot fonts already in place.
- In a Rust service, add a database migration and run
sqlx migrateandcargo nexteston the pinned nightly toolchain. - In a Python data pipeline, change a transform and run its tests on the right Python with uv and the Google Cloud SDK it calls.
![A [code]smith change timeline with and without a machine definition](https://mintcdn.com/blacksmith/fIh5FNAouRm6ygOj/images/embeds/machine-definitions-codesmith.png?fit=max&auto=format&n=fIh5FNAouRm6ygOj&q=85&s=329397f6d3abeb5d886a42944ebeb528)