Running work
Declaring your environment
Pin an exact Node or Python version and run your own install steps from .catalyst/catalyst.toml.
Each phase starts from Catalyst’s image. In the [environment] section of .catalyst/catalyst.toml you can pin an exact Node or Python version and add your own setup commands. A declaration takes effect when the file merges to the default branch, as The settings file describes.
A Node project with a lockfile
Section titled “A Node project with a lockfile”Copy this into .catalyst/catalyst.toml for a repository that commits package-lock.json:
[environment]
[[environment.toolchains]]name = "node"version = "24.19.0"
[[environment.setup]]name = "install-dependencies"run = ["npm", "ci"]timeout_seconds = 300cache_key_files = ["package-lock.json"]
[environment.container]egress = ["nodejs.org", "registry.npmjs.org"]At the start of each phase, this:
- Installs Node 24.19.0 if the image carries a different version, and uses it for the rest of the phase.
node --versionprintsv24.19.0. - Runs
npm ci, which installs exactly whatpackage-lock.jsonlists. Commit the lockfile;npm cifails without one. - Records
nodejs.organdregistry.npmjs.orgas the hosts setup downloads from. See Network access.
We tested this example on Catalyst’s current image. Node 24.19.0 installed, npm ci passed, and the installed packages loaded.
Toolchains
Section titled “Toolchains”Each [[environment.toolchains]] entry has a name and a version. The version is an exact release, such as 24.19.0, or a range, such as >=24.
nodeandpythoncan be pinned to an exact version or a range. If the image already has a version that fits, nothing is installed. When several versions in the image fit a range, the highest is used. When none fits, setup downloads and installs the highest released version that does.rustcan be pinned to an exact version, such as1.98.1, or to a minor release, such as1.98. If the image carries a different version, setup installs yours with rustup, andrustcandcargouse it for the rest of the phase.pnpmandyarncan be pinned to an exact version, such as the one in yourpackage.jsonpackageManagerfield. Setup activates that version with corepack before your setup steps run, sopnpm --versionprints it.npmcan be pinned to an exact version, the same way. Setup activates it with corepack and puts its command first on PATH, so a plainnpmcommand runs the pinned release even when Node is also pinned, whichever of the two is declared first.- Bun, Go, Ruby and Java are available at the version the image carries. Declaring a different version of one of these stops the phase before the agent starts, with the toolchain reported missing. Leave the entry out, or declare the version the image carries.
A version that cannot be installed, such as a Rust release that does not exist, stops the phase before the agent starts. The report names the toolchain and version and quotes the installer’s own error.
What Catalyst’s image includes lists the version of each one.
Setup steps
Section titled “Setup steps”Each [[environment.setup]] step runs in order, in your repository, before the agent starts.
name: lowercase letters, digits and hyphens, starting with a letter, at most 64 characters.run: the command as a list of arguments, not a shell string. For shell features, use["sh", "-c", "..."]and keep the command on one line.timeout_seconds: 1 to 3600.cwd: optional, a folder inside the repository to run in.cache_key_files: the files that decide what the step installs, usually its lockfile. See Whatcache_key_filesis for.
What cache_key_files is for
Section titled “What cache_key_files is for”Every workspace’s phases start from the same standard image. Your setup steps add what your repository needs on top of it, such as the packages npm ci installs. Setup runs in a copy of your repository cloned from GitHub. Nothing is copied from your own machine.
cache_key_files tells Catalyst which files decide a step’s result. When those files have not changed, Catalyst reuses the step’s last successful run in the same copy of your repository instead of repeating it. A step runs again when:
- its listed files change
- its last run failed
- you change the toolchains, system packages or steps in this declaration
- Catalyst updates its standard image
- an earlier step runs in the same setup, because that step may have replaced what this one built
A step without cache_key_files runs every time, so every step after it runs too. A fresh copy of your repository runs every step.
Command-line tools
Section titled “Command-line tools”Each [[environment.clis]] entry names a command your phases need. name is the command as you type it, and install says where it comes from.
[[environment.clis]]name = "cowsay"install = { source = "npm", package = "cowsay", version = "1.6.0" }
[environment.container]egress = ["registry.npmjs.org"]source = "npm"installs the package from the public npm registry before the agent starts. Its commands are onPATHfor your setup steps and for the agent, socowsay --versionprints1.6.0.- Write an exact
versionto pin it. A range, a tag such aslatest, or no version is resolved the first time it installs and kept until you change the entry. - The install uses no login, so the package must be public.
source = "image"uses a command Catalyst’s image already has. What Catalyst’s image includes lists them.
If the package does not install, or its command does not run, the phase stops before the agent starts and names what did not install.
Network access
Section titled “Network access”egress under [environment.container] lists the hosts your setup downloads from. Catalyst checks the list’s format but does not apply it to network access yet, so adding a host neither opens nor closes anything today. Setup can currently reach public hosts such as nodejs.org (Node installs) and registry.npmjs.org (npm). Keep the list accurate anyway, including any private registry your install uses, so it is ready when the list takes effect.
Not supported yet
Section titled “Not supported yet”| What | What happens today | What to do |
|---|---|---|
A Rust channel such as stable or nightly |
Not supported, so a phase never changes Rust version between runs | Declare an exact Rust version |
| A version range for npm, pnpm or Yarn | Not supported | Write the exact version from packageManager |
engines, packageManager and rust-toolchain.toml read during a phase |
A phase reads only [[environment.toolchains]] |
Declare the same versions there, such as name = "pnpm" with version = "11.22.0" |
[[environment.system_packages]] for a package the image lacks |
Catalyst installs it with apt where the machine allows it. Where it cannot, some phases stop and report the missing package, and others run without it | Declare the package, and check the ticket’s Agent work tab for a missing-package report |
What Catalyst’s image includes
Section titled “What Catalyst’s image includes”These tables are generated from the image’s own build file each time these docs are built, so they show the versions your phases run on. The first version listed is the default on PATH.
| Language | Version in the image | Override in [[environment.toolchains]] |
|---|---|---|
| Node.js | 24.21.0 (default), 22.23.3, 26.10.0 | Yes, any exact version |
| Python | 3.12.14 (default), 3.13.15 | Yes, any exact version |
| Go | 1.27.1 | Not yet. Declare the image's version or leave it out |
| Ruby | 3.4.10 (default), 3.3.12 | Not yet. Declare the image's version or leave it out |
| Java | 21.0.11 Eclipse Temurin | Not yet. Declare the image's version or leave it out |
| Rust | 1.98.0 with cargo | Not yet. Declare the image's version or leave it out |
| Bun | 1.4.2 | No. Catalyst runs on it |
| PHP | 8.3 Ubuntu 24.04 package | No |
| Tool | Version in the image |
|---|---|
| npm | 11.19.1 with the default Node.js |
| Corepack | 0.36.0 |
| pnpm | 11.25.0 |
| Yarn | 1.22.22 (default), 4.18.0 1.22.22 is yarn on PATH; 4.18.0 through Corepack |
| Bundler | 4.0.19 |
| uv | 0.12.8 |
| Poetry | 2.4.2 |
| pytest | 9.1.1 |
| Ruff | 0.16.9 |
| mypy | 2.3.1 |
| Black | 26.5.1 |
| Maven | 3.9.16 |
| Gradle | 9.7.1 |
| Composer | 2.9.3 |
| ESLint | 10.11.0 |
| Prettier | 3.9.9 |
| Playwright | 1.59.1 with Chromium |
| mise | 2026.8.14 |
| Git | 2.55.0 |
GitHub CLI (gh) | 2.99.0 |
| PostgreSQL | 16 Ubuntu 24.04 package |
| Redis | Ubuntu 24.04 package |
| git-lfs, jq, ripgrep, cmake, sqlite3, shellcheck, build-essential | Ubuntu 24.04 package |
Languages, npm, pnpm and Yarn can be pinned in [[environment.toolchains]]. A version range works for Node and Python. The other tools in the second table cannot be pinned in the declaration yet.
- The settings file for the rest of
.catalyst/catalyst.tomland how a change takes effect. - Environment and secrets for the variables and secrets a build reads.