npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@intentius/chant-lexicon-terraform

v0.79.0

Published

terraform lexicon for chant, existing Terraform root modules as declarable entities

Downloads

4,591

Readme

@intentius/chant-lexicon-terraform

Terraform lexicon plugin for chant.

Unlike the lexicons that generate typed resource classes from an upstream schema, this one reads the HCL an estate already has. Name your root modules in chant.config.ts and each .tf block joins the build as an entity, so the post-synth checks and chant audit can see the root without anything being written back over it.

// chant.config.ts
import type { ChantConfig } from "@intentius/chant/config";
import "@intentius/chant-lexicon-terraform";

export default {
  lexicons: ["terraform"],
  terraform: {
    binary: "terraform", // or "tofu"
    roots: {
      app: { dir: "./terraform", workspace: "prod", varFiles: ["prod.tfvars"] },
    },
  },
} satisfies ChantConfig;

dir resolves against the project root, the directory holding chant.config.ts. A root that does not exist, or a .tf the parser refuses, is a build warning and no entities for that root, never a failure.

Getting started

# Assemble dist/ (there is no upstream spec to fetch)
npm run bundle

# Validate the generated artifacts
just validate

# Generate the docs site
just docs

Project structure

  • src/plugin.ts, the LexiconPlugin, including the buildRoots() hook
  • src/config.ts, the terraform config namespace and its ChantConfig augmentation
  • src/hcl/parse.ts, one entity per HCL block, from a directory or from chant audit's joined-file form
  • src/hcl/roots.ts, the per-root render buildRoots() delegates to
  • src/serializer.ts, a deliberate no-op: the .tf files are the artifact
  • src/lint/rules/, source-level lint rules
  • src/lint/post-synth/, checks over the parsed roots (TF001 and up)
  • src/lsp/, LSP completions and hover

Acceptance evidence

Four describe blocks run this lexicon against a real terraform, tofu or choudoufu binary, and each of them skips rather than fails when its dependency is absent. src/__fixtures__/ACCEPTANCE.md records, per block, what it proves, what gates it, the command that runs it, and the last binary and emulator it passed against with the date. Two of the four have never passed against anything, and that file says so.