import { VibeKit } from "@vibe-kit/sdk";
import { createNorthflankProvider } from "@vibe-kit/northflank";
const northflankProvider = createNorthflankProvider({
apiKey: process.env.NORTHFLANK_API_KEY!,
projectId: "your-project-id",
billingPlan: "nf-compute-200", // Optional: 2 vCPU & 4096GB RAM
persistentVolumeStorage: 10240, // Optional: 10GiB
});
const vibeKit = new VibeKit()
.withAgent({
type: "claude",
provider: "anthropic",
apiKey: process.env.ANTHROPIC_API_KEY!,
model: "claude-sonnet-4-20250514",
})
.withSandbox(northflankProvider);
// Generate code
const result = await vibeKit.generateCode({
prompt: "Create a React application",
mode: "ask"
});
// Get host URL (if applicable)
const host = await vibeKit.getHost(3000);
// Clean up
await vibeKit.kill();