# 使用 Homebrew, Nix 安装 metals

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

## 安装

```sh
sudo av install brew:metals
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install metals
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#metals
```

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

## 软件包事实

- **软件包键:** brew:metals
- **软件包管理器:** Homebrew
- **版本:** 1.6.7
- **来源摘要:** Scala language server
- **主页:** <https://scalameta.org/metals/>
- **仓库:** <https://github.com/scalameta/metals>
- **最后更新:** 2026-06-22T14:05:28-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- metals (别名)
- metals-mcp (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.6.7
## 项目历史与用法

Metals is the Scala language server from the Scalameta ecosystem. The name is explained by the project as Meta, from Scalameta, plus LS, from Language Server. Early public announcements credited work at the Scala Center with community contributors, and Ólafur Páll Geirsson announced Metals 0.3 and 0.4 releases during the 2018-2019 period as a work-in-progress language server for Scala editors.

### 项目历史

Metals' technical role is to bring IDE features to editors that speak the Language Server Protocol. The 2019 Scala language blog described Metals 0.5 as supporting completions, type at point, goto definition, fuzzy symbol search, and other editing and navigation features in VS Code, Vim, Emacs, Atom, Sublime Text, and any compatible LSP client. The tool also connected the editor side of Scala tooling to build tools through Bloop and the Build Server Protocol, allowing support for sbt, Gradle, Maven, Mill, and any build tool implementing BSP.

### 采用历史

Version 1.0.0, codenamed Silver, was announced in July 2023 as a culmination of work by the community and core Metals team, with support for important LSP features and IDE-like workflows in users' editors. Metals documentation names Scala Center and VirtusLab among the organizations developing Metals with community help.

### 使用方式

In practice, Metals is installed by editor plugins or as a standalone language-server binary, then launched by VS Code, Neovim, Emacs, Sublime Text, Zed, Helix, or another client. Homebrew and Nix packaging make the server available outside editor-specific installers, which matters for reproducible developer machines, CI checks around editor tooling, and users who prefer to manage language servers through the OS package manager.

### 来源

- <https://formulae.brew.sh/formula/metals>
- <https://github.com/scalameta/metals>
- <https://scalameta.org/metals/blog/2019/01/24/tin/>
- <https://scalameta.org/metals/blog/2023/07/19/silver/>
- <https://scalameta.org/metals/docs/integrations/new-build-tool/>
- <https://users.scala-lang.org/t/metals-v0-3-is-out-compile-errors-and-goto-definition-in-the-editor/3681>
- <https://www.scala-lang.org/2019/04/16/metals.html>


## 安全说明

没有找到 metals 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


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

- Nix - metals: normalized package name match | nixpkgs package indexes: pkgs/by-name/me/metals/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/metals.yml](https://github.com/mxcl/pkgdb/blob/main/combined/metals.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
