npm install -g @vibe-lang/vibe
# or
bun install -g @vibe-lang/vibe
Create a .env file with your API key:
ANTHROPIC_API_KEY=sk-ant-api03-xxxxxxxxxxxxx
Create hello.vibe:
import { env } from "system"
model claude = {
name: "claude-sonnet-4-20250514",
apiKey: env("ANTHROPIC_API_KEY"),
provider: "anthropic"
}
let greeting = vibe "Say hello in a creative way"
greeting
Run it:
vibe hello.vibe
Debugging Setup
Open a .vibe file
Set breakpoints by clicking the gutter
Press F5 or go to Run → Start Debugging
Select "Vibe Debug" configuration
Example Code
import { env } from "system"
model gpt = {
name: "gpt-4o",
apiKey: env("OPENAI_API_KEY"),
provider: "openai"
}
// Type-safe AI responses
let count: number = vibe "How many planets are in our solar system?" gpt
// Functions with AI
function summarize(content: text): text {
return vibe "Summarize in one sentence: {content}" gpt
}
// Custom tools for AI to use
tool search(query: text): json
@description "Search the web"
{
ts {
// TypeScript implementation
return { results: [] }
}
}
// Parallel execution
async let a = vibe "Task 1" gpt
async let b = vibe "Task 2" gpt
let combined = vibe "Combine {a} and {b}" gpt