Vibeleaderboard
Index / tool
Visit nola.sh
Category
Developer Tools
Rank
No. 3342Tools index

Previous survey · No. 3209 ·

Type
TOOL
Use case
Coding
Interfaces
CLI
GitHub
7 stars
Latest release
v0.1.14
Date

About

Nola is a TypeScript superset (.tsi files) that treats LLM inference as a native language construct rather than an SDK call, using 'infer' and 'ask' keywords so typed values and function-calling are checked by the compiler instead of hand-written schemas. It compiles down to plain TypeScript and includes a CLI, editor support, and observability tracing for inference calls.

What it does

Nola adds two keywords to TypeScript so that a request to a language model reads like an await. You write a TypeScript interface, then ask the model for a value of that type in a single expression. The compiler turns the file into ordinary TypeScript, works out the response format from the type, and checks the model's reply against it when the program runs. A reply that does not fit gets one correction attempt before the call fails with an error. Plain TypeScript files can import these functions and await them like any other async code.

Why it's ranked here

The design removes the second copy of the data model that most typed model-calling code carries. The project's own six-way comparison shows the domain type declared once in Nola and twice in LangChain.js, Ax, the Vercel AI SDK and the plain OpenAI SDK, with no code generation step, against BAML's fourteen generated files. It is Apache 2.0 licensed, ships editor tooling and plugins for seven bundlers, and supports OpenAI, Anthropic, Google and any compatible endpoint. The caveat is that the comparison was written by the authors and measures code organisation, not model quality, latency or cost.

What's good

Context is handled precisely. A parameter marked with a leading dot is written into the prompt for every request in that function, while an ordinary parameter only shows its name and type to the model, never its value. Classification questions can return a probability for each answer plus a confidence figure instead of a single guess. Calls are deferred: nothing reaches a provider until the result is awaited, and each one resolves at most once. A deterministic mock provider, record and replay ledgers, and a setting that forces every request to the mock in CI make tests runnable with no key and no network.

Tradeoffs

Adopting it means adopting a new file type. The documentation states the cost plainly: you need the compiler, a loader or bundler plugin, and editor support, because the standard TypeScript compiler never sees these files. That is more tooling than a library import. Node 22.18 or newer is required. The hosted platform that powers the no-key first run is a service with trial limits, so production use means configuring your own provider keys. The comparison explicitly leaves out streaming and React bindings, which are strengths of the Vercel AI SDK, so interactive chat interfaces are not the case it argues for.

How to use it well

It fits a TypeScript backend that pulls structured data out of text, routes tickets, or classifies messages, and whose team already keeps its data model in interfaces. Start with the scaffolder and the offline templates, then switch on a real provider in the config file. Use named models for cheap drafts and careful final passes, and force the mock provider in CI so tests stay deterministic. Keep the compiler as a development dependency, since only the runtime and provider packages ship. Look elsewhere for streaming chat UIs or prompt optimisation, which the comparison pages leave to other tools.

Technical notes+

The repository is an npm workspaces monorepo (package.json, workspaces packages/* and examples/*, Vitest for tests, Biome for lint). packages/compiler/src/index.ts exports compileNola, compileView and the schema helpers collectTypeRegistry and collectExportedTypeNames, which is where types become wire schemas at compile time. packages/runtime/src/ask/index.ts exposes ask, validate, wireSchema, runPipeline and fingerprintRequest from @nola-lang/core; the fingerprint keys replay entries, and docs-site/config/providers.mdx notes the inference profile is part of it. packages/providers/src/index.ts exports the openai, anthropic, google, typesafe and mockProvider factories plus withRetry, fallback, roundRobin, record and replay. Routing precedence is forceModel, then ask with or withModel, then model.default; an unknown name raises NOLA3004.

Observed

License
Apache License 2.0
Language
TypeScript superset compiled to plain TypeScript
Runtime requirement
Node 22.18 or newer
Interfaces
CLI (init, build, run, check, declarations, skill), Node loader, runtime library
Install surface
npm create nola scaffolder; nola-lang as a dev dependency
Bundler plugins
Vite, webpack, Rollup, Rolldown, esbuild, Rspack, Next.js
Editor support
tsserver plugin, language server, VS Code extension
Providers
OpenAI, Anthropic, Google, typesafe.ai, OpenAI-compatible endpoints, hosted platform, mock
Test runner
Vitest, declared in the root package.json

Read from README.md, package.json, LICENSE, docs-site/index.mdx, docs-site/compare/index.mdx, examples/extract-person/src/main.ts, packages/compiler/src/index.ts, packages/runtime/src/ask/index.ts, packages/providers/src/index.ts, docs-site/config/providers.mdx, comparisons/inbox-triage/README.md.

What it can do

  • Compile .tsi TypeScript superset files to plain TypeScript

    .tsi source file → TypeScript code

  • Request typed model outputs using the 'infer' keyword

    Typed inference request in code → Typed model output

  • Trigger native function calls using the 'ask' keyword

    Function call request in code → Function call result

  • Trace inference calls for observability

    Inference call execution → Trace data

Tags

typescriptllmcompilerdsltype-safetyai-sdk-alternativedeveloper-tools

Tech Stack

Node.jsTypeScript

Media

Nola

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.