#!/bin/bash set -euo pipefail apt-get update apt-get install -y curl git unzip build-essential # Install Node.js (required to run the letta CLI) curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs # Install Bun (required to build letta-code from source) curl -fsSL https://bun.sh/install | bash export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH" # Build letta-code from source at a pinned branch/ref LETTA_CODE_REPO="https://github.com/letta-ai/letta-code.git" LETTA_CODE_REF="{{ branch | default(commit | default('main')) }}" git clone "$LETTA_CODE_REPO" /tmp/letta-code cd /tmp/letta-code git checkout "$LETTA_CODE_REF" bun install bun run build npm link