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

Steampipe

$ steampipe 官方出品 低风险
Turbot · 数据库与数据处理 · Apache-2.0 · macos / linux

steampipe 将 AWS、GCP、Azure、GitHub、Kubernetes 及本地 CSV/JSON 文件映射为嵌入式 PostgreSQL 外部表。Agent 可直接执行只读 SQL steampipe query "SELECT ..." --output json,免去编写繁琐的 API 分页脚本。

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

steampipe 用一条 --output json SQL 命令即可关联本地文件与在线云 API,在只读资产盘点场景下比多步 MCP 调用更稳健。

Agent 友好度体检单

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

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

FCRS-1.0 六维评分拆解

Agent 友好度 23 / 25

steampipe query 原生支持 --output json、--output csv、--output line 与 --export,传入 SQL 字符串或 .sql 文件即可无头运行。

  • steampipe query "..." --output json and --export work non-interactively
安全与权限边界 21 / 25

面向云 API 的外部表 SQL 查询本质上只读,并复用标准厂商环境变量与 .spc 配置。

  • Read-only SQL inventory queries over standard provider credentials
安装与运行摩擦 13 / 15

可通过 brew install turbot/tap/steampipe 与 Linux 包安装,但 Windows 需使用 WSL2 且首次运行会下载嵌入式 Postgres。

  • Supports macOS and Linux (WSL2 on Windows); downloads embedded Postgres on init
能力覆盖与边际价值 14 / 15

用标准 PostgreSQL SQL 统一 100+ 云与 SaaS API,并自带缓存与跨源 JOIN。

  • Single SQL layer across AWS, GCP, GitHub, Kubernetes, and local CSV/JSON
维护与来源背书 8 / 10

由 Turbot 维护(turbot/steampipe),采用 Apache-2.0 协议。

  • Official turbot/steampipe repository under Apache-2.0
文档与可验证性 8 / 10

steampipe.io/docs 提供详尽的 CLI 参数与插件表结构文档。

  • Complete CLI and table docs at steampipe.io

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

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

从 ~/.steampipe/config/*.spc 读取插件连接配置,并自动继承 AWS_*、GITHUB_TOKEN、GOOGLE_APPLICATION_CREDENTIALS 等标准环境变量。

潜在副作用
只读查询 本地写入
费用与配额提示

Apache-2.0 开源 CLI 免费;插件查询会消耗对应云服务或 SaaS 的 API 配额。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Steampipe Agent Rules
- Always pass `--output json` (or `--output csv`) on `steampipe query` for structured results.
- Use `WHERE` filters and `LIMIT` so plugin API calls do not trigger rate limits.
- Check `steampipe plugin list` before querying a provider table.

Agent 高频安全命令配方

只读查询(安全推荐)

以 JSON 执行云/SaaS SQL 查询
steampipe query "SELECT id, title, state FROM github_my_issue LIMIT 10" --output json

通过 SQL 查询已配置的 Steampipe 插件表并输出整洁的 JSON。

以 JSON 列出已安装的插件
steampipe plugin list --output json

查询前先以 JSON 检查已安装的 Steampipe 插件与版本。

核心优势

  • + 为 100+ 云与 SaaS API 提供只读 SQL 接口与 --output json 输出。
  • + 无缝复用 AWS_*、GITHUB_TOKEN 等现有凭据并支持响应缓存。

注意事项与踩坑点

  • ! 在大规模云账号下执行无过滤查询可能触发上游 API 限流。
  • ! 首次启动需初始化嵌入式 PostgreSQL 服务并按需安装插件(steampipe plugin install)。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI