Vibe
Write Effect programs in TypeScript syntax, with typed errors and services the compiler checks.
npm create vibelang@latest my-app
cd my-app
npm run startbun create vibelang@latest my-app
cd my-app
bun run startnpm create vibelang@latest my-app -- --ui
cd my-app
npm run devOverview
Vibe (published on npm as vibelang) brings compiler-checked soundness, zero-ceremony Effect syntax, and AI-era reliability to TypeScript, built on Effect. Every expected failure, dependency, stream, and state transition stays in the type system where both humans and coding agents get instant compiler feedback instead of silent runtime drift. The compiler emits ordinary Effect JavaScript and .d.vibe.ts declarations, so .ts files, npm packages, and the rest of the TypeScript ecosystem stay one import away.
Effect UI in Vibe
Build browser and terminal apps with @effect/ui using schema models, Command.Service fiber cancellation, effect function* progress streams, and exhaustive match in views — with zero Effect.try wrappers around UI constructors:
import { Command, Subscription, UiSchema } from "@effect/ui"
import { Html } from "@effect/ui/html"
schema UploadStatus = "Uploading" | "Done" | "Cancelled"
schema Upload { readonly id: number; readonly fileName: string; readonly progress: number; readonly status: UploadStatus }
const Msg = UiSchema.TaggedEnum({
Progressed: { id: Schema.Number, progress: Schema.Number },
Completed: { id: Schema.Number },
Cancelled: { id: Schema.Number }
})
// VIP-21 producer: compiles to a scoped Effect Stream for live subscriptions
effect function* progressTicks(id: number) {
for (let progress = 10; progress < 100; progress += 10) {
try sleep("100 millis")
yield Msg.Progressed({ id, progress })
}
}
// Exhaustive match in views: missing a status is a compile error
const actionButton = (h: Html.H<typeof Msg.Type>, upload: Upload) =>
match (upload.status) {
when "Uploading": h.button.on("click", Msg.Cancelled({ id: upload.id })).children("Cancel");
when "Cancelled": h.span("Cancelled");
when "Done": h.span("Done");
}Start an Effect UI app with npm create vibelang@latest my-app -- --ui, try live presets in the Playground, or explore the Effect UI guide and showcase apps: Domains, Concurrent Uploads, and Web + OpenTUI Snake.
One program, twice
interface User { id: string; name: string }
error UserNotFound { id: string }
service Users {
static readonly key = "app/Users"
find(id: string): User!UserNotFound
}
effect function greet(id: string) {
const users = try Users
const user = users.find(id) catch () => ({ name: "guest" })
return `Hello, ${user.name}`
}
const UsersLive = Layer.succeed(Users, {
find: effect (id: string) => ({ id, name: "Ada" })
})
effect function main() {
provide UsersLive {
try Console.log(try greet("ada")) // Hello, Ada
}
}
await runPromise(main())import { Console, Context, Data, Effect, Layer } from "effect"
interface User { id: string; name: string }
class UserNotFound extends Data.TaggedError("UserNotFound")<{ readonly id: string }> {}
class Users extends Context.Service<Users, {
find(id: string): Effect.Effect<User, UserNotFound>
}>()("app/Users") {}
const greet = (id: string) => Effect.gen(function* () {
const users = yield* Users
const user = yield* users.find(id).pipe(Effect.orElseSucceed(() => ({ name: "guest" })))
return `Hello, ${user.name}`
})
const UsersLive = Layer.succeed(Users, {
find: (id: string) => Effect.succeed({ id, name: "Ada" })
})
const main = Effect.gen(function* () {
yield* Console.log(yield* greet("ada"))
}).pipe(Effect.provide(UsersLive))
await Effect.runPromise(main)Both programs print Hello, Ada, and both run on Effect. error declares the tagged error class, service declares the dependency, effect function returns an Effect, try runs one, catch handles the declared failure, and provide supplies the layer. The compiler infers the type of greet as string!!Users, which is Effect<string, never, Users>. Welcome walks through this program, and Why Vibe? makes the case, including Effect's own argument against a language.
TypeScript stays one step away
The compiler is a fork of the TypeScript 7 compiler. It checks .vibe and .ts files in one program and emits JavaScript plus a .d.vibe.ts declaration beside each .vibe file, so TypeScript imports Vibe functions as ordinary Effect functions. A .ts file can sit beside any .vibe file. Based on Effect's Creating Effects, this adapter wraps an async function from a .ts file:
import { fetchTodo } from "./todos.ts" // (id: number, signal: AbortSignal) => Promise<string>
error TodoFailed { cause: unknown }
effect function getTodo(id: number) {
return try tryPromise({ try: (signal) => fetchTodo(id, signal), catch: (cause) => new TodoFailed({ cause }) })
}
// (id: number) => string!TodoFailed
effect function todoOrFallback(id: number) {
return retry(getTodo(id), Schedule.recurs(2)) catch () => "Todo unavailable"
}Effect, with syntax
Effect's functions and modules are in scope without imports. error, service, provide, try.all, fork, for concurrent, schema, data and match give the common features their own syntax, and every other Effect API keeps its library form. The cheat sheet puts every form beside the Effect code it replaces.
6.7% fewer tokens across the 47 cheat-sheet pairs, counted with o200k_base. VibeLang is longer in 20 pairs.
Where to go next
- Try in the browser: open the interactive Playground with live Effect UI previews, compiled Effect TypeScript output, and real-time diagnostics.
- Start: Welcome, Effect UI setup, or Getting Started for the starter project. You need Node
22.22.3(22.x) or Node24.11.1or later. Bun is optional, at 1.4 or later; running sources with Bun needs 1.4.2 or later. - Coming from Effect: the cheat sheet shows every change, and Vibe for Effect users explains the rules.
- Set up a project or editor: Set up Vibe covers new and existing projects, Effect UI, Vite, React, Vue, Svelte, VS Code, Neovim and Zed.
- Report or propose: report a bug in the published packages in GitHub Issues, with a minimal reproduction, or read the accepted VIPs and specification.
Compatibility. Supports
effect@^4.1.0(tested oneffect@4.1.6); keep@effect/platform-nodeand@effect/viteston matching4.1.xversions when used. No@effect/platform-node-sharedoverride is required.Use
vibe(orvibelang) to check.vibesource. Stocktscandvue-tscsee only thex.d.vibe.tsdeclarations the compiler writes, which resolve.vibeimports whenallowArbitraryExtensionsis on.For mixed editing in VS Code, let the Vibe server own TypeScript files: disable the built-in TypeScript and JavaScript Language Features extension for this workspace.
Vibe is in early alpha. The language will change in major, breaking ways, and it is not ready for production use. The release rehearsal creates, starts and tests a fresh starter on Linux x64 with npm and Bun before each release; macOS, Windows and Linux arm64 binaries are built and published, and what is in the alpha lists the platform matrix and open caveats.