Skip to content

Devtools

The vibelang compiler and language server check .vibe and .ts files as one program, surfacing Effect contracts and catching escaping failures or unmet services. A written ./target.ts import keeps TypeScript's native resolution (it never selects target.vibe); use ./target.js for runtime imports of migrated sources or ./target.vibe with source-extension options enabled.

Install language tooling

// example.vibe
effect function sample() {
  try sleep("5 millis")
  return "sample"
}
// string!!
// Run in an effect function: try Console.log(try sample())
// Output: sample

Install vibelang as a dev dependency. vibelang --lsp --stdio starts one language server for .vibe and .ts files.

For VS Code and Cursor, install the bundled extension (not yet on the Marketplace or Open VSX; reinstall from node_modules after updating vibelang):

code --install-extension node_modules/vibelang/editor/vibelang.vsix
# Or, for Cursor:
cursor --install-extension node_modules/vibelang/editor/vibelang.vsix

Other editors (including JetBrains via LSP4IJ) run vibelang --lsp --stdio for *.vibe and *.ts rooted at vibe.config.json, tsconfig.json, or jsconfig.json; disable the secondary TypeScript server to avoid duplicate diagnostics.

  • Navigation & imports: Outline, Rename, Find References, Call Hierarchy, and Organize Imports cover .vibe constructs (module declarations, shorthand pattern bindings, generic schema type imports, for concurrent completions, and retired select blocks that report EK4607).
  • GitHub & built-in lint: Add *.vibe linguist-language=TypeScript to .gitattributes (included in the starter). Effect's type-aware effecttsgo/* rules are built in (Lint Effect code), and vibelang/oxlint / vibelang/eslint integrate .vibe files with Oxlint and ESLint.
  • Converting async functions: Ordinary async functions keep Promise<T> in .vibe. Two editor refactors convert them to effect functions (wrapping each await in Effect.tryPromise, optionally generating a module-scope error per await). Conversion is withheld when semantics could change: return/break/continue/throw jumping out of an awaited do block, self-recursion or Promise-requiring contracts/overloads/index signatures, shadowed Effect or reserved fork/join bindings, non-primitive returns that could hide a then method, or async generators (write an Effect producer instead).

Inspect inferred information

error Rejected
 
effect function accepted(value: number) {
  if (value < 0) throw new Rejected()
  return value + 1
}
// number!Rejected
// Run in an effect function: try Console.log(try accepted(2))
// Output: 3

Hover an Effect-returning function to inspect its inferred Effect<A, E, R>. Calling an effect function returns an unrun Effect; try extracts its success value while tracking escaping failures and unmet services into generated declarations. Ordinary functions returning a native helper's Effect preserve the helper's inferred declaration spelling without adding an extra root Effect import.

Diagnostics, completions, and refactors

// expect-error: EK9201
// Rejected escapes a contract promising no failures.
effect function promised(value: number): number!! {
  return try accepted(value)
}

Key diagnostic rules (see the diagnostic code map):

  • Contracts & runners: Escaping failures are EK9201 (interim); unmet services are EK9202 (interim); calling a runner inside effect code is EK1005; catching an unfailable (E = never) Effect warns with EK9204 (interim; defects pass through).
  • Throwing & boundaries: Fail an Effect with throw new MissingValue(); rethrow in catch effect (e) => { throw e } (plain catch (e) => value returns a value). In effect code, wrap potentially throwing foreign calls with Effect.try and Promises with tryPromise. Banned Node/web globals and Node value imports report EK4402 (Date.now(), Math.random(), and declared Temporal.Now stay allowed; the old EK4403 is retired).
  • Completions & checks: TypeScript completions (including service members) run through the VibeLang checker; malformed imports keep TypeScript syntax errors even without vibelang-runtime, and new f() uses TypeScript's constructor checks.

Move a TypeScript module body to a file

From a top-level module parse { … } declaration, run Move module to a TypeScript file (VIP-40). It writes the body (with comments, JSDoc, and relative imports) to parse.ts beside .vibe or parse.tsx beside .vibex (choosing main.parse.ts / numbered names if taken, without overwriting), appends export {} if needed to keep script bodies private, and rewrites specifiers to .ts (with rewriteRelativeImportExtensions or allowImportingTsExtensions) or .js. Generated declarations for module bodies keep relative imports aimed at source modules and preserve type exports across project references.

Diagnostic reference: additional codes

EK1502 rejects type parameters on a schema body or alias. Write a generic TypeScript factory for parameterized construction.

Each entry gives the condition and the repair. The examples and language-service tables on this page cover the other registered codes for these forms.

CodeMeaningRemedy
EK2301A pipe body never uses its input topic, %, or % appears outside a pipe body.Put % where the input belongs in the call after the pipe; use % only after the pipe operator, or name the value with a variable.
EK1017A provide statement was used in an expression position.Write provide layer { statements } as a statement and return from inside its block.
EK2111A restore block has no enclosing uninterruptible block.Put it inside uninterruptible, or use interruptible { … }.
EK3001Two services share a key.Rename one of the declarations named by the diagnostic.
EK3002A class extends a service key.Implement the service's shape instead of extending its key.
EK3003new tries to construct a service key.Read the provided implementation with try Service; create implementations as objects or classes implementing its shape.
EK3004instanceof or a class pattern, when Users:, tests a service key, which is no base class.Test the implementation's data or a concrete implementation class instead; match its members, when { find: let find }.
EK4838An obsolete check from the old language, which tied a fiber to the region that forked it. Returning, storing or passing a Fiber is not a VibeLang error, and a plain fork child is still interrupted when its parent ends.The legacy warning has no automatic lifetime conversion. Use fork.scoped p() for the caller's scope, fork.in(scope) p() for a scope you hold, or fork.detached p() for a fiber nothing owns.
EK1906A for concurrent head uses var, using, await using, or an assignment.Declare the item with const or let; assign an existing variable inside the body.
EK2005A for try head uses var, using, await using, or an assignment.Write for try (const item of stream) { current = item } to assign an existing variable.
EK1704join receives something other than a Fiber.Join one fiber at a time; run Effects with try, use try Deferred.await(deferred), or wrap Promises with tryPromise. See fiber lifetimes for ownership forms.
EK4819Registered for yield effect in a TypeScript Effect generator; currently not emitted in .ts files.In TypeScript use yield* effect; in VibeLang write an effect function with try.
EK4820Registered for a non-returning yield* effect whose success type is never; currently not emitted in .ts files.In TypeScript write return yield* effect so control flow narrows; in VibeLang run the Effect with try.
EK9100The editor's text-only projection needs a written type to choose a form.Add the annotation requested by the message.
EK9101An editor-only suggestion: the text-only projection cannot safely select a data-type method from the receiver's written type or access syntax.Write a type annotation on the receiver, or call the module function explicitly; optional or uncalled accesses need a direct call.

Configure compiler checks

effect function checked(value: number): number!Rejected {
  return try accepted(value)
}
// Run in an effect function: try Console.log(try checked(2))
// Output: 3

Write all three contract channels or omit the return annotation to infer them (omitted slots default to never, so Effect.Effect<number> is number!!). VibeLang checks vibe.config.json, tsconfig.json, then jsconfig.json per directory (every .vibe file is a module regardless of moduleDetection). Put VibeLang settings under top-level "vibe" (ignored by plain tsc):

{
  "compilerOptions": {
    "strict": true,
    "sourceMap": true
  },
  "vibe": {
    "severities": { "EK0801": "error", "EK4609": "warning", "EK3801": "off" },
    "effectGlobals": true
  }
}
  • Inheritance & package scope: extends merges vibe by key and severities by code. Each .vibe file uses its owning package's nearest config.
  • Severities: Configure warning codes or assigned imported EK38xx codes to "error", "warning", "suggestion", or "off" (invalid entries report EK3006; unknown/wrong-typed vibe keys report EK3007). Own warnings do not fail builds or block noEmitOnError; imported Effect warnings fail builds unless ignored via the plugin's ignoreEffect*InTscExitCode options.
  • Legacy maps & editor-only codes: Root vibelang.diagnostics and compilerOptions.vibelang.diagnostics still apply until migrated (modern entries win; EK3009 warns; see Diagnostic severities). Remove retired codes such as EK4406 and the retired unused-main warning (VIP-26). EK9100 is editor-only and warns by default for text-only projection types; it is not reported by the CLI.
  • Prelude: vibe.effectGlobals defaults to true (putting effect/Effect exports in scope); set to false to qualify calls as Effect.* (Effect's functions).

TypeScript-style Effect code

VibeLang ships no automatic fixes before 1.0 (TypeScript's built-in code fixes remain available). TypeScript-style Effect declarations and combinators keep working in .vibe; these advisory codes suggest VibeLang equivalents:

CodeTypeScript styleVibeLang form
EK4830class NotFound extends Data.TaggedError("NotFound")<{ readonly id: string }> {}error NotFound { id: string }
EK4831class Users extends Context.Service<Users, { find(id: string): Effect.Effect<User> }>()("app/Users") {}service Users { static readonly key = "app/Users"; find(id: string): User!! }
EK4832const User = Schema.Struct({ id: Schema.String })schema User { readonly id: string }
EK4833Effect.Effect<User | null, NotFound | Timeout, Db>(User | null)!(NotFound | Timeout)!Db
EK4834return try Effect.succeed(user), try Effect.fail(error)return user, throw error
EK4835try Effect.catchTag(find(id), "NotFound", (e) => …)find(id) catch effect (e) => match (e) { when { _tag: "NotFound" }: …; default: throw e; }
EK4836Effect.withSpan(main(), "main"), return try Effect.provide(main(), AppLive), try Effect.provideService(main(), Users, users)withSpan(main(), "main"), provide AppLive { return try main() }; retain the native Effect.provideService call
EK4837class Failed extends Schema.TaggedError<Failed>()("Failed", { … }) {}schema error Failed { … }
EK4839Match.value(status).pipe(Match.when("idle", () => "Idle"), Match.orElse(() => "Busy"))match (status) { when "idle": "Idle"; default: "Busy"; }
EK4841export const Tags = Schema.Array(Schema.String) just before export type Tags = typeof Tags.Typeexport schema Tags = readonly string[]
EK4842import { Array } from "effect" and Array.take(values, 2)import { Array as Arr } from "effect" and Arr.take(values, 2)

For EK4834, EK4835, and the provide calls in EK4836, only the direct operand of bare try in effect code warns (including through parentheses, as, satisfies, !, and import aliases); stored/returned Effects, fork/join, collection operands, Effect API arguments, and catch heads do not. EK4856 warns on the transitional bare Effect<A, E, R> alias. For Effect.gen/Effect.fn, write an effect function or block with try (Creating effects, cheat sheet).

Effect language service rules

The compiler, language server, and vibelang lint run Effect's @effect/tsgo rules on selected .ts and .vibe inputs, keeping the pinned upstream rule/file eligibility and declaration/library exclusions (Lint Effect code). Language diagnostics report in .vibe files, configuration diagnostics in config files; a .ts file keeps TypeScript's verdict. Severity precedence is: vibe.severities → the repository's existing Effect language-service configuration → rule default. (module bodies are TypeScript and derive deterministicKeys from their owning .vibe file; vibelang lint leaves build outputs untouched.)

  • Inline directives: // @vibelang-diagnostics-next-line EK4804:off and // @vibelang-diagnostics EK4818:warning configure adjustable EK4801–EK4825 lint codes (not core errors like EK0403); * matches all adjustable codes, later directives win, and trailing text after : is prose:
effect function discard() {
  // @vibelang-diagnostics-next-line EK4804:off
  throw new Error("unused")
}
// Run in an effect function: try Console.log(discard() catch () => 0)
// Output: 0
  • Migrated @effect-diagnostics comments: Rules marked "Not needed" or "Covered" below do not run in .vibe, so stale @effect-diagnostics-next-line directives report TS377000. Rewrite matching rules to @vibelang-diagnostics-next-line (e.g. overriddenSchemaConstructor:off → EK4814:off) and drop obsolete rule names. (|> pipelines do not count as .pipe chains for unnecessaryPipeChain.)
  • Schema constructors: EK4814 warns when a Schema.Class subclass overrides its constructor. Decoding invokes the override. Move work that should run only on explicit construction to a separate factory function.

The table below maps all 108 rules and features of @effect/language-service 0.87.5:

GroupEffect's rule or featureIn VibeLangExample
CorrectnessanyUnknownInErrorContextEK4811, off by defaultthrow cause where cause: unknown
CorrectnessclassSelfMismatchNot needed: a service has no Self parameterservice Users { find(id: string): User!NotFound }
CorrectnessduplicatePackageEK4803, warningtwo versions of effect in one program
CorrectnesseffectFnImplicitAnyNot needed: parameters are TypeScript's, so strict reports TS7006effect function load(id) { … }
CorrectnessfloatingEffectEK3801, error on selected inputs, with the @effect/language-service plugin; EK4801, error, without itA discarded Effect value or effect { … } block; write void (expression) to preserve the deliberate discard
CorrectnessgenericEffectServicesCovered: EK3005service Repo<T> { … }
CorrectnessmissingEffectContextCovered: EK9202 (interim) at a contract, EK9211 at a runnereffect function f(): User!NotFound { return try (try Users).find(id) } is EK9202
CorrectnessmissingEffectErrorCovered: EK9201 (interim)effect function f(): User!! { return try (try Users).find(id) }
CorrectnessmissingLayerContextCovered: EK9202 (interim) and EK9211provide UsersLive { … } without the database layer is EK9211 at the runner
CorrectnessmissingReturnYieldStarNot needed in .vibe: throw ends the functionthrow new NotFound({ id })
CorrectnessmissingStarInYieldEffectGenUse try in an effect functionconst user = try (try Users).find(id)
CorrectnessnonObjectEffectServiceTypeEffect 3 only, and a service declares membersservice Port { value: number }
CorrectnessoutdatedApiEK4813, error, in place of TS2339Effect.catchAll; use Effect.catch
CorrectnessoutdatedEffectCodegenNot adopted: no codegen commentsNone
CorrectnessoverriddenSchemaConstructorEK4814, warningclass Person extends Schema.Class<Person>("Person")({ … }) { constructor() { … } }
Anti-patterncatchUnfailableEffectCovered: EK9204 (interim), warning. Appendix B assigns the imported rule EK3818succeed(1) catch (e) => fallback; a catch expression receives typed failures only
Anti-patterneffectFnIifeAn effect function call returns an Effect(() => load())()
Anti-patterneffectGenUsesAdapterEffect functions use tryNone
Anti-patterneffectInFailureEK4815, warningthrow program; run it: try program
Anti-patterneffectInVoidSuccessEK3830, the pinned Effect rule at its configured severity; separate from the inferred-argument warning EK4802An Effect containing another Effect is assigned to an Effect.Effect<void> contract
Anti-patternglobalErrorInEffectCatchEK4804, warningEffect.try({ try: code, catch: (cause) => new Error(String(cause)) })
Anti-patternglobalErrorInEffectFailureEK4804, warningthrow new Error("boom"); declare error Boom { }
Anti-patternlazyPromiseInEffectSyncUse promise for a Promise whose rejection is a defecttry promise(() => load(url)), with load from a .ts module
Anti-patternleakingRequirementsEK4809, warning; @vibelang leakable exempts a serviceservice Users { find(): User!!Db; all(): User[]!!Db }
Anti-patternmultipleEffectProvideEK4808, warningprovide A { provide B { … } }; nesting alone does not imply separate layer builds. Layer.provideMerge(A)(B) retains both layers when B needs A; review evaluation and build order before composing manually. There is no automatic merge.
Anti-patternreturnEffectInGenEK4802, warning; no automatic execution repairreturn program; use return try program
Anti-patternrunEffectInsideEffectCovered: EK1005Effect.runPromise(load()) inside a function
Anti-patternschemaSyncInEffectEffect 3 onlyNone
Anti-patternscopeInLayerEffectEffect 3 only: Effect 4's Layer.effect owns its scopeLayer.effect(Users, effect { const pool = try open(); … })
Anti-patternstrictEffectProvideEK4816, off by defaultprovide AppLive { … } or Effect.provide(program, AppLive); includes functions named main
Anti-patterntryCatchInEffectGenUse a catch expression(try Users).find(id) catch (e) => fallback
Anti-patternunknownInEffectCatchEK4806, warning; a direct Effect.orDie defect bridge or its |> spelling is exemptEffect.try({ try: code, catch: (cause) => cause }) without a defect bridge
Effect-nativecryptoRandomUUIDCovered: EK4402, because crypto is a banned globalcrypto.randomUUID()
Effect-nativecryptoRandomUUIDInEffectCovered: EK4402, because crypto is a banned globalcrypto.randomUUID()
Effect-nativeextendsNativeErrorEK4805, warningclass Boom extends Error {}; declare error Boom { }
Effect-nativeglobalConsoleCovered: EK4402console.log(x)
Effect-nativeglobalConsoleInEffectCovered: EK4402console.log(x)
Effect-nativeglobalDateNot reported: Date is ECMAScript; use Clock where a test controls timeDate.now()
Effect-nativeglobalDateInEffectNot reported: Date is ECMAScript; use Clock where a test controls timenew Date()
Effect-nativeglobalFetchCovered: EK4402fetch(url)
Effect-nativeglobalFetchInEffectCovered: EK4402fetch(url)
Effect-nativeglobalRandomNot reported: Math is ECMAScript; use Random where a test controls itMath.random()
Effect-nativeglobalRandomInEffectNot reported: Math is ECMAScript; use Random where a test controls itMath.random()
Effect-nativeglobalTimersCovered: EK4402setTimeout(f, 10)
Effect-nativeglobalTimersInEffectCovered: EK4402setTimeout(f, 10)
Effect-nativeinstanceOfSchemaEK4817, off by default; no automatic test conversionvalue instanceof Person; choose Schema.is(Person)(value) explicitly when schema validation is intended
Effect-nativenewPromiseEK4812, warningnew Promise((resolve) => …); use callback((resume) => …)
Effect-nativenodeBuiltinImportCovered: EK4402 at a value import of a Node.js modulereadFile(path) from node:fs/promises
Effect-nativepreferSchemaOverJsonEK4818, off by defaultJSON.parse(text)
Effect-nativeprocessEnvCovered: EK4402process.env.PORT; use Config
Effect-nativeprocessEnvInEffectCovered: EK4402process.env.PORT
Effect-nativeunsafeEffectTypeAssertionEK4810, warning; removing the assertion has no automatic fixprogram as Effect.Effect<number> drops a failure A type-spelling repair also protects the whole refused assertion; unrelated annotations can still be repaired.
StylecatchAllToMapErrorNot needed: a catch that rethrows is the one formcatch effect (e) => { throw new Failed({ cause: e }) }
StyledeterministicKeysNot needed: the compiler derives each service key from its package, module, and name@acme/app/src/users#Users
StyleeffectDoNotationNot needed: const statements bind valuesconst user = try (try Users).find(id)
StyleeffectFnOpportunityUse an effect functioneffect function load(id: string) { … }
StyleeffectMapFlattenNot needed: statementsconst a = try f(); return try g(a)
StyleeffectMapVoidNot needed: statementstry f() on its own line
StyleeffectSucceedWithVoidNot needed: an effect function that returns nothingeffect function done() { }
StyleflatMapToMapNot needed: statementsreturn try g(try f())
StyleimportFromBarrelNot needed: the compiler imports effect's root names and subpath modulesOption.some(1) with no import
StylemissedPipeableOpportunityRefactor: "Convert to a pipe"f(g(h(x))) becomes x |> h(%) |> g(%) |> f(%)
StylenestedEffectGenYieldEffect functions use tryNone
StyleredundantSchemaTagIdentifierNot needed: error and schema declarations take their tag from their nameerror NotFound { id: string }
StyleschemaStructWithTagEK4821, off by default; no automatic constructor conversionSchema.Struct({ _tag: Schema.Literal("A"), … })
StyleschemaUnionOfLiteralsEffect 3 onlyNone
StyleserviceNotAsClassNot needed: service declarationsservice Users { … }
StylestrictBooleanExpressionsEK4822, off by defaultif (count) { … }
StyleunnecessaryArrowBlockEK4823, off by default(x) => { return x + 1 }
StyleunnecessaryEffectGenEffect functions use tryNone
StyleunnecessaryFailYieldableErrorNot needed: throw new NotFound({ id })throw new NotFound({ id })
StyleunnecessaryPipeEK4824, off by defaultpipe(x)
StyleunnecessaryPipeChainEK4825, off by defaultx.pipe(f).pipe(g)
HoverExtended Effect typeCovered: a function's hover shows its contract, A!E!Rstring!UserNotFound!Users
Hoveryield* hoverUse try to get the success valuetry load() returns User
HoverLayer service involvementHover: a layer lists what it provides, needs, and fails withHover on UsersLive
CompletionSelf in classesNot needed: declarations have no SelfNone
CompletionEffect.gen snippetUse an effect functionNone
CompletionEffect.fn span nameNot needed: name a span explicitlytry withSpan(effect { … }, "checkout")
CompletionDuration stringsCompletion: "2 seconds" and the other units where a Duration.Input goesEffect.sleep("1 second")
CompletionNamespace import styleNot needed: effect's root names and subpath modules are in scopeOption.some(1)
CompletionSchema.brand nameCompletion: the declared name in Schema.brand("…")const UserId = Schema.String.pipe(Schema.brand("UserId"))
CompletionComment directives@vibelang-diagnostics comments, whose codes complete// @vibelang-diagnostics-next-line EK4804:off
Refactorasync function to Effect.genConvert to an effect functiontry tryPromise(() => load(url))
Refactorasync function to Effect.gen, with an error per promiseConvert to an effect function with a mapped failuretry tryPromise({ try: () => load(url), catch: (cause) => new LoadFailed({ cause }) })
Refactorasync function to Effect.fnUse an effect functionAs above
Refactorasync function to Effect.fn, with an error per promiseConvert to an effect function with a mapped failureAs above
RefactorEffect.gen to Effect.fnUse an effect functionNone
RefactorFunction calls to pipeRefactor: "Convert to a pipe"f(g(x)) becomes x |> g(%) |> f(%)
RefactorPipe to data-firstRefactor: "Convert the pipe to calls"x |> g(%) |> f(%) becomes f(g(x))
RefactorToggle return type signatureRefactor: "Write the inferred contract" and "Remove the contract"effect function load(id: string): User!NotFound!Users
RefactorRemove an unnecessary Effect.genUse an effect functionNone
RefactorWrap with Effect.genUse an effect functionNone
RefactorToggle pipe stylesRefactor: "Write pipe(x, …)" and "Write x.pipe(…)"x.pipe(f, g) and pipe(x, f, g)
RefactorStructural type to SchemaRefactor: "Convert to a schema declaration"interface User { name: string } becomes schema User { name: string }
RefactorEffect.Service to Context.TagNot needed: service declarationsNone
CodegenannotateRefactor: "Write the inferred contract"effect function load(id: string): User!NotFound!Users
CodegentypeToSchemaRefactor: "Convert to a schema declaration"schema User { name: string }
OtherRenaming a tagged class renames its tagNot needed: an error declaration's tag is its name, so a rename renames botherror NotFound { } renamed to Missing
OtherGo to definition for RpcClientNot adopted yet: the language server has no definition hookNone

When enabled, strictEffectProvide flags layer provision in every function, including main — compose layers at the entry point and disable the diagnostic there.

Debug stack traces

Build with "sourceMap": true and run node --enable-source-maps dist/main.js. Compiled effect functions preserve their source names in JS stack frames, and source maps map JS locations back to .vibe lines, but VibeLang adds no spans of its own — wrap key operations with try withSpan(effect { ... }, "checkout") for logical caller context.

If NodeRuntime.runMain prints only Error: message, call your exported main from a TypeScript entry to print the full stack and preserve the failing exit status:

// debug.ts
// fragment
import { Effect } from "effect"
import { main } from "./app.vibe"
 
Effect.runPromise(main()).catch((error: unknown) => {
  console.error(error instanceof Error ? error.stack : error)
  throw error
})

Compile debug.ts with vibelang and run node --enable-source-maps dist/debug.js (keep the top-level runner in a separate entry so importing app.vibe does not start execution).

Lint and build integration

  • Checking & Vitest: Run vibelang --noEmit for whole-project checking. vibelang-vite supports Vite 7–8 and Vitest 5 (bun run test compiles source tests with no prior build; see TestClock):
// 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"] }
})
  • ESLint (vibelang/eslint): Install eslint and typescript-eslint 8 beside vibelang. vibelang/eslint produces standard typescript-eslint ESTree nodes and scope analysis for .vibe and .vibex (including JSX for React/Solid rules); reports, fixes, and // eslint-disable-next-line target the original source text (inspect trees with vibelang --estree main.vibe < main.vibe). Type-aware ESLint rules cannot run directly on .vibe — enable them on .ts files using typedProgram instead of project/projectService, and map .vibe/.vibex in import/parsers (or import-x/parsers) when using eslint-plugin-import:
// eslint.config.js
import tseslint from "typescript-eslint"
import vibelang, { typedProgram } from "vibelang/eslint"
 
export default tseslint.config(
  {
    settings: { "import/parsers": { "vibelang/eslint": [".vibe", ".vibex"] } }
  },
  {
    files: ["src/**/*.ts"],
    extends: [tseslint.configs.recommendedTypeChecked],
    languageOptions: {
      parserOptions: { programs: [typedProgram({ project: "tsconfig.json", tsconfigRootDir: import.meta.dirname })] }
    }
  },
  {
    files: ["src/**/*.{vibe,vibex}"],
    extends: [tseslint.configs.recommended],
    languageOptions: { parser: vibelang }
  }
)

typedProgram() discovers vibe.config.json, tsconfig.json, then jsconfig.json from tsconfigRootDir (or uses an explicit project), compiling each workspace package once and exposing .vibe declarations to typescript-eslint. Keep disableSourceOfProjectReferenceRedirect absent or false across workspace references so typed tools resolve x.d.vibe.ts through namespace barrels.

Custom ESTree node types (usable in no-restricted-syntax selectors, e.g. VibeCatchExpression > Literal.handler[value='']):

FormESTree node
A!E!RVibeEffectType (success, failure, requirements)
x |> f(%)VibePipeExpression (left, right; % is TopicReference)
x catch () => fallbackVibeCatchExpression (expression, handler)
provide AppLive, Random.Random = seeded { ... }VibeProvideStatement (providers, body; VibeServiceProvider)
uninterruptible / restore / interruptibleVibeMaskStatement (kind, body)
x is P / pattern binding / for concurrentVibeIsExpression, VibePatternAssignment, VibeForConcurrentStatement

Compiler-generated helper variables are omitted from scope analysis. Node types for newer VIP forms (effect, try, fork) are pending VIP-34.

  • Knip (vibelang/knip): Detects unused files, exports, dependencies, JSX component references, namespace member reads, and JSDoc tags (@public) across .vibe and .vibex (requires a JS/TS Knip config):
// knip.config.js
import vibelang from "vibelang/knip"
 
export default {
  compilers: { vibe: vibelang, vibex: vibelang },
  // The declaration sidecars vibelang writes beside .vibe files are its output.
  ignore: ["**/*.d.vibe.ts", "**/*.d.vibex.ts"]
}

Debugging in editors

effect function tracedSample() {
  return try withSpan(sample(), "sample")
}
// Run in an effect function: try Console.log(try tracedSample())
// Output: sample

Add spans explicitly with withSpan, and use Effect's DevTools layer (effect/devtools) + VS Code extension to inspect fibers and logical span stacks. Standard source-map debuggers (VS Code, Chrome/Edge DevTools, JetBrains) map breakpoints and paused frames to .vibe (Source maps); stepping over a pausing try can enter Effect's run loop, so set a breakpoint on the next source line.

Coming from Effect

Library debugging concepts still apply; VibeLang's effect functions, service declarations, and source mapping require language-aware tooling beyond the upstream TypeScript plugin.

First calls from Effect TypeScript

Common diagnostics when porting Effect TypeScript to .vibe (cheat sheet):

CodeMeaning and manual guidance
EK1015Use try in an effect function (const value = try load()); producers use yield to emit values.
EK2112Legacy typed catch clauses no longer filter failures; write catch effect (e) => match (e) { when NotFound: fallback; default: throw e; }. Ordinary parameter annotations like catch (e: NotFound) => fallback remain TypeScript annotations.
TS2709, TS2707, TS2351 (Message, Command, new Worker(…))The name is an implicit Effect module. Declare/import your own, or reach DOM globals like globalThis.Worker in a .ts adapter.
TS2339 (Number.sum, Array.make)JS globals win over Effect modules of the same name: alias Effect's module (import { Number as EffectNumber } from "effect").
TS2304, TS2552 (Process, Locks)Experimental services live under Experimental (e.g. try (try Experimental.Process.Process).hostname). Misspelled names never suggest EK4402-banned globals like process.
TS2304 (Model, Prompt)Ambiguous across Effect subpath packages — import explicitly (e.g. import { Model } from "effect/schema").
EK4802An Effect passed as data to a plain generic function — run it with try if you meant its value.

Last resort: keep TypeScript file names

Prefer .vibe/.vibex with the tooling above. Only if a project cannot rename files, see the experimental TypeScript shim and its stock-tool limitations.


The matching Effect page: effect.website/docs/v4/getting-started/devtools