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

Dynein

$ dy 官方出品 高风险
AWS Labs · 数据库与数据处理 · Apache-2.0 · macos / linux / windows

dynein(dy)是一款对人类和脚本都友好的 DynamoDB Rust CLI,能自动消除繁琐的 DynamoDB AttributeValue 语法({"S": ...}),直接使用标准 JSON。支持 dy list、dy desc、dy scan、dy get、dy put 及 dy export --format json|jsonl|csv。

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

dy 在本地自动完成 DynamoDB AttributeValue 与标准 JSON 的双向转换并读写 JSON/CSV 文件,比 aws dynamodb 或 MCP 更精炼。

Agent 友好度体检单

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

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

FCRS-1.0 六维评分拆解

Agent 友好度 19 / 25

export --format json|jsonl、desc 与 get 支持标准 JSON,但 dy export 需指定 --output-file 而非直接输出至标准输出,且 dy use 会修改全局状态。

  • dy export --format json|jsonl --output-file emits standard JSON; stateful dy use context
安全与权限边界 19 / 25

继承基于 IAM 权限隔离的 AWS 凭据,支持 --region local 对接 DynamoDB Local 测试,但 put/del/import 缺少 --dry-run。

  • Standard AWS IAM auth and --region local testing; no --dry-run flag
安装与运行摩擦 13 / 15

单一 Rust 二进制,可通过 Homebrew、Cargo 与 GitHub Releases 在 macOS、Linux 与 Windows 安装。

  • Available via brew install dynein and cargo install dynein
能力覆盖与边际价值 13 / 15

彻底免去日常查询与 JSON/CSV 导入时手写 aws dynamodb 类型描述符({"S": ...})的痛苦。

  • Automatic conversion between standard JSON and DynamoDB AttributeValues
维护与来源背书 8 / 10

由 AWS Labs 维护(awslabs/dynein),采用 Apache-2.0 协议。

  • Official awslabs/dynein repository under Apache-2.0
文档与可验证性 7 / 10

GitHub README 示例清晰且 Clap --help 详尽,但无独立文档站。

  • Documented in GitHub README and --help

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

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

复用标准 AWS SDK 凭据链(~/.aws/credentials、AWS_PROFILE、AWS_ACCESS_KEY_ID、IAM 角色),并在 ~/.dynein/ 保存当前表上下文。

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

Apache-2.0 开源 CLI 免费;DynamoDB 读写容量单元(RCU/WCU)与存储会产生 AWS 费用。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Dynein (dy) Agent Rules
- Always pass explicit `--region` and `--table` flags instead of relying on mutable `dy use` state.
- Remember `dy scan` samples items and consumes read capacity units (RCUs); use `dy get` or `dy query` with keys when possible.
- Never run `dy admin delete-table` or `dy del` without explicit approval.

Agent 高频安全命令配方

只读查询(安全推荐)

列出指定区域的 DynamoDB 表
dy --region us-east-1 list

使用标准 AWS 凭据列出 us-east-1 区域内的 DynamoDB 表。

以 JSON Lines 格式导出表数据
dy --region us-east-1 export --table users --format jsonl --output-file users.jsonl

将表记录以标准 JSON Lines 格式导出至 users.jsonl,无需 DynamoDB 类型包装。

受控写入与预演

向 DynamoDB 表写入单条记录
dy --region us-east-1 put --table users "user_123" '{"name": "Ada", "role": "admin"}'

使用标准 JSON 属性向 users 表插入或覆盖指定主键记录。

核心优势

  • + 自动将 DynamoDB AttributeValue 转换为干净的标准 JSON 与 JSONL。
  • + 支持 --region local 以便在 DynamoDB Local 中安全测试。

注意事项与踩坑点

  • ! dy use 会在 ~/.dynein/ 持久化当前表上下文,Agent 务必显式传递 --table 与 --region。
  • ! dy export 依赖 --output-file 落盘,无法直接流向标准输出。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI