经 AI Skill Hub 精选评估,apfel AI技能包 获评「强烈推荐」。已获得 5.4k 颗 GitHub Star,这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.5 分,适合有一定技术背景的用户使用。
Mac专用开源AI工具,无需云服务即可运行本地大语言模型。提供CLI命令行、OpenAI兼容API服务器和交互界面,充分利用Apple Silicon硬件加速,适合隐私意识强和离线使用的开发者。
apfel AI技能包 是一款基于 Swift 开发的开源工具,专注于 本地部署、Apple Silicon优化、OpenAI兼容 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
Mac专用开源AI工具,无需云服务即可运行本地大语言模型。提供CLI命令行、OpenAI兼容API服务器和交互界面,充分利用Apple Silicon硬件加速,适合隐私意识强和离线使用的开发者。
apfel AI技能包 是一款基于 Swift 开发的开源工具,专注于 本地部署、Apple Silicon优化、OpenAI兼容 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/Arthur-Ficial/apfel cd apfel # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 apfel --help # 基本运行 apfel [options] <input> # 详细使用说明请查阅文档 # https://github.com/Arthur-Ficial/apfel
# apfel 配置说明 # 查看配置选项 apfel --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export APFEL_CONFIG="/path/to/config.yml"
macOS 26 Tahoe+, Apple Silicon (M1+), Apple Intelligence enabled.
brew install apfel
Update:
brew upgrade apfel
Build from source (Command Line Tools with macOS 26.4 SDK / Swift 6.3, no Xcode):
git clone https://github.com/Arthur-Ficial/apfel.git && cd apfel && make install
Nix, same-day tap, Mint, mise, troubleshooting: docs/install.md.
make test # release build + all unit/integration tests
make preflight # full release qualification
make install # build release + install to /usr/local/bin
make build # build release only
make version # print current version
make release # patch release
make release TYPE=minor # minor release
make release TYPE=major # major release
swift build # quick debug build (no version bump)
swift run apfel-tests # unit tests
python3 -m pytest Tests/integration/ -v # integration tests
apfel --benchmark -o json # performance report
.version is the single source of truth. Only make release bumps versions. Local builds do not change the version.
```bash
Shell scripts in demo/:
cmd - natural language to shell command:
```bash demo/cmd "find all .log files modified today"
APFEL_MCP_TOKEN=mytoken apfel --mcp https://mcp.example.com/v1 "..."
apfel itself has no config file - flags + env vars, like any UNIX tool. If you want a TOML config (many MCPs, profiles, team configs in git), apfel-run is an MIT wrapper that adds one via execve drop-in.
brew install Arthur-Ficial/tap/apfel-run
apfel-run config init # starter ~/.config/apfel/config.toml
alias apfel=apfel-run # optional, every apfel flag still works
Base URL: http://localhost:11434/v1
| Feature | Status | Notes |
|---|---|---|
POST /v1/chat/completions | Supported | Streaming + non-streaming |
GET /v1/models | Supported | Returns apple-foundationmodel |
GET /health | Supported | Model availability, context window, languages |
GET /v1/logs, /v1/logs/stats | Debug only | Requires --debug |
| Tool calling | Supported | Native ToolDefinition + JSON detection. See [docs/tool-calling-guide.md](docs/tool-calling-guide.md) |
response_format: json_object | Supported | System-prompt injection; markdown fences stripped from output |
temperature, max_tokens, seed | Supported | Mapped to GenerationOptions. Omitting max_tokens uses the remaining context window (drop-in OpenAI semantics) - see [Default response cap](#default-response-cap-max_tokens) |
stream: true | Supported | SSE; final usage chunk only when stream_options: {"include_usage": true} (per OpenAI spec) |
finish_reason | Supported | stop, tool_calls, length |
| Context strategies | Supported | x_context_strategy, x_context_max_turns, x_context_output_reserve extension fields |
| CORS | Supported | Enable with --cors |
POST /v1/completions | 501 | Legacy text completions not supported |
POST /v1/embeddings | 501 | Embeddings not available on-device |
logprobs=true, n>1, stop, presence_penalty, frequency_penalty | 400 | Rejected explicitly. n=1 and logprobs=false are accepted as no-ops |
| Multi-modal (images) | 400 | Rejected with clear error |
Authorization header | Supported | Required when --token is set. See [docs/server-security.md](docs/server-security.md) |
Full API spec: openai/openai-openapi.
CLI and server share one rule: omitted = use remaining window. No constant to drift. Override with --max-tokens N or APFEL_MAX_TOKENS=N.
apfel "Reply SKIP." # uses remaining window
apfel --max-tokens 64 "Reply SKIP." # explicit cap
APFEL_MAX_TOKENS=2048 apfel "..." # via env var
Guides to use apfel from Python, Node.js, Ruby, PHP, Bash/curl, Zsh, AppleScript, Swift, Perl, AWK - see docs/guides/index.md. Empirically tested; runnable proof at apfel-guides-lab.
brew services and launchd usage/v1/* support matrix in depth--footgunApfelCore Swift Package for downstream developers质量优秀的Mac原生AI工具,充分发挥Apple硬件优势。架构清晰、集成度高,是隐私优先用户的理想选择。维护活跃,生态成熟。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:apfel AI技能包 的核心功能完整,质量优秀。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | apfel |
| 原始描述 | 开源AI工具:The free AI already on your Mac. CLI tool, OpenAI-compatible server, and interac。⭐5.4k · Swift |
| Topics | 本地部署Apple Silicon优化OpenAI兼容命令行工具隐私优先 |
| GitHub | https://github.com/Arthur-Ficial/apfel |
| License | MIT |
| 语言 | Swift |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。