Configure VibeKit with a Daytona Sandbox
npm install @vibe-kit/daytona
# Use Ubuntu 22.04 as the base image FROM ubuntu:22.04 # Install curl and git, update package list RUN apt-get update && apt-get install -y curl git ripgrep # Install Node.js 24.x RUN curl -sL https://deb.nodesource.com/setup_24.x | bash - && apt-get install -y nodejs # Confirm installations RUN node -v && npm -v && git --version # Install Claude Code globalliy RUN npm install -g @anthropic-ai/claude-code
# Use Ubuntu 22.04 as the base image FROM ubuntu:22.04 # Install curl and git, update package list RUN apt-get update && apt-get install -y curl git # Install Node.js 24.x RUN curl -sL https://deb.nodesource.com/setup_24.x | bash - && apt-get install -y nodejs # Confirm installations RUN node -v && npm -v && git --version # Install OpenAI Codex globally RUN npm install -g @openai/codex@latest
# Use Ubuntu 22.04 as the base image FROM ubuntu:22.04 # Install curl and git, update package list RUN apt-get update && apt-get install -y curl git # Install Node.js 24.x RUN curl -sL https://deb.nodesource.com/setup_24.x | bash - && apt-get install -y nodejs # Confirm installations RUN node -v && npm -v && git --version # Install OpenAI Codex globally RUN npm i -g opencode-ai@latest
import { VibeKit } from "@vibe-kit/sdk"; import { createDaytonaProvider } from "@vibe-kit/daytona"; const daytonaProvider = createDaytonaProvider({ apiKey: process.env.DAYTONA_API_KEY!, image: "codex-image", serverUrl: "https://app.daytona.io/api", }); const vibeKit = new VibeKit() .withAgent({ type: "claude", provider: "anthropic", apiKey: process.env.ANTHROPIC_API_KEY!, model: "claude-sonnet-4-20250514", }) .withSandbox(daytonaProvider); // Generate code const result = await vibeKit.generateCode({ prompt: "Build a Python FastAPI application", mode: "ask" }); // Get host URL (if applicable) const host = await vibeKit.getHost(8000); // Clean up await vibeKit.kill();
import { VibeKit, VibeConfig } from "@vibe-kit/sdk"; const config: VibeConfig = { ..., environment: { daytona: { // Required Daytona API key apiKey: "****", image: "codex-image", serverUrl: "https://app.daytona.io/api" }, }, };
DAYTONA_API_KEY=your_daytona_api_key_here
const daytonaProvider = createDaytonaProvider({ apiKey: process.env.DAYTONA_API_KEY!, image: "codex-image", serverUrl: "https://app.daytona.io/api", });