# Install terraform-ls with Homebrew, MacPorts, Nix, scoop, winget

Terraform Language Server. Version 0.38.8 via Homebrew; verified 2026-07-02.

## Install

```sh
sudo av install brew:terraform-ls
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install terraform-ls
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install terraform-ls
```

  Evidence: MacPorts ports tree: devel/terraform-ls/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#terraform-ls
```

  Evidence: nixpkgs package indexes: pkgs/by-name/te/terraform-ls/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/terraform-ls
```

  Evidence: Scoop official bucket manifest trees: bucket/terraform-ls.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Hashicorp.TerraformLanguageServer -e
```

  Evidence: Windows Package Manager source index: Hashicorp.TerraformLanguageServer from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:terraform-ls
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/terraform-ls>
- **Version:** 0.38.8
- **Source summary:** Terraform Language Server
- **Homepage:** <https://github.com/hashicorp/terraform-ls>
- **Repository:** <https://github.com/hashicorp/terraform-ls>
- **Upstream docs:** <https://github.com/hashicorp/terraform-ls#readme>
- **License:** MPL-2.0
- **Source archive:** <https://github.com/hashicorp/terraform-ls/archive/refs/tags/v0.38.8.tar.gz>
- **Last updated:** 2026-07-02T12:13:07Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- terraform-ls (cli)
- terraform-ls (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.38.8
- Package-manager updated: 2026-07-02
- Local data: ok
- Upstream repository: https://github.com/hashicorp/terraform-ls
- Upstream latest detected: v0.38.8 (current)
## Project history and usage

terraform-ls is HashiCorp's official Terraform language server. It implements IDE features for LSP-compatible editors, including Terraform-oriented completion, diagnostics, formatting-related editor flows, go-to-definition, and workspace indexing.

### Project history

The hashicorp/terraform-ls repository was created on GitHub in February 2020. The README identifies it as the official Terraform language server maintained by HashiCorp and says it provides IDE features to any editor compatible with the Language Server Protocol.

The project followed an incremental release model from the beginning. Its README says not all language features are available at any one time and describes the project as actively delivering smaller updates. It also credits prior research and language-server implementation work, including Julio Sueiras's terraform-lsp.

### Adoption history

terraform-ls became the common packaged binary behind Terraform editor integrations. Its installation docs say some editors install and update the server automatically, including HashiCorp's Terraform VS Code extension and Sublime Text LSP-terraform, while manual installation is available through Homebrew, HashiCorp's apt/RPM repositories, and release archives.

The input package facts list Homebrew, MacPorts, Nix, Scoop, and winget packaging. That multi-platform packaging matters because language servers must be discoverable by editors on developer workstations, not only by Terraform users inside a single operating-system or language package ecosystem.

### How it is used

The normal interaction is through an IDE or editor plugin rather than by running ad hoc commands. The usage guide documents Terraform-related language IDs for `.tf`, `.tfvars`, Terraform Stack, Terraform Deploy, and Terraform Search files, and recommends opening folders so the server can index the workspace.

Manual editor configurations commonly invoke `terraform-ls serve`. The official usage guide includes examples for VS Code, Sublime Text, Vim, Neovim, coc.nvim, vim-lsp, YouCompleteMe, LanguageClient-neovim, and nvim-lspconfig.

### Why package nerds care

terraform-ls is important to package-manager users because it turns Terraform editor support into a separately versioned, installable binary. That matches the broader LSP model: editors can remain thin clients while the domain-specific intelligence ships as a command-line server.

For infrastructure developers, having terraform-ls in Homebrew, Nix, MacPorts, Scoop, winget, and HashiCorp package repositories means editor setups can be made reproducible in dotfiles, devcontainers, and workstation bootstrap scripts.

### Timeline

- 2020: GitHub repository created.
- 2020: Early v0.5.x through v0.11.0 releases published.
- 2020: Installation docs documented Homebrew and HashiCorp-maintained Linux packages.
- 2026: v0.38.8 listed as the latest GitHub release during research.
- 2026: v0.39.0 beta releases were also listed during research.

### Related projects

- The README ties terraform-ls to Terraform, HCL, the Language Server Protocol, HashiCorp's Terraform VS Code extension, Sublime Text LSP-terraform, and the earlier terraform-lsp implementation credited in the project.

### Sources

- <https://api.github.com/repos/hashicorp/terraform-ls>
- <https://github.com/hashicorp/terraform-ls#readme>
- <https://github.com/hashicorp/terraform-ls/blob/main/docs/USAGE.md>
- <https://github.com/hashicorp/terraform-ls/blob/main/docs/installation.md>
- <https://github.com/hashicorp/terraform-ls/releases>
- source_facts.package-manager


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** terraform-ls
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - terraform-ls: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/terraform-ls/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - terraform-ls: normalized package name match | MacPorts ports tree: devel/terraform-ls/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/terraform-ls: normalized package name match | Scoop official bucket manifest trees: bucket/terraform-ls.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Hashicorp.TerraformLanguageServer: normalized package name match | Windows Package Manager source index: Hashicorp.TerraformLanguageServer from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [terraform-lsp](https://www.automicvault.com/pkg/brew/terraform-lsp/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [codebook-lsp](https://www.automicvault.com/pkg/brew/codebook-lsp/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [dhall-lsp-server](https://www.automicvault.com/pkg/brew/dhall-lsp-server/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [efm-langserver](https://www.automicvault.com/pkg/brew/efm-langserver/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [fish-lsp](https://www.automicvault.com/pkg/brew/fish-lsp/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [gopls](https://www.automicvault.com/pkg/brew/gopls/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [jq-lsp](https://www.automicvault.com/pkg/brew/jq-lsp/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.
- [pkl-lsp](https://www.automicvault.com/pkg/brew/pkl-lsp/) - Shares av.db curated category or tags: cli, developer-tools, editor-integration, language-server, lsp.

## Combined YAML source

View the package source record on GitHub. [combined/terraform-ls.yml](https://github.com/automic-vault/db/blob/main/combined/terraform-ls.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
