Higress CLI (hgctl)
$ hgctl 官方出品 中风险hgctl 是阿里巴巴开源的 AI 原生 API 网关 Higress(9.9k+ 星标,Apache-2.0)官方 Go 命令行工具,用于管理控制面/数据面安装、Kubernetes --context/--kubeconfig 切换、声明式 -f 配置文件与 Wasm 插件开发,并附带官方 SKILL.md。
https://github.com/higress-group/higress/releases hgctl 适合处理 Higress 网关安装、升级与 Wasm 插件生命周期管理;动态 AI 路由变更可结合 Higress Console 或 MCP 管理接口协同。
核心事实概览
- 命令名
- $ hgctl
- FCRS-1.0 总分
- 80/100 (良好 (Good))
- 证据置信度
- 中置信度 (源码/文档)
- CLI vs MCP 建议
- CLI + MCP 搭配
- 评测日期
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
提供官方 SKILL.md(official_skill),支持声明式 -f YAML/JSON 配置与 --set 参数覆盖,但缺少通用 --json 输出参数。
- Ships
SKILL.md(official_skill) and-f/--setdeclarative flags
支持显式 --kubeconfig 与 --context 集群上下文隔离,降低误操作生产集群的风险。
- Explicit
--kubeconfigand--contextcluster targeting
单文件 Go 二进制通过 GitHub Releases 分发,完整网关部署需依赖 Docker 或 Kubernetes 环境。
- Go binary distributed via
higress-group/higressreleases
大幅简化 Higress AI 网关安装、Profile 切换与 Wasm 插件工程化流程。
- Dedicated Higress gateway lifecycle and plugin management
由阿里巴巴与社区在 higress-group/higress(9.9k+ 星标,Apache-2.0)官方积极维护。
- Official
higress-group/higressrepo (9.9k+ stars, Apache-2.0)
在 higress.ai 拥有清晰的 hgctl 操作指南及仓库内置 SKILL.md。
- Official
hgctldocs on higress.ai andSKILL.md
安全边界、鉴权与放权指南
复用本地 Kubernetes 凭证(~/.kube/config 或 --kubeconfig)及 Docker/Helm 上下文执行网关部署。
开源免费(Apache-2.0);运行网关需自备 Kubernetes 或 Docker 基础设施资源。
# hgctl Agent Rules - Always pass `--context` or `--kubeconfig` explicitly when targeting Kubernetes clusters. - Inspect `hgctl profile list` and pass `-f config.yaml` rather than mutating production clusters interactively. - Require user approval before running `hgctl uninstall` or upgrading production gateways.
Agent 高频安全命令配方
只读查询(安全推荐)
hgctl version
输出客户端及已连接 Higress 控制面的版本元数据。
hgctl profile list
列出内置安装模板(k8s、local-k8s、standalone)。
受控写入与预演
hgctl install --set profile=local-k8s --context kind-higress
在指定的本地 Kind Kubernetes 上下文中部署 Higress。
核心优势
- + 在
higress-group/higress仓库内随附官方SKILL.mdAgent 指南。 - + 支持
--context、--kubeconfig与-f声明式 Profile 部署。 - + AI 原生网关社区活跃度高(9.9k+ 星标)。
注意事项与踩坑点
- ! 定位偏重网关运维安装而非结构化
--json数据查询。 - ! 暂无 Homebrew 核心配方,需通过官方安装脚本或 GitHub Releases 获取。