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

apfel

$ apfel 官方出品 低风险
Arthur-Ficial · AI 能力与音视频 · MIT · macos

apfel(apfel)是原生 macOS CLI 与 OpenAI 兼容本地服务工具,可在 Apple Silicon Mac(macOS 26+)上直接调用系统内置 Apple Intelligence 端侧基础模型。支持 -o json / --output json 单次推理、-f 文件附带、--model-info 状态检查以及 --chat 与 --serve。

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

apfel 原生调用宿主机 macOS Foundation Models 框架,无需下载外部模型权重。

Agent 友好度体检单

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

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

FCRS-1.0 六维评分拆解

Agent 友好度 20 / 25

支持 -o json / --output json、-f 文件输入与 --model-info 无头调用,但 --chat 与 --serve 为交互/阻塞模式。

  • -o json / --output json emits schema-valid JSON responses
  • --model-info reports hardware context limits
安全与权限边界 23 / 25

100% 端侧本地运行,无需外部 API 密钥、无网络请求、无需下载数 GB 模型。

  • Runs strictly on-device using built-in macOS Foundation Models
安装与运行摩擦 8 / 15

可通过 brew install apfel 单命令安装,但仅限运行 macOS 26+ 的 Apple Silicon Mac。

  • Requires macOS 26+ (Tahoe) on Apple Silicon with Apple Intelligence
能力覆盖与边际价值 12 / 15

零模型下载开销,开箱即用支持端侧推理与 OpenAI 兼容 --serve。

  • Zero model download overhead; built-in -f <file> and --serve
维护与来源背书 8 / 10

开源社区项目 Arthur-Ficial/apfel,采用 MIT 许可协议。

  • Community Arthur-Ficial/apfel repository (MIT)
文档与可验证性 8 / 10

仓库 README 与 --help 参数说明清晰直观。

  • Clear repository README and --help reference

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

鉴权方式
无需鉴权
凭证存储位置

无需任何凭据或 API Key;直接调用 macOS 内置端侧 Apple Intelligence 框架。

潜在副作用
只读查询
费用与配额提示

MIT 开源免费工具;需配备 Apple Silicon 的 Mac 且系统为 macOS 26(Tahoe)及以上并启用 Apple Intelligence。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# 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 高频安全命令配方

只读查询(安全推荐)

检查端侧 Apple Intelligence 模型限制
apfel --model-info

输出当前 Mac 上端侧模型的可用状态与上下文窗口上限。

执行单次端侧推理并输出 JSON
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 核查)。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI