# 使用 Homebrew, apk, Nix 安装 tofu-ls

查看 tofu-ls 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tofu-ls
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add tofu-ls
```

  证据: Alpine Linux edge package indexes: tofu-ls from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

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

  证据: nixpkgs package indexes: pkgs/by-name/to/tofu-ls/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:tofu-ls
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/tofu-ls>
- **版本:** 0.5.3
- **来源摘要:** OpenTofu Language Server
- **主页:** <https://opentofu.org>
- **仓库:** <https://github.com/opentofu/tofu-ls>
- **上游文档:** <https://opentofu.org>
- **许可证:** MPL-2.0
- **源码归档:** <https://github.com/opentofu/tofu-ls/archive/refs/tags/v0.5.3.tar.gz>
- **最后更新:** 2026-07-26T00:51:25+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- tofu-ls (cli)
- tofu-ls (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.5.3
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/opentofu/tofu-ls
- 检测到的最新版本: v0.5.3 (当前)
## 项目历史与用法

tofu-ls is the official OpenTofu language server, maintained by the OpenTofu Core Team to bring OpenTofu-aware editor features to LSP-compatible editors.

### 项目历史

OpenTofu grew out of the Terraform licensing change of August 10, 2023; the OpenTofu manifesto says the fork was made public after HashiCorp did not restore an open-source license by August 25, 2023. OpenTofu later became a Linux Foundation project.

The tofu-ls README describes the server as a work-in-progress official language server, inspired by HashiCorp's terraform-ls and intended to deliver smaller incremental updates over time.

### 采用历史

OpenTofu reached its first stable release on January 10, 2024, as a production-ready, community-driven Terraform fork. As the OpenTofu ecosystem matured, official editor tooling became part of the project story.

The tofu-ls installation docs describe automatic installation through the OpenTofu VS Code and Zed extensions, manual installation from GitHub releases, and Homebrew installation for macOS and Linux. The input package facts also list apk, Homebrew, and Nix packaging.

### 使用方式

Users normally run tofu-ls through an editor or IDE plugin rather than invoking it directly. The usage docs cover OpenTofu and Terraform language IDs, .tf, .tofu, and .tfvars files, workspace indexing, completion, hover, formatting, semantic tokens, references, symbols, and editor-specific setup for Vim/Neovim, Emacs, VS Code, Zed, Kate, Helix, and other clients.

### 为什么软件包爱好者会关心

For package and editor-tooling users, tofu-ls is the small binary that lets OpenTofu fit into the standard LSP packaging pattern: install one executable with a package manager, point the editor client at it, and keep infrastructure-as-code feedback local to the editor.

### 时间线

- 2023-08-10: HashiCorp changed Terraform from MPL to BUSL, according to the OpenTofu manifesto.
- 2023-08-25: The OpenTofu fork was created after the license-change appeal deadline described in the manifesto.
- 2024-01-10: OpenTofu 1.6.0 became the first stable, production-ready OpenTofu release.
- Current: tofu-ls is the official OpenTofu Core Team language server and is packaged for apk, Homebrew, and Nix in the input facts.

### Related projects

- OpenTofu is the infrastructure-as-code project that tofu-ls serves.
- terraform-ls is credited by tofu-ls as the starting point and inspiration for the OpenTofu language server.
- The OpenTofu VS Code and Zed extensions can install or manage tofu-ls for users.

### 来源

- <https://github.com/opentofu/tofu-ls#readme>
- <https://github.com/opentofu/tofu-ls/blob/main/docs/USAGE.md>
- <https://github.com/opentofu/tofu-ls/blob/main/docs/features.md>
- <https://github.com/opentofu/tofu-ls/blob/main/docs/installation.md>
- <https://opentofu.org/blog/opentofu-is-going-ga/>
- <https://opentofu.org/manifesto/>
- source_facts.package-manager


## 安全说明

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

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** tofu-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

## 其他软件包管理器记录

- Nix - tofu-ls: normalized package name match | nixpkgs package indexes: pkgs/by-name/to/tofu-ls/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - tofu-ls - 0.5.3-r1: normalized package name match | Alpine Linux edge package indexes: tofu-ls from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | OpenTofu language server | https://github.com/opentofu/tofu-ls/
- apk - tofu-ls-doc - 0.5.3-r1: normalized package name match | Alpine Linux edge package indexes: tofu-ls-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | OpenTofu language server (documentation) | https://github.com/opentofu/tofu-ls/


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [terraform-ls](https://pkg.so/zh-hans/brew/terraform-ls/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, lsp, terraform.
- [terraform-lsp](https://pkg.so/zh-hans/brew/terraform-lsp/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, lsp, terraform.
- [terragrunt](https://pkg.so/zh-hans/brew/terragrunt/) - Shares pkgdb curated category or tags: cli, developer-tools, opentofu, terraform.
- [lua-language-server](https://pkg.so/zh-hans/brew/lua-language-server/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, lsp.
- [gopls](https://pkg.so/zh-hans/brew/gopls/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, lsp.
- [tenv](https://pkg.so/zh-hans/brew/tenv/) - Shares pkgdb curated category or tags: cli, developer-tools, opentofu, terraform.
- [jdtls](https://pkg.so/zh-hans/brew/jdtls/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, lsp.
- [python-lsp-server](https://pkg.so/zh-hans/brew/python-lsp-server/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, lsp.
- [actions-languageserver](https://pkg.so/zh-hans/brew/actions-languageserver/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, developer, developer-tools, language, language-server.

## Combined YAML source

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


## 来源

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