docs: add banner image to README top, update model download flow (empty shell + on-device download)

This commit is contained in:
Kellyvv committed 2026-04-06 05:40:56 +08:00
1 parent dd76a4718a
commit 137e0fa5d1
3 files changed
+64 -18

No files matched your search

+32 -9
View File
@@ -1,5 +1,7 @@
# PhoneClaw
![banner](assets/banner.jpg)
[English](README_EN.md) · [报告问题](https://github.com/kellyvv/phoneclaw/issues) · [功能建议](https://github.com/kellyvv/phoneclaw/issues)
本地运行的私人 iPhone AI Agent,不联网,不上传,完全在设备端。
@@ -24,6 +26,7 @@ PhoneClaw 是一个运行在 iPhone 上的本地 AI Agent。它使用 Gemma 4
- 支持图片输入(多模态)
- 基于文件的 Skill 系统,新增能力不需要重写整个 Agent
- 支持多轮工具调用
- 默认可空壳安装 App,再在手机端下载 E2B / E4B
- 已内置权限管理、System Prompt 编辑、模型切换
- 针对 iPhone 内存上限做了缓存清理和历史裁剪
@@ -56,7 +59,16 @@ cd phoneclaw
pod install
```
### 3. 下载模型
### 3. 可选:预下载模型到本地
默认推荐方式已经变成:
1. 先通过 Xcode 把空壳 App 安装到手机
2. 打开 App
3. 进入 `模型设置 / Model Settings`
4. 在手机上直接下载 `Gemma 4 E2B` 或 `Gemma 4 E4B`
只有你想把模型一起打包进 App 时,才需要在电脑上先下载到 `Models/` 目录。
PhoneClaw 识别的目录名必须和下面保持一致。推荐先安装 Hugging Face CLI:
@@ -127,8 +139,9 @@ open PhoneClaw.xcworkspace
- 右上角拼图按钮:Skill 管理
- 右上角滑杆按钮:模型设置 / 系统提示词 / 权限
- 如果当前是空壳安装,在模型设置页点击 `下载 / Download`
建议先在权限页开启日历、提醒事项、通讯录,然后试试:
建议先下载一个模型,再在权限页开启日历、提醒事项、通讯录,然后试试:
```
这台手机的设备信息是什么
@@ -136,20 +149,30 @@ open PhoneClaw.xcworkspace
帮我存一下王总的电话 13812345678
```
## 如何只打包一个模型
## 默认安装方式与模型打包
这是最常见的发布方式,尤其是只想发 E2B 时。
### 方案 A — 空壳安装,手机端下载模型
### 方案 A — 只打包 E2B
这是当前默认推荐方式。
优点:
1. Xcode 安装包更小
2. 电脑端首次安装更快
3. 可以在手机里自由切换下载 E2B 或 E4B
默认工程已经不会把 `Models/` 里的模型自动打进 App 包。安装后直接去配置页下载即可。
### 方案 B — 只打包 E2B
1. 保留 `Models/gemma-4-e2b-it-4bit`,移除 `Models/gemma-4-e4b-it-4bit`
2. 在 Xcode 的 Project Navigator 里删除不用的模型 folder reference,选择 Remove Reference
3. 在 PhoneClaw > Build Phases > Copy Bundle Resources 里确认只剩要打包的模型
3. 在 PhoneClaw > Build Phases > Copy Bundle Resources 里手动把要打包的模型加回去,并确认只剩要分发的模型
4. 修改 `LLM/MLXLocalLLMService.swift` 里的 `availableModels`,只保留实际会随 App 分发的模型(否则配置页仍然会显示不存在的选项)
### 方案 B — 同时打包 E2B + E4B
### 方案 C — 同时打包 E2B + E4B
保留两个目录和两个 Xcode 资源引用即可。用户可在 App 的模型设置页里切换。
保留两个目录,并把两个模型 folder reference 都手动加回 `Copy Bundle Resources`。用户可在 App 的模型设置页里切换。
## 自定义 Skill
@@ -193,7 +216,7 @@ examples:
通常是因为对应 Skill 还没有真正执行到系统 API。如果之前已经拒绝过一次,iOS 也不会反复弹框,需要到系统设置里手动开启。
为什么切模型后加载失败?
先确认:模型目录名和代码里的 `availableModels` 一致;该模型确实被打进了 App 包;设备内存足够。
先确认:模型目录名和代码里的 `availableModels` 一致;如果你走的是空壳安装,模型已经在手机端下载完成;如果你走的是内置分发,该模型确实被打进了 App 包;设备内存足够。
为什么提醒事项创建失败?
最新代码会先尝试复用现有提醒列表;如果系统里没有可写列表,会再尝试自动创建一个 PhoneClaw 提醒列表。如果这一步仍失败,通常是系统提醒源本身不可写。
+32 -9
View File
@@ -1,5 +1,7 @@
# PhoneClaw
![banner](assets/banner.jpg)
[中文](README.md) · [Report an Issue](https://github.com/kellyvv/phoneclaw/issues) · [Request a Feature](https://github.com/kellyvv/phoneclaw/issues)
A local AI Agent that runs entirely on your iPhone. No cloud, no network, no data uploads.
@@ -24,6 +26,7 @@ PhoneClaw uses Gemma 4 to run inference entirely on-device. It does not depend o
- Image input support (multimodal)
- File-driven Skill system — add new capabilities without rewriting the Agent
- Multi-round tool calling
- Supports shell-only app install, then on-device E2B / E4B download
- Built-in permission management, system prompt editor, and model switcher
- Dynamic history trimming and GPU cache management for iPhone memory limits
@@ -56,7 +59,16 @@ cd phoneclaw
pod install
```
### 3. Download a model
### 3. Optional: pre-download a model locally
The default recommended flow is now:
1. Install the app shell to the iPhone from Xcode
2. Open the app
3. Go to `Model Settings`
4. Download `Gemma 4 E2B` or `Gemma 4 E4B` directly on the phone
You only need the `Models/` directory on your Mac if you want to bundle a model inside the app itself.
Directory names must match exactly as shown below. Install the Hugging Face CLI first:
@@ -127,8 +139,9 @@ After opening the app:
- Top-right puzzle icon: Skill management
- Top-right slider icon: Model settings / system prompt / permissions
- If you installed a shell-only app, tap `Download` in the model settings page first
Enable Calendar, Reminders, and Contacts in the permissions page first, then try:
Download a model first, then enable Calendar, Reminders, and Contacts in the permissions page, then try:
```
What is this device's information?
@@ -136,20 +149,30 @@ Remind me tonight at 8 to send the file
Save Wang's phone number 13812345678
```
## Bundling Only One Model
## Default Install Flow and Model Bundling
This is the most common distribution setup, especially when shipping E2B only.
### Option A — Shell app + on-device model download
### Option A — E2B only
This is now the default recommended setup.
Advantages:
1. Much smaller install size from Xcode
2. Faster first-time app installation from the Mac
3. Users can choose E2B or E4B directly on the phone
By default, the project no longer bundles anything from `Models/` into the app.
### Option B — E2B only
1. Keep `Models/gemma-4-e2b-it-4bit`, remove `Models/gemma-4-e4b-it-4bit`
2. In Xcode's Project Navigator, delete the unused model folder reference and choose Remove Reference
3. In PhoneClaw > Build Phases > Copy Bundle Resources, confirm only the desired model remains
3. In PhoneClaw > Build Phases > Copy Bundle Resources, manually add back the model you want to ship and confirm only that one remains
4. Edit `availableModels` in `LLM/MLXLocalLLMService.swift` to only include the models actually shipped (otherwise the settings page will show options that don't exist)
### Option B — Both E2B and E4B
### Option C — Both E2B and E4B
Keep both directories and both Xcode resource references. Users can switch in the app's model settings page.
Keep both directories, then manually add both folder references back into `Copy Bundle Resources`. Users can switch in the app's model settings page.
## Adding Custom Skills
@@ -193,7 +216,7 @@ Why are there no permission dialogs after install?
The corresponding Skill has likely not reached the system API call yet. If you previously denied permission, iOS will not prompt again — go to system Settings to re-enable.
Why does the model fail to load after switching?
Verify that the model directory name matches `availableModels` in code, that the model was actually included in the app bundle, and that the device has enough memory.
Verify that the model directory name matches `availableModels` in code, that the model has finished downloading on-device if you are using the shell-only install flow, or that it was actually included in the app bundle if you are shipping it built-in, and that the device has enough memory.
Why does creating a reminder fail?
The latest code first attempts to reuse an existing writable reminder list. If none is found, it tries to automatically create a PhoneClaw list. If that also fails, the system reminder source itself is likely read-only.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB