Installation
The fastest way to start is the starter project, which pins every package at a compatible version.
Create it with npm:
npm create vibelang@latest my-app
cd my-app
npm run startWith Bun (optional):
bun create vibelang@latest my-app
cd my-app
bun run startThe native vibe (alias vibelang) compiler compiles .vibe sources to JavaScript. Version 0.0.15 installs from npm.
For agents. Give a coding agent:
Set up Vibe in this project: read https://vibelang.sh/setup and follow it.It detects the package manager, build tool, and editor and follows Set up Vibe.
Prerequisites
Install Node 22.22.3 (22.x) or Node 24.11.1 or later. Bun is optional. If you use it, install Bun 1.4.2 or later. See how to run sources with Bun.
vibelang installs one platform binary via optional dependencies — keep optional dependencies enabled (avoid --omit=optional):
| Platform | Package | Rehearsed for 0.0.15 |
|---|---|---|
| Windows on arm64 | @smthrs/cli-win32-arm64 | No |
| Windows on x64 | @smthrs/cli-win32-x64 | No |
| macOS on Apple silicon | vibelang-darwin-arm64 | No |
| macOS on Intel | vibelang-darwin-x64 | No |
| Linux on arm64 | vibelang-linux-arm64 | No |
| Linux on x64 | vibelang-linux-x64 | Yes |
Version 0.0.15 provides native packages for Windows, macOS, Linux on arm64 and x64.
Create a project
npm create vibelang@latest my-app
cd my-app
npm run start
npm run testWith Bun, use bun create vibelang@latest my-app, bun run start, and bun run test. Pass --no-install to skip dependency installation. npm run start builds and prints:
Hello, VibeLang!
Recovered from EmptyNameSee Getting Started for the starter files and Running Effects for execution.
Add VibeLang to an existing project
No transitive @effect/platform-node-shared override or resolution is required — any stable ^4.1.0 Effect release works out of the box. Install VibeLang beside effect@^4.1.0 (tested on 4.1.6; for pnpm and Yarn, see existing project):
bun add vibelang-runtime@0.0.15 effect@^4.1.6 @effect/platform-node@^4.1.6
bun add -d vibelang@0.0.15 vibelang-vite@0.0.15 vitest@5.1.0 @effect/vitest@^4.1.6With npm, use npm install and npm install --save-dev.
| Package | Install as | Purpose |
|---|---|---|
vibelang-runtime | Dependency | Small compiled-code helpers (e.g. Symbol.customMatcher polyfill); adds no runtime semantics |
effect, @effect/platform-node | Dependency | Effect ^4.1.0 (tested on 4.1.6) and Node platform |
vibelang | Dev dependency | Compiler, language server, native binary, and VS Code extension |
vibelang-vite | Dev dependency | Compiles .vibe modules for Vite and Vitest |
vitest, @effect/vitest | Dev dependency | Vitest 5.1.0 and @effect/vitest ^4.1.0 |
Effect compatibility: vibelang and vibelang-runtime support any stable effect version >=4.1.0 <5.0.0 (tested on 4.1.6) and reject 3.x, 4.0.x, 5.x, and prereleases with EK3201. VibeLang follows Effect 4.0.6's defect precedence, which Effect 4.1+ keeps: a failure whose cleanup crashes is a defect (see release notes). Keep effect, @effect/platform-node, and @effect/vitest on matching 4.1.x versions, and keep vibelang, vibelang-runtime, and vibelang-vite at one matching version.
Add tsconfig.json (VibeLang checks vibe.config.json, then tsconfig.json, then jsconfig.json; VibeLang-specific options go under a top-level "vibe" key, which plain tsc ignores):
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"sourceMap": true,
"rootDir": "src",
"outDir": "dist",
"noEmitOnError": true,
"rewriteRelativeImportExtensions": true,
"skipLibCheck": true,
"types": []
},
"include": ["src"],
"exclude": ["src/**/*.test.vibe"]
}Add scripts to package.json (which must set "type": "module"):
{
"type": "module",
"scripts": {
"build": "vibelang",
"start": "vibelang && node --enable-source-maps dist/main.js",
"test": "vitest run"
}
}src/main.vibe invokes its runner explicitly at top level (NodeRuntime.runMain(Effect.provide(main(), NodeServices.layer))); the compiler does not auto-call main.
node --enable-source-maps maps JS locations back to .vibe lines, but VibeLang adds no spans of its own so a defect stack can show one frame. Name spans with try withSpan(effect { ... }, "checkout"), and see Debug stack traces when a caller stack is missing.
Add tsconfig.test.json and vitest.config.ts so Vitest compiles .test.vibe files without emitting them into dist/:
{
"extends": "./tsconfig.json",
"exclude": []
}// TypeScript (.ts)
// vitest.config.ts
import { defineConfig } from "vitest/config"
import vibelang from "vibelang-vite"
export default defineConfig({
plugins: [vibelang({ project: "tsconfig.test.json" })],
test: { include: ["src/**/*.test.vibe"] }
})Keep "rewriteRelativeImportExtensions": true so .ts files can import .vibe modules without TS5097. If your root tsconfig.json uses "files": [] with references, pass the app config (vibelang({ project: "tsconfig.app.json" })). See Vite and Vitest.
To upgrade all three VibeLang packages together (read release notes first, as v0 releases can break):
bun add vibelang-runtime@latest
bun add -d vibelang@latest vibelang-vite@latestConfigure your editor
After installing dependencies, install the bundled extension:
code --install-extension node_modules/vibelang/editor/vibelang.vsix
# Or, for Cursor:
cursor --install-extension node_modules/vibelang/editor/vibelang.vsixIt is not yet on the VS Code Marketplace or Open VSX; reinstall from node_modules after updating vibelang. Other editors configure their LSP client to run vibelang --lsp --stdio for .vibe and .ts files (Devtools).
Compiler commands
bun run build
bun run start
bun run test
bun x --no-install vibelang --noEmitvibelang accepts TypeScript flags (--noEmit, --watch, -b) and emits compatibility declarations (x.d.vibe.ts) alongside each .vibe module (or in vibe.sidecarDir, such as the starter's .vibe/declarations/):
- Stock TypeScript tools:
tscand TypeDoc resolve.vibeimports viaallowArbitraryExtensions. When acheckscript is declared,bun checkruns the project'scheckscript; a script invoking a TypeScript checker uses its sidecar resolution. (bun check --no-scriptselects Bun's native checker, which the runtime preload does not replace; usevibelang -bor"check": "vibelang -b"for native.vibechecking.) - Generated declarations: Non-effectful exported callables carry
@throws(or@throws {never}) in their.d.vibe.tsdeclarations;effectfunctions,Stream/Layer-returning callables, getters, and setters carry none. Set"declaration": trueto also emit.d.tsfiles todist/(the starter omits this option). Local source imports use.vibe; emitted JS and.d.tsfiles rewrite them to.js. - Workspace project references: Leave
disableSourceOfProjectReferenceRedirectabsent orfalseso typed tools preserve sidecar resolution across namespace barrels (Devtools).
TypeScript declaration consumers
Downstream projects checking emitted declarations with stock tsc require TypeScript 5.7 or later for effect@^4.1.0 (tested on 4.1.6), whose types use generic typed arrays like Uint8Array<ArrayBuffer> (introduced in TS 5.7). This consumer requirement is separate from VibeLang's TypeScript 7.1 checker; upgrade typescript rather than relying on skipLibCheck. Consumers also install vibelang-runtime beside effect (Services and errors from TypeScript).
Coming from Effect
Install vibelang and vibelang-runtime beside effect@^4.1.0. Write application logic in .vibe and keep TypeScript integrations in .ts; the compiler checks both as one program.
Last resort: keep TypeScript file names
Prefer the compiler, plugins, and editor setup above. Only if a project cannot rename files to .vibe/.vibex, see the experimental TypeScript shim and its stock-tool limitations.
The matching Effect page: effect.website/docs/v4/getting-started/installation