HCL v2 Parser for JavaScript

JSON →
library 1.0.1 ·javascript
verified May 27, 2026

This library provides a JavaScript parser for HCL (HashiCorp Configuration Language) version 2 syntax. It is currently at version 1.0.1 and appears to be actively maintained, being an updated fork of an unmaintained predecessor (`hcl2-parser`). Its key differentiator is robust support for HCL v2, which many other JavaScript parsers lack. It achieves this by wrapping the Go-based `tmccombs/hcl2json` library, transpiling the Go code to JavaScript using GopherJS. Unlike its unmaintained predecessor, this version correctly returns parsing errors to the user by rejecting a Promise, making it more reliable for production use cases like parsing Terraform configurations.

total hits 15
actors 7 distinct systems
last hit 2d ago human
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇳🇴 Norway · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France