# 使用 Homebrew, apk, dnf, MacPorts, Nix 安装 libucl

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

## 安装

```sh
sudo av install brew:libucl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libucl
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libucl
```

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

### Linux

- apk (92%):

```sh
sudo apk add libucl
```

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

- dnf (92%):

```sh
sudo dnf install libucl
```

  证据: Fedora Rawhide package metadata: libucl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libucl
```

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

## 软件包事实

- **软件包键:** brew:libucl
- **软件包管理器:** Homebrew
- **版本:** 0.9.4
- **来源摘要:** Universal configuration library parser
- **主页:** <https://github.com/vstakhov/libucl>
- **仓库:** <https://github.com/vstakhov/libucl>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ucl_chargen (别名)
- ucl_objdump (别名)
- ucl_tool (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

libucl is Vsevolod Stakhov's C library for Universal Configuration Language, a configuration syntax designed to be easier for humans to edit than strict JSON while remaining machine-readable and JSON-compatible.

### 项目历史

The libucl README describes UCL as a configuration language heavily influenced by nginx-style configuration while remaining compatible with JSON. The library parses UCL and can also operate with JSON, MessagePack, S-expressions, and limited YAML output.

Public tags show early 0.2.x releases in December 2013 and 0.7.x by February 2015. After a long 0.8-era gap, GitHub releases show renewed release activity in 2023 and a 0.9 series beginning in February 2024.

### 采用历史

UCL found its strongest adoption in systems and infrastructure software where maintainers wanted structured configuration without strict JSON's editing friction. Rspamd documents UCL as its configuration language, and the FreeBSD Handbook notes that some applications such as pkg(8) started using UCL.

The library's package presence across Unix-like package managers reflects that adoption pattern: it is a small C parser and utility package that other software can embed or link for configuration parsing.

### 使用方式

Developers use libucl to parse configuration files with comments, unquoted keys, optional separators, implicit arrays, variables, macros, includes, human-friendly numeric suffixes, and validation. The README cautions that full-featured parsing with macros, includes, file I/O, and URL includes is intended for trusted administrator-controlled configuration rather than hostile input.

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

libucl is package-nerd interesting because it sits at the crossroads of config-language taste, Unix administration, FreeBSD tooling, and embeddable C libraries. It is a pragmatic alternative to forcing strict JSON into files humans edit by hand.

### 时间线

- 2013: Public tag 0.2.0 was created in December 2013.
- 2014: FreeBSD's ports tree added textproc/libucl in November 2014.
- 2015: Public tag 0.7.2 was created in February 2015.
- 2023: GitHub releases page lists libucl 0.8.2 on January 8, 2023.
- 2024: GitHub releases page lists libucl 0.9.0 on February 1, 2024.

### Related projects

- Rspamd is a major user and documentation source for the UCL syntax.
- FreeBSD pkg(8) is cited by the FreeBSD Handbook as an application family using UCL.
- JSON, YAML, MessagePack, and nginx-style configuration are adjacent formats or influences named by the project documentation.

### 来源

- <https://docs.freebsd.org/en/books/handbook/config/>
- <https://docs.rspamd.com/configuration/ucl/>
- <https://github.com/vstakhov/libucl>
- <https://github.com/vstakhov/libucl/releases>
- <https://www.freshports.org/textproc/libucl>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

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

- Nix - libucl: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libucl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - libucl - 0.9.0-r0: normalized package name match | Alpine Linux edge package indexes: libucl from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Universal configuration library parser | https://github.com/vstakhov/libucl
- apk - libucl-dev - 0.9.0-r0: normalized package name match | Alpine Linux edge package indexes: libucl-dev from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Universal configuration library parser (development files) | https://github.com/vstakhov/libucl
- apk - libucl-doc - 0.9.0-r0: normalized package name match | Alpine Linux edge package indexes: libucl-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Universal configuration library parser (documentation) | https://github.com/vstakhov/libucl
- dnf - libucl - 0.8.2-15.fc45: normalized package name match | Fedora Rawhide package metadata: libucl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Universal configuration library parser | https://github.com/vstakhov/libucl
- dnf - libucl-devel - 0.8.2-15.fc45: normalized package name match | Fedora Rawhide package metadata: libucl-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | libucl development files | https://github.com/vstakhov/libucl
- dnf - python3-libucl - 0.8.2-15.fc45: normalized package name match | Fedora Rawhide package metadata: python3-libucl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Python bindings for libucl | https://github.com/vstakhov/libucl
- MacPorts - libucl: normalized package name match | MacPorts ports tree: devel/libucl/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/libucl.yml](https://github.com/mxcl/pkgdb/blob/main/combined/libucl.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
