# 使用 Homebrew, Nix 安装 kubecfg

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

## 安装

```sh
sudo av install brew:kubecfg
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kubecfg
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#kubecfg
```

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

## 软件包事实

- **软件包键:** brew:kubecfg
- **软件包管理器:** Homebrew
- **版本:** 0.37.0
- **来源摘要:** Manage complex enterprise Kubernetes environments as code
- **主页:** <https://github.com/kubecfg/kubecfg>
- **仓库:** <https://github.com/kubecfg/kubecfg>
- **最后更新:** 2026-05-28T18:48:01Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- kubecfg (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

kubecfg is a Kubernetes configuration-management CLI built around Jsonnet. It lets teams describe Kubernetes resources as reusable code, render or diff them, and apply the resulting desired state to clusters.

### 项目历史

The kubecfg/kubecfg repository was created on 2021-11-17, and the first GitHub release listed by the releases API, v0.23.0, was published on 2021-12-21. The README describes kubecfg as a tool for managing Kubernetes resources as code and notes its similarity to a similarly named internal Google tool.

The project is intentionally thin around Jsonnet. Its README says kubecfg relies heavily on Jsonnet to describe Kubernetes resources and acts as a Kubernetes-specific wrapper around Jsonnet evaluation.

### 采用历史

kubecfg's adoption is concentrated in teams that want Kubernetes manifests in version control but need stronger abstraction and reuse than plain YAML. Its documentation and README emphasize reviewable configuration changes, reproducible desired state, and disaster-recovery-friendly infrastructure-as-code practices.

The Homebrew formula gives macOS and Linuxbrew users a package-manager path, while GitHub releases provide precompiled binaries for direct installation.

### 使用方式

Users write Jsonnet, JSON, or YAML inputs, then use kubecfg show, diff, update, and delete against Kubernetes resources. The README quickstart demonstrates rendering YAML, applying objects, comparing local desired state with the server, updating the cluster, and deleting the demo resources.

Features such as dependency-aware sorting, extra Jsonnet builtins, and optional garbage collection make kubecfg fit repositories where Kubernetes configuration is treated as code rather than as hand-edited deployment YAML.

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

kubecfg is interesting to package nerds because it represents the Jsonnet branch of Kubernetes configuration tooling. In the package ecosystem it sits beside Helm and Kustomize, but its core bet is a general-purpose data-templating language rather than chart packages or patch overlays.

Its small CLI shape also makes it a classic infrastructure-as-code package: installable by Homebrew, runnable in CI, and tied closely to the Kubernetes and Jsonnet release surfaces.

### 时间线

- 2021-11-17: GitHub repository created.
- 2021-12-21: GitHub release v0.23.0 published.
- 2021-12-22: GitHub release v0.24.0 published.
- 2026-05-28: GitHub release v0.37.0 published.

### Related projects

- Jsonnet is the data-templating language kubecfg relies on.
- Kubernetes is the target resource API.
- Helm and Kustomize solve adjacent Kubernetes configuration packaging and customization problems with different models.

### 来源

- <https://api.github.com/repos/kubecfg/kubecfg>
- <https://api.github.com/repos/kubecfg/kubecfg/releases>
- <https://formulae.brew.sh/formula/kubecfg>
- <https://github.com/kubecfg/kubecfg>
- <https://jsonnet.org/>
- <https://kubecfg.github.io/kubecfg>


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal

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

- Nix - kubecfg: normalized package name match | nixpkgs package indexes: pkgs/by-name/ku/kubecfg/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/kubecfg.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kubecfg.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
