Skip to main content

Start with a setup script

Use a project setup script as the starting point for custom dependencies. Tembo runs the script after cloning your repositories while it builds the project’s prepared environments. Anything the script installs or writes to disk becomes part of those environments. Add your script under Advanced setup when you create or edit a project. See Setup script for details.
tembo.nix is currently in beta and will be available to everyone very soon. If you have beta access, use the sections below to declare system packages and toolchains in your repository.

Prerequisites

  • You have a repository connected to Tembo.
  • You know which system packages or language toolchains your project needs.

Create tembo.nix

Create tembo.nix in your repository root with a default dev shell. Tembo uses devShells.x86_64-linux.default in the sandbox.
After you commit the file, new Tembo sessions use the dev shell automatically. Agents can then run commands that depend on those packages, such as go test, cargo test, or Java build tools.

Add packages

Add packages to the packages list. For example, this dev shell adds PostgreSQL client tools and pkg-config for projects that compile native dependencies:

Configure the shell

Use shellHook when the sandbox needs environment variables for local commands:
Keep secrets out of tembo.nix. Add secrets through your sandbox environment variables instead.

Tips

  • Keep tembo.nix focused on system packages and toolchains that your project needs.
  • Commit the file so Tembo can load it in every new session.
  • Use projects if installing dependencies still takes meaningful time at the start of each session.