# terraform-ls を Homebrew, MacPorts, Nix, scoop, winget でインストール

terraform-ls のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

追加のインストールコマンド:

### macOS

- Homebrew (100%):

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

  証拠: local Homebrew formula metadata

- MacPorts (94%):

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

  証拠: 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
```

  証拠: 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
```

  証拠: 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
```

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

## パッケージ情報

- **パッケージキー:** brew:terraform-ls
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.39.0
- **ソース概要:** Terraform Language Server
- **ホームページ:** <https://github.com/hashicorp/terraform-ls>
- **リポジトリ:** <https://github.com/hashicorp/terraform-ls>
- **最終更新:** 2026-07-26T00:50:35+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- terraform-ls (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.39.0
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

- 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.

### ソース

- <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


## セキュリティノート

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

- **Geiger リスク:** blue / 中
- broad file, network, media, or database tool signal

## 他のパッケージマネージャ記録

- 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


## Combined YAML source

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


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
