Skip to content

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.

VibeLang with your TypeScript tools

1. Check the tools

  • Node: run node --version and require Node 22.22.3 (22.x) or Node 24.11.1 or later.
  • Bun (optional): run bun --version and require 1.4.2 or later (needed to run sources with Bun).
  • Registry: run npm view vibelang@0.0.15 version and expect 0.0.15. E404 means 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:

FactSignalResult
ProjectNo package.jsonNew project
package.json presentExisting project
Package managerbun.lock or bun.lockbBun
package-lock.json, or no lockfilenpm
pnpm-lock.yamlpnpm (configure workspace pin, then pnpm add)
yarn.lockYarn (configure transitive pin, then yarn add)
Buildvite or vitest in package.json, or vite.config.* / vitest.config.*Vite
webpack, rollup, esbuild, @rspack/core, or bun buildvibelang-unplugin
metro or expo in package.json, or metro.config.*Metro
None of thesevibelang CLI
Frameworknext or astro in package.jsonFramework setup below
wrangler or wrangler.toml / wrangler.jsoncCloudflare Workers
react, vue, or svelte with ViteReact, Vue, or Svelte (@sveltejs/kit and nuxt are not covered here)
Editor.vscode/ or .cursor/VS Code or Cursor
.zed/Zed
None of theseAsk the user

3. Follow the matching pages

Follow each matching page in order: project → build or framework → editor.

CasePage
New projectStart a new project (includes build and tests)
Existing projectAdd 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 OpenTUIEffect UI
React, Vue, or Svelte with ViteReact, Vue, or Svelte
React Native or Expo (Metro)React Native and Metro
Next.js (webpack) or AstroFramework setup below
Cloudflare WorkersCloudflare Workers
dprint formattingFormat with dprint
VS Code or CursorVS Code and Cursor
NeovimNeovim
ZedZed
Other LSP editorOther editors
Coding agentsCoding 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 --noEmit

Expect 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

vibelang-unplugin in 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.