Nacos CLI
$ nacos 官方出品 中风险Nacos CLI(nacos / nacos-cli)是 nacos-group/nacos-cli 官方推出的 Go 命令行工具,用于查看与管理 Nacos 配置、命名空间、服务实例以及 AI 技能/Agent 规范;支持多连接 Profile(profile set)及 none、nacos、aliyun、sts-hiclaw 等多种认证模式,可通过 @nacos-group/cli 或安装脚本部署。
npm install -g @nacos-group/cli nacos 可直接使用本地保存的连接配置直连内网/VPC Nacos 集群,无需通过中间 MCP 服务器暴露注册中心凭证。
核心事实概览
- 命令名
- $ nacos
- FCRS-1.0 总分
- 69/100 (可用但有局限)
- 证据置信度
- 中置信度 (源码/文档)
- CLI vs MCP 建议
- 优先选 CLI
- 评测日期
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
提供无交互的 profile set 与子命令参数,但仍处于早期演进阶段,各子命令尚缺乏统一的 --json 与 --dry-run 支持。
- Non-interactive
profile setsubcommands - Early-stage CLI lacking universal
--jsonoutput across subcommands
支持命名连接 Profile 以及 nacos/aliyun/sts-hiclaw 认证模式进行访问隔离,但覆盖写入配置前缺少内置预演功能。
- Named connection profiles and
nacos/aliyun/sts-hiclawauth modes
跨平台 Go 二进制,可通过 npm install -g @nacos-group/cli、官方安装脚本或 go build 获取。
- Available via
@nacos-group/clion npm and Nacos installer scripts
免去手写 Nacos HTTP API curl 脚本,便捷管理配置、命名空间与 AI 规范。
- Wraps Nacos config, namespace, and AI skill/spec management
由 Nacos 官方组织在 nacos-group/nacos-cli 仓库维护,目前仍属新兴项目(44 星标)。
- Official
nacos-group/nacos-clirepo (44 stars)
在 Nacos 官方文档与 --help 中有基础说明,边界参数与示例相对精简。
- Nacos CLI reference page on nacos.io
安全边界、鉴权与放权指南
将服务器地址、端口及认证模式(nacos、aliyun、sts-hiclaw)保存在本地 ~/.nacos/ 目录的 Profile 配置中。
开源免费(Apache-2.0);可对接自建 Nacos 或阿里云 MSE Nacos。
# Nacos CLI Agent Rules - Always verify active profile host, port, and namespace before reading or publishing configs. - Target staging namespaces explicitly before modifying production Nacos configuration keys. - Require user approval before deleting configs or deregistering service instances.
Agent 高频安全命令配方
只读查询(安全推荐)
nacos-cli --help
列出可用的配置、服务与 Profile 管理子命令。
受控写入与预演
nacos-cli profile set default host=127.0.0.1
在执行命令前将 default Profile 的主机固定为本地 Nacos 实例。
核心优势
- + 支持
none、nacos、aliyun、sts-hiclaw等多种认证后端及命名 Profile。 - + 可通过
npm install -g @nacos-group/cli或官方安装脚本快速安装。 - + 替代手写繁琐的 Nacos OpenAPI curl 脚本。
注意事项与踩坑点
- ! 项目处于早期阶段(44 星标),结构化
--json输出标准化程度与示例文档尚待完善。 - ! 不同安装方式下可执行文件名可能为
nacos或nacos-cli。
已验证兼容的 Agent 宿主
Follow 家族生态联动
同分类相关 CLI: 云原生与基础设施
进入分类页 →nats-server — 云原生与基础设施命令行工具(High-Performance server for NATS.io, the cloud and edge native messaging system)
nelm — 云原生与基础设施命令行工具(Nelm is a Helm 3 alternative. It is a Kubernetes deployment tool that manages Helm Charts )
mongodb-atlas-cli — 云原生与基础设施命令行工具(MongoDB Atlas CLI and MongoDB CLI enable you to manage your MongoDB in the Cloud)
netfetch — 云原生与基础设施命令行工具(Kubernetes tool for scanning clusters for network policies and identifying unprotected wor)