# 使用 Homebrew, Nix 安装 solargraph

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

## 安装

```sh
sudo av install brew:solargraph
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install solargraph
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#solargraph
```

  证据: nixpkgs package indexes: solargraph from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## 软件包事实

- **软件包键:** brew:solargraph
- **软件包管理器:** Homebrew
- **版本:** 0.60.2
- **来源摘要:** Ruby language server
- **主页:** <https://solargraph.org>
- **仓库:** <https://github.com/castwide/solargraph>
- **最后更新:** 2026-06-28T04:59:39Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- solargraph (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Solargraph is a Ruby language server distributed as a gem and packaged for developer environments that want Ruby autocomplete, diagnostics, inline documentation, and type-aware editor support.

### 项目历史

The castwide/solargraph GitHub repository was created in March 2017, and RubyGems records version 0.1.0 on 2017-03-18. The gem was described early as IDE tools for code analysis and autocompletion, while the current README frames it as a Ruby language server.

Solargraph grew with the Language Server Protocol era. The README lists Visual Studio Code, Sublime Text, Vim and Neovim, Emacs, and Eclipse integrations, and the guide site describes editor integration as requiring a language client.

The project later expanded beyond autocomplete into diagnostics, inline documentation, type checking, YARD and RBS-aware code maps, Bundler-aware gem support, plugin support, and a separate documentation cache.

### 采用历史

RubyGems is Solargraph's primary distribution channel, with the official gem metadata pointing to solargraph.org and the GitHub source. Homebrew and Nix packages make the same CLI available to users who prefer system package managers over gem install.

Editor integration drove adoption: the official README calls the VS Code extension out directly and lists third-party integrations for several common editors, making solargraph a common bridge between Ruby projects and LSP-capable editors.

### 使用方式

Developers install the solargraph command, generate or maintain project configuration with bundle exec solargraph config, and run the server through editor integrations using stdio or TCP socket modes.

Project-local configuration lives in .solargraph.yml at the repository root, with optional global configuration at ~/.config/solargraph/config.yml. The README also documents a cache directory at ~/.cache/solargraph and Bundler-aware usage with bundle exec solargraph socket or stdio.

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

Solargraph matters to package nerds because it turns Ruby's dynamic runtime, gems, YARD docs, RBS signatures, Bundler context, and editor protocols into one packaged CLI service.

It also illustrates a packaging split familiar to language ecosystems: the upstream artifact is a Ruby gem, but system package managers package it so editors and shell environments can depend on a stable solargraph executable.

### 时间线

- 2017-03: GitHub repository and RubyGems 0.1.0 release appear.
- 2017-2020s: Solargraph becomes a Ruby LSP server integrated by VS Code and other editors.
- 2019: Version 0.33.0 adds type-checking functionality, according to the README.
- 2026: RubyGems lists Solargraph 0.60.2 with Ruby 3.1+ requirements and current source metadata.

### Related projects

- Language Server Protocol: the editor integration protocol Solargraph targets.
- YARD and RBS: documentation and type-information sources Solargraph uses for code maps.
- Bundler: important for running Solargraph in the same dependency context as a Ruby project.
- vscode-solargraph, nvim-lspconfig, coc-solargraph, eglot, and lsp-mode: editor integration paths listed by the upstream README.

### 来源

- current_curation.config-file-location
- <https://api.github.com/repos/castwide/solargraph>
- <https://github.com/castwide/solargraph#readme>
- <https://rubygems.org/api/v1/gems/solargraph.json>
- <https://rubygems.org/api/v1/versions/solargraph.json>
- <https://solargraph.org/guides/getting-started>
- source_facts.package-manager


## 安全说明

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



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .solargraph.yml
## 其他软件包管理器记录

- Nix - solargraph: normalized package name match | nixpkgs package indexes: solargraph from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## Combined YAML source

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


## 来源

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