Documentation Index
Fetch the complete documentation index at: https://docs.vibekit.sh/llms.txt
Use this file to discover all available pages before exploring further.
Daytona is an open-source runtime for executing AI-generated code in secure cloud sandboxes. Made for agentic & AI use cases. You can read more about it here.
Installation
First, install the Daytona provider package:
npm install @vibe-kit/daytona
How to use
To use Daytona with VibeKit, you need to create an image in the Daytona dashboard using the following DockerFile:
Claude Codex Dockerfile
# 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
OpenAI Codex Dockerfile
# 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
Opencode Dockerfile
# 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
Configuration
Using the provider directly
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();
Using configuration object
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"
},
},
};
ENV variables and secrets
You can use environment variables for your Daytona configuration:
DAYTONA_API_KEY=your_daytona_api_key_here
Then reference them in your code:
const daytonaProvider = createDaytonaProvider({
apiKey: process.env.DAYTONA_API_KEY!,
image: "codex-image",
serverUrl: "https://app.daytona.io/api",
});