Skip to content

Projects ​

Every Herb project works on the same syntax tree, so the linter, the formatter, the language server and the engine agree about what a template means. The first two groups are the ones you use in an app. The last one is for building your own tools on Herb.

Tools ​

Tools you install and run against your templates.

ProjectDescription
Herb LinterFinds mistakes and enforces conventions in HTML+ERB templates.
Herb FormatterFormats HTML+ERB templates consistently. (experimental)
Herb Language ServerDiagnostics, hovers and formatting in VS Code, Zed, Neovim and other editors.
Herb Dev ServerWatches your templates and patches the open page as you save. (experimental)
Herb Dev ToolsIn-browser tools for inspecting and debugging rendered templates.
Herb CLICombined command-line interface for working with HTML+ERB files. (coming soon)

Rendering ​

Projects that turn templates into HTML and keep it current in the browser.

ProjectDescription
Herb::EngineHTML-aware ERB rendering engine, API-compatible with Erubi.
Herb Client RuntimeUpdates the parts of a rendered page that changed, in place. (experimental)
ReActionViewReactive templates, error overlays and dev tools for Rails.

Building on Herb ​

Libraries for building your own tools on the Herb syntax tree.

ProjectDescription
CoreShared interfaces, syntax tree node definitions and common utilities.
AnalysisProject-wide template indexes, render call sites and partial resolution.
Language ServiceHTML+ERB language service with Action View tag helper support.
Syntax Tree PrinterLossless reconstruction of source from the syntax tree.
RewriterTransforms syntax tree nodes and formatted strings.
HighlighterSyntax highlighting and diagnostic rendering with terminal color support.
ConfigShared configuration loading and validation across Herb tools.
MinifierHTML+ERB template minification.

The parser ​

The Herb Parser is the foundation every project above is built on. It is written in C and available through bindings.

ProjectDescription
Herb Parser (C Library libherb)Fast, portable, HTML-aware ERB parser written in C.
Ruby BindingsUse the parser from Ruby.
JavaScript/Node.js BindingsUse the parser from Node.js and the browser.
Java BindingsUse the parser from Java.
Rust BindingsUse the parser from Rust.
WebAssembly BuildRun the parser in the browser and in Node.js through WebAssembly.