# langium

> A language engineering tool for the Language Server Protocol

Latest version **4.4.2** (published 2026-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install langium
pnpm add langium
yarn add langium
bun add langium
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.4.2 |
| Published | 2026-11-09 |
| First published | 2021-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^22.22.2 \|\| ^24.15.0 \|\| >=26 |
| Dependencies | 8 |
| Unpacked size | 3.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1052 |
| Author | TypeFox |
| Maintainers | spoenemann, sailingfox, msujew |
| Keywords | language, dsl, low-code, lsp, language-server, vscode, typescript |

## Links

- npm: https://www.npmjs.com/package/langium
- Repository: https://github.com/eclipse-langium/langium
- Homepage: https://langium.org
- Issues: https://github.com/eclipse-langium/langium/issues
- npm.io page: https://npm.io/package/langium

## Dependencies (8)

- [chevrotain](https://npm.io/package/chevrotain.md) ~13.2.0
- [vscode-uri](https://npm.io/package/vscode-uri.md) ~3.1.0
- [chevrotain-allstar](https://npm.io/package/chevrotain-allstar.md) ~0.5.0
- [vscode-languageserver](https://npm.io/package/vscode-languageserver.md) ~10.1.0
- [@chevrotain/regexp-to-ast](https://npm.io/package/@chevrotain/regexp-to-ast.md) ~13.2.0
- [vscode-languageserver-types](https://npm.io/package/vscode-languageserver-types.md) ~3.18.0
- [vscode-languageserver-protocol](https://npm.io/package/vscode-languageserver-protocol.md) ~3.18.2
- [vscode-languageserver-textdocument](https://npm.io/package/vscode-languageserver-textdocument.md) ~1.0.13

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 4.4.2 (latest) — 2026-11-09
- 4.3.0-next.a52b426 (next) — 2026-06-08
- 4.4.1 — 2026-11-09
- 4.4.0 — 2026-09-09
- 4.3.1 — 2026-07-02
- 4.3.0 — 2026-06-15
- 4.2.4 — 2026-05-11
- 4.2.3 — 2026-05-01
- 4.2.2-next.d9c47299 — 2026-04-30
- 4.2.2 — 2026-04-07
- 4.2.1 — 2026-02-10
- 4.2.0 — 2026-01-27
- 4.1.3 — 2025-12-19
- 4.1.2 — 2025-11-26
- 4.1.1 — 2025-11-20
- … 65 more at https://npm.io/package/langium/versions

## README

# Langium

Langium is a language engineering tool with built-in support for the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). It has a simple and direct integration with the [VS Code extension API](https://code.visualstudio.com/api/language-extensions/overview).

More information: 🌍 https://langium.org

## Getting Started

Langium offers a [Yeoman](https://yeoman.io) generator to create a new language extension for VS Code. The only prerequisite for the following terminal commands is [NodeJS](https://nodejs.org/) version 16 or higher.

1. Install Yeoman and the Langium extension generator.
```
npm install -g yo generator-langium
```

2. Run the generator and answer a few questions.
```
yo langium
```

3. Open the new folder in VS Code (replace `hello-world` with the extension name you chose).
```
code hello-world
```

4. Press **F5** to launch the extension in a new Extension Development Host window.

5. Open a folder, create a file with your chosen file name extension (`.hello` is the default), and see that validation and completion (ctrl+space) works:

Follow the instructions in `langium-quickstart.md` (in your extension folder) and the [documentation on the website](https://langium.org/docs/) to go further.

## How Does it Work?

The core of Langium is a _grammar declaration language_ in which you describe multiple aspects of your language:

 - Tokens (keywords and terminal rules)
 - Syntax (parser rules)
 - Abstract syntax tree (AST)

Please follow the [Langium documentation](https://langium.org/docs/grammar-language/) to learn how to use this language.

Langium features a command line interface ([langium-cli](https://www.npmjs.com/package/langium-cli)) that reads a grammar declaration and generates TypeScript type declarations for the AST and more.

Integration with the Language Server Protocol (LSP) is done with [vscode-languageserver](https://www.npmjs.com/package/vscode-languageserver). You have full access to the LSP API in Langium, so you can register additional message handlers or extend the protocol in a breeze.

The main code of Langium consists of a set of services that are connected via dependency injection (DI). You can override the default functionality and add your own service classes by specifying a DI module.

## Examples

The source repository of Langium includes [examples](https://github.com/eclipse-langium/langium/tree/main/examples) that demonstrate different use cases.

---
_Source: https://npm.io/package/langium · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
