Mods
$ mods 社区开源 中风险mods 是 Charmbracelet 开发的 Go CLI,可将命令输出通过管道送入 OpenAI、Anthropic 或 Ollama 模型处理,支持 --raw 原始输出与 -f json 格式化。注意:charmbracelet/mods 已于 2026 年 3 月归档,官方重心转向 Crush。
brew install mods 面向管道的 LLM 工具(mods -r -f json);鉴于 mods 已于 2026 年 3 月归档,新项目建议优先使用持续维护的 llm 或 aichat。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持 -r(--raw)、-f json、-q 与 --no-cache 适配管道执行,但 -M 与 --settings 为交互界面。
- Supports
-r(--raw),-f json,--quiet, and--no-cache
涉及远端 LLM API 计费,且默认将对话保存在 ~/.config/mods/conversations/(除非传 --no-cache)。
- Persists chat logs locally unless
--no-cacheis set
静态单 Go 二进制,可通过 brew、go install 与 GitHub Releases 安装。
- Zero-dependency static Go binary across macOS, Linux, Windows
管道体验简洁流畅,但功能生态已逐渐被 llm 与 aichat 超越。
- Fast stdin piping with
-r -f json
Charmbracelet 已于 2026 年 3 月归档 charmbracelet/mods(转向 Crush),上游不再提供更新或安全补丁。
charmbracelet/modsrepository archived March 2026
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 接口免费)。
# 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 哈希。
受控写入与预演
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 终端。