PHPackages                             cline/hcl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. cline/hcl

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

cline/hcl
=========

HCL (HashiCorp Configuration Language) parser for PHP

2.0.3(4mo ago)13561MITPHPPHP ^8.4.0CI passing

Since Mar 4Pushed 4mo agoCompare

[ Source](https://github.com/faustbrian/hcl)[ Packagist](https://packagist.org/packages/cline/hcl)[ RSS](/packages/cline-hcl/feed)WikiDiscussions 2.x Synced 2d ago

READMEChangelog (1)Dependencies (5)Versions (6)Used By (1)

[![GitHub Workflow Status](https://github.com/faustbrian/hcl/actions/workflows/quality-assurance.yaml/badge.svg)](https://github.com/faustbrian/hcl/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/c60b221d8fd43f481d287a712b8f272cd14f795faa4440ac2158de8564d85923/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c696e652f68636c2e737667)](https://packagist.org/packages/cline/hcl)[![Software License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2743908a870b29c6b4b7f4564a9c5b3d6bb968d93e5519428be57bcaf76c6d92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c696e652f68636c2e737667)](https://packagist.org/packages/cline/hcl)

---

A pure PHP parser for HCL (HashiCorp Configuration Language). Parse, validate, and convert HCL to JSON and back.

Requirements
------------

[](#requirements)

> **Requires [PHP 8.4+](https://php.net/releases/)**

Installation
------------

[](#installation)

```
composer require cline/hcl
```

Documentation
-------------

[](#documentation)

- **[Getting Started](DOCS.md#doc-cookbooks-getting-started)** - Installation and basic usage
- **[HCL Syntax](DOCS.md#doc-cookbooks-hcl-syntax)** - Complete syntax reference
- **[Expressions](DOCS.md#doc-cookbooks-expressions)** - Operators, conditionals, and for expressions
- **[JSON Conversion](DOCS.md#doc-cookbooks-json-conversion)** - Convert between HCL and JSON
- **[Validation](DOCS.md#doc-cookbooks-validation)** - Validate configuration files

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/faustbrian/hcl/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Brian Faust](https://github.com/faustbrian)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance74

Regular maintenance activity

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

5

Last Release

146d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22145591?v=4)[Brian Faust](/maintainers/faustbrian)[@faustbrian](https://github.com/faustbrian)

---

Top Contributors

[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (11 commits)")

---

Tags

phpconfigurationparserhashicorphclterraform

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cline-hcl/health.svg)

```
[![Health](https://phpackages.com/badges/cline-hcl/health.svg)](https://phpackages.com/packages/cline-hcl)
```

###  Alternatives

[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)[romanpitak/nginx-config-processor

Nginx configuration files processor.

6936.1k1](/packages/romanpitak-nginx-config-processor)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
