# 使用 Homebrew, apk, apt, MacPorts, pacman, scoop, winget, Nix 安装 crystal

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

## 安装

```sh
sudo av install brew:crystal
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install crystal
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install crystal
```

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

### Linux

- apk (92%):

```sh
sudo apk add crystal
```

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

- Debian apt (92%):

```sh
sudo apt install crystal
```

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

- pacman (92%):

```sh
sudo pacman -S crystal
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#shards
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/crystal
```

  证据: Scoop official bucket manifest trees: bucket/crystal.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id CrystalLang.Crystal -e
```

  证据: Windows Package Manager source index: CrystalLang.Crystal from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:crystal
- **软件包管理器:** Homebrew
- **版本:** 1.21.0
- **来源摘要:** Fast and statically typed, compiled language with Ruby-like syntax
- **主页:** <https://crystal-lang.org/>
- **仓库:** <https://github.com/crystal-lang/crystal>
- **最后更新:** 2026-07-19T09:37:42Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- crystal (别名)
- shards (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Crystal is a compiled, statically type-checked programming language with Ruby-inspired syntax and a native-code toolchain. As a package, it is both a compiler/runtime and the delivery point for Shards, the distributed dependency manager used by Crystal libraries.

### 项目历史

The official birthday post says Crystal became one year old on September 3, 2013, placing the project's start in 2012. The project describes itself as born and raised at Manas, with goals that combine Ruby-like syntax, static type checking without pervasive annotations, C bindings, compile-time code generation, and efficient native code generation through LLVM.

### 采用历史

Crystal reached its 1.0 milestone in March 2021 after many years of development, thousands of contributions, and more than 450 contributors according to the official 1.0 announcement. That release mattered to adoption because it introduced a 1.x compatibility promise for language and standard-library behavior, which is the kind of stability signal package maintainers and production users wait for.

### 使用方式

Users install the crystal compiler to build command-line tools, services, and libraries with Ruby-like syntax and native output. The official homepage highlights the standard library, fibers, C bindings, macros, and Shards; the reference and API docs are the primary documentation surfaces for everyday development.

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

Crystal is unusually package-manager-shaped for a language runtime: the official install page distinguishes official packages, system packages, and community-maintained packages, and says Homebrew is the most popular installation method. The same page lists Debian/Ubuntu, Alpine, Arch, Homebrew, Nix, Scoop, WinGet, MSYS2, FreeBSD, OpenBSD, and other routes, so downstream packaging is a central part of how users receive the language.

### 时间线

- 2012: The project began, inferred from the official one-year birthday post dated September 4, 2013.
- 2013: The official birthday post described Crystal as similar to Ruby but compiled to native machine code with LLVM.
- 2021: Crystal 1.0 was announced with a 1.x compatibility promise.
- 2026: The official homepage release notes listed Crystal 1.20.2 on May 15, 2026.

### Related projects

- Crystal is distributed with Shards for dependencies, uses LLVM for native code generation, and supports C library bindings. Its ecosystem also includes the Crystal Forum, play.crystal-lang.org, and community tools such as ICR.

### 来源

- <https://crystal-lang.org/>
- <https://github.com/crystal-lang/crystal>
- <https://crystal-lang.org/2013/09/04/happy-birthday-crystal/>
- <https://crystal-lang.org/2021/03/22/crystal-1.0-what-to-expect/>
- <https://crystal-lang.org/install/>


## 安全说明

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


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

- Debian apt - crystal - 1.14.0+dfsg-1: normalized package name match | Debian stable package indexes: crystal from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | compiler of the Crystal object-oriented programming language | https://crystal-lang.org/
- Debian apt - crystal-doc - 1.14.0+dfsg-1: normalized package name match | Debian stable package indexes: crystal-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | API documentation for the Crystal object-oriented programming language | https://crystal-lang.org/
- Debian apt - crystal-samples - 1.14.0+dfsg-1: normalized package name match | Debian stable package indexes: crystal-samples from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | samples for the Crystal object-oriented programming language | https://crystal-lang.org/
- Ubuntu apt - crystal - 1.11.2+dfsg-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: crystal from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | compiler of the Crystal object-oriented programming language | https://crystal-lang.org/
- Ubuntu apt - crystal-doc - 1.11.2+dfsg-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: crystal-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | API documentation for the Crystal object-oriented programming language | https://crystal-lang.org/
- Ubuntu apt - crystal-samples - 1.11.2+dfsg-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: crystal-samples from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | samples for the Crystal object-oriented programming language | https://crystal-lang.org/
- apk - crystal - 1.21.0-r0: normalized package name match | Alpine Linux edge package indexes: crystal from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The Crystal Programming Language | https://crystal-lang.org/
- apk - crystal-bash-completion - 1.21.0-r0: normalized package name match | Alpine Linux edge package indexes: crystal-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for crystal | https://crystal-lang.org/
- apk - crystal-doc - 1.21.0-r0: normalized package name match | Alpine Linux edge package indexes: crystal-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The Crystal Programming Language (documentation) | https://crystal-lang.org/
- apk - crystal-fish-completion - 1.21.0-r0: normalized package name match | Alpine Linux edge package indexes: crystal-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for crystal | https://crystal-lang.org/
- apk - crystal-zsh-completion - 1.21.0-r0: normalized package name match | Alpine Linux edge package indexes: crystal-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for crystal | https://crystal-lang.org/
- pacman - crystal - 1.21.0-1: normalized package name match | Arch Linux sync databases: crystal from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The Crystal Programming Language | https://crystal-lang.org
- MacPorts - crystal: normalized package name match | MacPorts ports tree: lang/crystal/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/crystal: normalized package name match | Scoop official bucket manifest trees: bucket/crystal.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - CrystalLang.Crystal: normalized package name match | Windows Package Manager source index: CrystalLang.Crystal from https://cdn.winget.microsoft.com/cache/source.msix
- MacPorts - shards: installed executable or alias match | MacPorts ports tree: devel/shards/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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