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

Mods

$ mods 社区开源 中风险
Charmbracelet · AI 能力与音视频 · MIT · macos / linux / windows

mods 是 Charmbracelet 开发的 Go CLI,可将命令输出通过管道送入 OpenAI、Anthropic 或 Ollama 模型处理,支持 --raw 原始输出与 -f json 格式化。注意:charmbracelet/mods 已于 2026 年 3 月归档,官方重心转向 Crush。

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

面向管道的 LLM 工具(mods -r -f json);鉴于 mods 已于 2026 年 3 月归档,新项目建议优先使用持续维护的 llm 或 aichat。

Agent 友好度体检单

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

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

FCRS-1.0 六维评分拆解

Agent 友好度 20 / 25

支持 -r(--raw)、-f json、-q 与 --no-cache 适配管道执行,但 -M 与 --settings 为交互界面。

  • Supports -r (--raw), -f json, --quiet, and --no-cache
安全与权限边界 20 / 25

涉及远端 LLM API 计费,且默认将对话保存在 ~/.config/mods/conversations/(除非传 --no-cache)。

  • Persists chat logs locally unless --no-cache is set
安装与运行摩擦 14 / 15

静态单 Go 二进制,可通过 brew、go install 与 GitHub Releases 安装。

  • Zero-dependency static Go binary across macOS, Linux, Windows
能力覆盖与边际价值 12 / 15

管道体验简洁流畅,但功能生态已逐渐被 llm 与 aichat 超越。

  • Fast stdin piping with -r -f json
维护与来源背书 2 / 10

Charmbracelet 已于 2026 年 3 月归档 charmbracelet/mods(转向 Crush),上游不再提供更新或安全补丁。

  • charmbracelet/mods repository archived March 2026
文档与可验证性 7 / 10

README 与 --help 清晰,但已归档配置中的默认模型易过时。

  • Archived README at github.com/charmbracelet/mods

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

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

读取 OPENAI_API_KEY、ANTHROPIC_API_KEY 等环境变量或 ~/.config/mods/mods.yml;历史会话以 JSON 保存在 ~/.config/mods/conversations/。

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

MIT 开源 Go 二进制;调用远端 API 产生厂商费用(本地 Ollama 接口免费)。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Mods Agent Rules
- Always pass `-r` (`--raw`) and `--no-cache` in automated pipelines so terminal markdown glow formatting and local conversation caches stay off.
- Note that `charmbracelet/mods` was archived in March 2026—prefer `llm` or `aichat` for new projects.

Agent 高频安全命令配方

只读查询(安全推荐)

列出本地已保存的历史对话
mods --list

不发起 API 请求,仅打印本地存储的对话标题与 SHA-1 哈希。

受控写入与预演

以原始 JSON 总结管道日志且不缓存历史
tail -n 50 app.log | mods -r -f json --no-cache 'Extract error messages as a JSON array'

启用原始输出(-r)与 JSON 格式提示(-f json),并用 --no-cache 禁止写入本地历史。

核心优势

  • + 专为 Unix 管道设计的单文件 Go 二进制(-r --no-cache)。
  • + 兼容 OpenAI、Anthropic 及本地 Ollama 端点。

注意事项与踩坑点

  • ! 仓库已于 2026 年 3 月被 Charmbracelet 归档,不再有后续修复或新模型预设。
  • ! --settings 与 -M 等交互参数会阻塞非 TTY 终端。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI