CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Atmos

$ atmos 官方出品 高风险
Cloud Posse · 云原生与基础设施 · Apache-2.0 · macos / linux / windows

atmos 将 Terraform/OpenTofu 组件代码与多环境 Stack YAML 配置解耦,方便管理多账号、多区域基础设施。其 atmos describe 子命令可直接输出 JSON/YAML 格式的解析配置,而 atmos terraform plan 支持按 Stack 非交互执行。

FCRS-1.0 综合评分
87 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install atmos
CLI vs MCP 选型建议 仅 CLI 可用

本地 Stack YAML 解析器与 Terraform/Helmfile 包装器;atmos describe 可直接返回解析后的 JSON 变量。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
✓ 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 21 / 25

具备强有力的结构化自省能力(atmos describe component --format json、atmos describe affected --format json)与工作流 --dry-run 支持。

  • Native --format json on describe and list commands
  • Supports --dry-run on workflow execution
安全与权限边界 19 / 25

将只读的 describe/validate/plan 与 apply/destroy 隔离,但调用 terraform apply 与 helmfile apply 仍具真实云端变更风险。

  • Schema validation (atmos validate stacks) catches config errors pre-run
  • Wraps live terraform apply and destroy operations
安装与运行摩擦 15 / 15

静态 Go 单二进制,全平台覆盖 Homebrew、Go、apt/apk 与 GitHub Releases。

  • Static Go binary with zero external script dependencies
能力覆盖与边际价值 14 / 15

一步把多层 YAML 继承解析为完整 JSON,Agent 无需手动追踪数十个导入文件。

  • describe component and describe affected eliminate manual YAML merging
维护与来源背书 9 / 10

Cloud Posse 官方主力 CLI(cloudposse/atmos),Apache-2.0 协议持续维护。

  • Maintained by Cloud Posse under Apache-2.0
文档与可验证性 9 / 10

atmos.tools 提供完善的命令手册与架构文档。

  • Comprehensive CLI docs at atmos.tools/cli/commands/

安全边界、鉴权与放权指南

鉴权方式
无需鉴权 环境变量密钥 本地配置文件
凭证存储位置

读取本地 atmos.yaml 及可选的 AWS SSO/身份配置;云端认证透传给标准 AWS/GCP/Azure 环境变量或 Profile。

潜在副作用
只读查询 本地写入 远端写入 破坏性删除
费用与配额提示

Cloud Posse 旗下 Apache-2.0 开源项目,完全免费。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Atmos Agent Rules
- Inspect resolved stack variables via `atmos describe component <comp> -s <stack> --format json` first.
- Restrict agent mutations to `atmos terraform plan` and `atmos validate`; never run `apply` or `destroy` without approval.
- Always pass `-s <stack>` explicitly to avoid ambiguity.

Agent 高频安全命令配方

只读查询(安全推荐)

以 JSON 导出解析后的组件配置
atmos describe component vpc -s ue1-prod --format json

将多层继承与深度合并后的 Stack 变量解析为单个 JSON 载荷,不触碰云基础设施。

对指定 Stack 执行 Terraform Plan
atmos terraform plan vpc -s ue1-prod

生成 .tfvars.json 并对目标 Stack 运行只读 terraform plan。

受控写入与预演

为组件生成 Backend 配置
atmos terraform generate backend vpc -s ue1-prod

在本地为指定组件与 Stack 生成 backend.tf.json 文件。

核心优势

  • + atmos describe component -s <stack> --format json 一次调用即可展平复杂 YAML 继承。
  • + atmos describe affected --format json 基于 Git 变更精准识别受影响组件。
  • + 内置 atmos validate stacks 支持 Stack 配置 Schema 校验。

注意事项与踩坑点

  • ! 底层包装的 terraform apply 与 destroy 若被误调用仍会修改真实云资源。
  • ! 强依赖符合 atmos.yaml 规范的目录结构。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI