Set up Vibe
Vibe (published on npm as vibelang) is a fork of TypeScript for Effect programs. Follow these steps in order; if a command's output differs from what is shown, stop and report the command and output. Vibe is v0: expect breaking changes and do not use it in production.
1. Check the tools
- Node: run
node --versionand require Node22.22.3(22.x) or Node24.11.1or later. - Bun (optional): run
bun --versionand require1.4.2or later (needed to run sources with Bun). - Registry: run
npm view vibelang@0.0.15 versionand expect0.0.15.E404means the configured registry lacks that version — report the registry and error before continuing.
Version 0.0.15 provides native packages for Windows, macOS, Linux on arm64 and x64.
2. Detect the project
Inspect the project root and record:
| Fact | Signal | Result |
|---|---|---|
| Project | No package.json | New project |
package.json present | Existing project | |
| Package manager | bun.lock or bun.lockb | Bun |
package-lock.json, or no lockfile | npm | |
pnpm-lock.yaml | pnpm (configure workspace pin, then pnpm add) | |
yarn.lock | Yarn (configure transitive pin, then yarn add) | |
| Build | vite or vitest in package.json, or vite.config.* / vitest.config.* | Vite |
webpack, rollup, esbuild, @rspack/core, or bun build | vibelang-unplugin | |
metro or expo in package.json, or metro.config.* | Metro | |
| None of these | vibelang CLI | |
| Framework | next or astro in package.json | Framework setup below |
wrangler or wrangler.toml / wrangler.jsonc | Cloudflare Workers | |
react, vue, or svelte with Vite | React, Vue, or Svelte (@sveltejs/kit and nuxt are not covered here) | |
| Editor | .vscode/ or .cursor/ | VS Code or Cursor |
.zed/ | Zed | |
| None of these | Ask the user |
3. Follow the matching pages
Follow each matching page in order: project → build or framework → editor.
| Case | Page |
|---|---|
| New project | Start a new project (includes build and tests) |
| Existing project | Add VibeLang to an existing project |
vibelang CLI (replaces tsc) | Build with the vibelang CLI |
| Vite or Vitest (plain) | Vite and Vitest |
Effect UI (@effect/ui) with Vite or OpenTUI | Effect UI |
| React, Vue, or Svelte with Vite | React, Vue, or Svelte |
| React Native or Expo (Metro) | React Native and Metro |
| Next.js (webpack) or Astro | Framework setup below |
| Cloudflare Workers | Cloudflare Workers |
| dprint formatting | Format with dprint |
| VS Code or Cursor | VS Code and Cursor |
| Neovim | Neovim |
| Zed | Zed |
| Other LSP editor | Other editors |
| Coding agents | Coding agents |
For webpack, Rspack, Rollup, Rolldown, esbuild, and bun build, install vibelang@0.0.15 and vibelang-unplugin@0.0.15 as dev dependencies and follow the vibelang-unplugin configuration. Vite and Vitest use vibelang-vite.
4. Verify the setup
npx vibelang --version
npx vibelang --noEmitExpect VibeLang 0.0.15 (TypeScript 7.1.0-dev) from the first command and empty output (exit 0) from the second. Then run the project's build and test scripts (both must exit 0) and report the pages followed and command outputs.
Framework setup
Complete Add VibeLang to an existing project first. Keep a tsconfig.json that includes .vibe, .ts, and .tsx files; the bundler requires it. Run npx vibelang --noEmit separately for whole-program checking.
Next.js with webpack
Install vibelang-unplugin@0.0.15 as a dev dependency. Next's Turbopack does not run webpack plugins, so use --webpack. In next.config.mjs:
import vibelang from "vibelang-unplugin/webpack"
export default {
typescript: { ignoreBuildErrors: true },
webpack(config) {
config.plugins.push(vibelang())
return config
}
}Next's stock TypeScript checker reads only compiler-emitted x.d.vibe.ts declarations (with allowArbitraryExtensions). Because ignoreBuildErrors bypasses that entire checker (including ordinary TypeScript errors), run vibelang --noEmit in package.json:
{
"scripts": {
"dev": "next dev --webpack",
"check": "vibelang --noEmit",
"build": "vibelang --noEmit && next build --webpack"
}
}Keep Next's generated type includes in tsconfig.json, and run npm run check during development to catch errors in files outside the bundle. In components, run imported Effects (e.g. Effect.runPromise in async server components with layers provided) before rendering — never pass an Effect object directly to React.
Astro with Vite
Install vibelang-vite@0.0.15 as a dev dependency. In astro.config.mjs:
import { defineConfig } from "astro/config"
import vibelang from "vibelang-vite"
export default defineConfig({ vite: { plugins: [vibelang()] } })Ensure tsconfig.json includes src or src/**/*.vibe. Run Effects in .astro frontmatter before rendering (use await Effect.runPromise(...) for async Effects):
---
import { Effect } from "effect"
import { greet } from "../lib/greeter.vibe"
const message = Effect.runSync(greet("Astro"))
---
<h1>{message}</h1>Run npx vibelang --noEmit and npx astro build; Astro's own checker does not gain .vibe support from vibelang-vite.
Last resort: keep TypeScript file names
If a project cannot use .vibe or .vibex extensions with the CLI, bundler plugins, framework setup, and editor integrations above, consider the experimental TypeScript shim. Read its stock-tool limitations first.