# 使用 Homebrew, apk, apt, MacPorts, Nix, pacman, zypper 安装 ccls

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

## 安装

```sh
sudo av install brew:ccls
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ccls
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ccls
```

  证据: MacPorts ports tree: devel/ccls/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add ccls
```

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

- Debian apt (92%):

```sh
sudo apt install ccls
```

  证据: Debian stable package indexes: ccls from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#ccls
```

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

- pacman (92%):

```sh
sudo pacman -S ccls
```

  证据: Arch Linux sync databases: ccls from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install ccls
```

  证据: openSUSE Tumbleweed package metadata: ccls from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:ccls
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ccls>
- **版本:** 0.20250815.1
- **来源摘要:** C/C++/ObjC language server
- **主页:** <https://github.com/MaskRay/ccls>
- **仓库:** <https://github.com/MaskRay/ccls>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/MaskRay/ccls/archive/refs/tags/0.20250815.1.tar.gz>
- **最后更新:** 2026-07-10T13:05:06-04:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- ccls (cli)
- ccls (别名)

## 依赖

- llvm

## 构建依赖

- cmake
- rapidjson

## 安装行为

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

## 版本和新鲜度

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

ccls is a C, C++, and Objective-C language server. Its README says it originates from cquery and supports completion, cross references, hierarchies, formatting, diagnostics, semantic highlighting, and whole-project indexing.

### 项目历史

The official GitHub repository was created in March 2018. The README explicitly frames ccls as originating from cquery, another C/C++ language-server project, and describes ccls' distinguishing emphasis on indexing the whole project while serving requests before indexing is complete.

### 采用历史

The supplied package facts show ccls packaged broadly across Alpine, Homebrew, Debian, MacPorts, Nix, Arch, Ubuntu, and openSUSE. That spread reflects language-server adoption by editors and distributions after the Language Server Protocol became common infrastructure.

### 使用方式

A typical ccls setup gives the server a project-root compile_commands.json generated by the build system, or a project-root .ccls file containing compiler flags. Editors then speak LSP to ccls for code completion, navigation, references, diagnostics, and semantic highlighting.

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

ccls is significant because it packages a clang-based language server as a standalone system dependency instead of binding users to one editor extension. For package managers, it is the sort of developer-tool daemon that makes editor integrations reproducible across machines.

### 时间线

- 2018: GitHub repository created.
- 2018: README documents ccls as originating from cquery and able to index itself, FreeBSD, glibc, Linux, LLVM, and musl.
- 2025: GitHub tags show continued dated releases.

### Related projects

- The README names cquery as the origin project and relies on clang-style compilation databases such as compile_commands.json.

### 来源

- <https://api.github.com/repos/MaskRay/ccls>
- <https://github.com/MaskRay/ccls>
- <https://github.com/MaskRay/ccls/wiki>
- <https://github.com/MaskRay/ccls#readme>
- <https://formulae.brew.sh/api/formula/ccls.json>


## 安全说明

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

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


## 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: <project-root>/compile_commands.json, <project-root>/.ccls
## 源数据库详情

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

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

- Debian apt - ccls - 0.20241108-1: normalized package name match | Debian stable package indexes: ccls from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C/C++/ObjC language server | https://github.com/MaskRay/ccls
- Nix - ccls: normalized package name match | nixpkgs package indexes: pkgs/by-name/cc/ccls/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ccls - 0.20240202-1: normalized package name match | Ubuntu 24.04 LTS package indexes: ccls from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C/C++/ObjC language server | https://github.com/MaskRay/ccls
- apk - ccls - 0.20250815.1-r1: normalized package name match | Alpine Linux edge package indexes: ccls from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C/C++/Objective-C language server | https://github.com/MaskRay/ccls
- pacman - ccls - 0.20250815.1-2: normalized package name match | Arch Linux sync databases: ccls from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting | https://github.com/MaskRay/ccls
- zypper - ccls - 0.20250815.1-2.4: normalized package name match | openSUSE Tumbleweed package metadata: ccls from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | C/C++/ObjC language server | https://github.com/MaskRay/ccls
- MacPorts - ccls: normalized package name match | MacPorts ports tree: devel/ccls/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control 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.
- [llvm](https://pkg.so/zh-hans/brew/llvm/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [astyle](https://pkg.so/zh-hans/brew/astyle/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools, objective-c.
- [dockerfile-language-server](https://pkg.so/zh-hans/brew/dockerfile-language-server/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, language-servers.
- [metals](https://pkg.so/zh-hans/brew/metals/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, language-servers.
- [neocmakelsp](https://pkg.so/zh-hans/brew/neocmakelsp/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, language-servers.
- [sql-language-server](https://pkg.so/zh-hans/brew/sql-language-server/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server-protocol, language-servers.
- [fennel-ls](https://pkg.so/zh-hans/brew/fennel-ls/) - Shares pkgdb curated category or tags: cli, developer-tools, language-server, language-servers.
- [ccache](https://pkg.so/zh-hans/brew/ccache/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [swig](https://pkg.so/zh-hans/brew/swig/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [vscode-languageserver](https://pkg.so/zh-hans/npm/vscode-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/ccls.yml](https://github.com/mxcl/pkgdb/blob/main/combined/ccls.yml)


## 来源

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