开源推荐
morning
GitHub 热门项目: apfel
2026-09-07
1 阅读
约8分钟阅读
GitHub Trending
字号:
GitHub 项目:apfel
仓库地址:https://github.com/Arthur-Ficial/apfel
星级:6349 | 作者:Arthur-Ficial
项目描述:Mac 上已有的免费 AI。 CLI 工具、OpenAI 兼容服务器和交互式聊天 - 全部通过 Apple Intelligence 在设备上实现。没有 API 密钥、没有云、没有下载。
===================================================
自述文件内容:
#阿普菲尔
### 免费 AI 已在您的 Mac 上。
[](https://github.com/Arthur-Ficial/apfel)
[](https://swift.org)
[](https://developer.apple.com/macos/)
[](https://developer.apple.com/xcode/resources/)
[](许可证)
[](https://developer.apple.com/documentation/foundationmodels)
[](https://apfel.franzai.com)
[](#contributing)
Apple Silicon Mac 通过 [Apple FoundationModels](https://developer.apple.com/documentation/foundationmodels) 提供内置 LLM。 `apfel` 将其公开为 UNIX 工具和本地 OpenAI 兼容服务器。 100% 在设备上。没有 API 密钥,没有云。
|模式|命令|你得到什么 |
|------|---------|--------------|
| UNIX 工具 | `apfel "提示"` / `echo "文本" \|阿普菲尔` |管道友好的答案、文件附件、JSON 输出、退出代码 |
| OpenAI 兼容服务器 | `apfel --服务` | OpenAI SDK 的本地“http://localhost:11434/v1”后端 |
`apfel --chat` - 交互式 REPL。
工具调用适用于所有上下文。设备上上下文窗口:macOS 26 上有 4096 个令牌,macOS 27 上有 8192 个令牌 - 在运行时读取,请参阅[限制](#limitations)。

## 要求和安装
macOS 26 Tahoe+、Apple Silicon (M1+)、[启用 Apple Intelligence](https://support.apple.com/en-us/121115)。
````bash
酿造安装 apfel
````
更新:
````bash
酿造升级apfel
````
从源代码构建(使用 macOS 26.4 SDK / Swift 6.3 的命令行工具,无 Xcode):
````bash
git clone https://github.com/Arthur-Ficial/apfel.git && cd apfel && make install
````
Nix,当天水龙头,Mint,mise,故障排除:[docs/install.md](docs/install.md)。
## 快速入门
### UNIX 工具
在单引号中用 `!` 引用提示(zsh/bash 历史扩展):`apfel 'Hello, Mac!'`。
````bash
# 单一提示
apfel “奥地利的首都是哪里?”
# 宽容模式 - 减少创意/长提示的护栏误报
apfel --permissive “为惊悚小说写一个戏剧性的开头”
# 流输出
apfel --stream“写一首关于代码的俳句”
# 管道输入
echo "总结:$(cat README.md)" |阿普菲尔
# 附加文件内容到提示中
apfel -f README.md“总结这个项目”
# 附加多个文件
apfel -f old.swift -f new.swift “这两个文件之间发生了什么变化?”
# 附加 PDF 或图像 - 设备上文本提取、OCR 和“图像的内容”
阿普菲尔 -
这篇文章对您有帮助吗?
订阅66必读
每日精选科技资讯,直达你的邮箱