apfel
$ apfel 官方出品 低风险apfel(apfel)是原生 macOS CLI 与 OpenAI 兼容本地服务工具,可在 Apple Silicon Mac(macOS 26+)上直接调用系统内置 Apple Intelligence 端侧基础模型。支持 -o json / --output json 单次推理、-f 文件附带、--model-info 状态检查以及 --chat 与 --serve。
brew install apfel apfel 原生调用宿主机 macOS Foundation Models 框架,无需下载外部模型权重。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持 -o json / --output json、-f 文件输入与 --model-info 无头调用,但 --chat 与 --serve 为交互/阻塞模式。
-o json/--output jsonemits schema-valid JSON responses--model-inforeports hardware context limits
100% 端侧本地运行,无需外部 API 密钥、无网络请求、无需下载数 GB 模型。
- Runs strictly on-device using built-in macOS Foundation Models
可通过 brew install apfel 单命令安装,但仅限运行 macOS 26+ 的 Apple Silicon Mac。
- Requires macOS 26+ (Tahoe) on Apple Silicon with Apple Intelligence
零模型下载开销,开箱即用支持端侧推理与 OpenAI 兼容 --serve。
- Zero model download overhead; built-in
-f <file>and--serve
开源社区项目 Arthur-Ficial/apfel,采用 MIT 许可协议。
- Community
Arthur-Ficial/apfelrepository (MIT)
仓库 README 与 --help 参数说明清晰直观。
- Clear repository README and
--helpreference
安全边界、鉴权与放权指南
无需任何凭据或 API Key;直接调用 macOS 内置端侧 Apple Intelligence 框架。
MIT 开源免费工具;需配备 Apple Silicon 的 Mac 且系统为 macOS 26(Tahoe)及以上并启用 Apple Intelligence。
# apfel Agent Rules - Prefer `apfel -o json <prompt>` for non-interactive calls; never invoke `--chat` or `--serve` synchronously. - Keep prompts within Apple's on-device context window (typically 4K–8K tokens via `apfel --model-info`).
Agent 高频安全命令配方
只读查询(安全推荐)
apfel --model-info
输出当前 Mac 上端侧模型的可用状态与上下文窗口上限。
apfel -o json "Summarize this diff in one sentence"
向 Apple 端侧模型发送单次请求并以结构化 JSON 返回结果。
核心优势
- + 零下载端侧推理,原生支持
-o json输出与-f <file>上下文附加。 - + 完全离线隐私且零 API 费用。
注意事项与踩坑点
- ! 仅限运行 macOS 26+ 且开启 Apple Intelligence 的 Apple Silicon Mac。
- ! 端侧基础模型上下文窗口较小(建议通过
--model-info核查)。