-
Notifications
You must be signed in to change notification settings - Fork 0
Releases: phonebase-cloud/phonebase-cli
Releases · phonebase-cloud/phonebase-cli
v1.1.1
What's New
npm install -g phonebase-cli # first install
pb update && pb --version # upgrade
pb skills install— Now supports installing skills from.zipfiles. Example:pb skills install ./my-skill.zip.pb skills install— After installation, the skill's full help is displayed (description + usage + commands), no need to run again to check.pb pull— Files are now saved locally to.phonebase/pull/{device}/{filename}instead of returning raw base64 data.pb push— Large file uploads no longer load the entire file into memory, reducing memory usage for big files.pb <skill>— Skill help now showsDisplayName (skill-name)as title, with colored output (commands in green, args in dim, labels in yellow).pbSDK — Package renamed fromphonebase-js-sdktophonebase-cli-sdk. Old require path@phonebase-cloud/pbstill works for backward compatibility.pb --version— Now returns JSON format in non-TTY /PHONEBASE_OUTPUT=jsonmode, includingversionandbuild_idfields.pb daemon status/pb daemon ensure— JSON response now includesbuild_idfield.pb skills list— JSON response now includesicon_path(relative) andabsolute_icon_path(absolute) fields for each skill.pb screencap— Now supports[output]path,--format jpg|webp|png,--quality N,--width N,--height N,--base64options. Screenshot logic moved to capability layer — SDKpb.call('screencap')now also saves files. Example:pb screencap /tmp/shot.webp --quality 50.
更新内容
npm install -g phonebase-cli # 首次安装
pb update && pb --version # 升级
pb skills install— 支持从.zip文件安装 skill。示例:pb skills install ./my-skill.zip。pb skills install— 安装完成后直接显示 skill 的完整帮助(描述 + 用法 + 命令列表),无需再次运行查看。pb pull— 文件保存到本地.phonebase/pull/{设备}/{文件名},不再返回 base64 原始数据。pb push— 大文件上传不再一次性读入内存,降低内存占用。pb <skill>— Skill 帮助信息标题显示显示名 (skill-name),带颜色输出(命令绿色、参数灰色、标签黄色)。pbSDK — npm 包名从phonebase-js-sdk改为phonebase-cli-sdk。旧的require('@phonebase-cloud/pb')仍可使用。pb --version— 非 TTY /PHONEBASE_OUTPUT=json模式下返回 JSON 格式,包含version和build_id字段。pb daemon status/pb daemon ensure— JSON 响应新增build_id字段。pb skills list— JSON 响应新增icon_path(相对路径)和absolute_icon_path(绝对路径)字段。pb screencap— 支持[output]输出路径、--format jpg|webp|png、--quality N、--width N、--height N、--base64参数。截图逻辑下沉到 capability 层,SDKpb.call('screencap')也能保存文件。示例:pb screencap /tmp/shot.webp --quality 50。
Assets 8
v1.1.0
What's New
npm install -g phonebase-cli # first install
pb update && pb --version # upgrade
pb connect— Accepts IP address or device code directly. Example:pb connect 192.168.180.24.pbSDK —pb.call('connect', { target: '192.168.180.24' })now works the same as CLI. Also works withpb.call('proxy'),pb.call('devices', 'list'), etc.pb— Error messages now follow the client's language setting, regardless of the server's system language.pb node— Error messages are now localized (Chinese/English) for missing selectors, conflicting options, and missing values.pb text—--submitreplaced with--ime_action <int>, allowing any IME action (e.g.--ime_action 3for search,--ime_action 6for done). Example:pb text "hello" --clear --ime_action 6.pb node— Now accepts both short names (--id,--desc) and full names (--resource_id,--content_desc,--wait_timeout,--wait_interval).pb screencap/pb inspect— Output paths are now absolute, usable directly by AI agents without knowing the working directory.pb package icon— Icons now saved to~/.phonebase/icons/(global) instead of.phonebase/icons/(project-local).pb inspect— Fixed "Multiple devices connected" error when using-sto specify a device.pbSDK —waitForNode/waitForNodeActionnow use flat params matching CLI convention. Example:waitForNode({ id: 'btn_login' }).pbSDK — Skill scripts receiveSKILL_RUNTIME_*andSKILL_META_*environment variables.SKILL_META_*are dynamically injected from SKILL.md frontmatter fields.
更新内容
npm install -g phonebase-cli # 首次安装
pb update && pb --version # 升级
pb connect— 支持 IP 地址或设备编号直接连接。示例:pb connect 192.168.180.24。pbSDK —pb.call('connect', { target: '192.168.180.24' })和 CLI 完全一致。pb.call('proxy')、pb.call('devices', 'list')等也已对齐。pb— 错误消息语言跟随客户端设置,不再受服务端系统语言影响。pb node— 错误提示已国际化(中英文),包括缺少选择器、选项冲突、缺少参数值等。pb text—--submit替换为--ime_action <int>,支持发送任意 IME action(如--ime_action 3搜索,--ime_action 6完成)。示例:pb text "hello" --clear --ime_action 6。pb node— 同时支持短名(--id、--desc)和全名(--resource_id、--content_desc、--wait_timeout、--wait_interval)。pb screencap/pb inspect— 输出路径改为绝对路径,AI agent 可直接使用。pb package icon— 图标保存到全局目录~/.phonebase/icons/,不再依赖项目目录。pb inspect— 修复多设备连接时使用-s指定设备仍报错的问题。pbSDK —waitForNode/waitForNodeAction改为扁平参数,与 CLI 一致。示例:waitForNode({ id: 'btn_login' })。pbSDK — Skill 脚本可通过SKILL_RUNTIME_*和SKILL_META_*环境变量获取运行时信息和 SKILL.md 元数据。
Assets 8
v1.0.9
What's New
npm install -g phonebase-cli # first install
pb update && pb --version # upgrade
pb package info <package>/pb package icon <package>— New two-part subcommands for querying app details and extracting launcher icons. Replaces the oldpb iconalias.pb package info— Returns 404 with a clear error when the package doesn't exist on the device.pb text— New--clearand--submitflags.--clearclears the input field before typing,--submitpresses Enter after. Example:pb text "hello world" --clear --submit.pb text— Now correctly handles numeric input. Previously, entering a long number like a phone number would garble it into scientific notation.pb dump/pb dumpc— Now supportsformat=jsonparameter to get structured JSON instead of XML/text. Example:pb -j '{"format":"json"}' dump.pb— JSON output format unified to{code, data, msg, cost}across all commands. Simpler and consistent.pb— Human-readable output improved: boolean results show localized success/failure marks, data-rich responses show formatted tables, message-only responses show the message with a checkmark.pbSDK — New convenience methods:pb.dump()/pb.dumpJson()/pb.dumpText()for full UI hierarchy,pb.dumpc()/pb.dumpcJson()/pb.dumpcText()for compact hierarchy,pb.close()for connection management.pbSDK — New utility functions:findNode/findAllfor searching JSON dump trees (supports attribute match, regex, and function predicates),waitForNode/waitForNodeActionfor device-side node waiting with autoid→resource_idmapping,randomPointInBoundsfor natural-looking taps.pbSDK —success()/failure()now handle uncaught exceptions automatically when utils is imported.
更新内容
npm install -g phonebase-cli # 首次安装
pb update && pb --version # 升级
pb package info <包名>/pb package icon <包名>— 新增两段式子命令,查询应用详情和提取启动图标。替代旧的pb icon别名。pb package info— 设备上不存在的包名返回 404 和明确的错误消息。pb text— 新增--clear和--submit参数。--clear输入前清空输入框,--submit输入后自动回车。示例:pb text "hello world" --clear --submit。pb text— 修复数字输入问题。之前输入长数字(如手机号)会被转成科学计数法。pb dump/pb dumpc— 支持format=json参数,返回结构化 JSON。示例:pb -j '{"format":"json"}' dump。pb— JSON 输出格式统一为{code, data, msg, cost},所有命令格式一致。pb— 改善人类格式输出:布尔结果显示本地化的成功/失败标记,有数据的命令显示格式化表格,纯消息命令显示带 ✓ 的消息。pbSDK — 新增便捷方法:pb.dump()/pb.dumpJson()/pb.dumpText()获取完整 UI 层级,pb.dumpc()/pb.dumpcJson()/pb.dumpcText()获取精简层级,pb.close()主动关闭连接。pbSDK — 新增工具函数:findNode/findAll搜索 JSON dump 树(支持属性匹配、正则、函数断言),waitForNode/waitForNodeAction设备端等待 UI 元素(自动id→resource_id映射),randomPointInBounds自然点击坐标。pbSDK — 导入 utils 后自动捕获未处理异常,通过success()/failure()标准化输出。
Assets 8
v1.0.8
What's New
npm install -g phonebase-cli # first install
pb update && pb --version # upgrade
pb— Windows is now fully supported.pb launch— Launching an app now auto-grants all runtime permissions, so the app lands ready to use without extra permission dialogs.pb node— New alias to find a UI element by text / content description / resource ID and optionally act on it in one call. Examples:pb node --text 设置,pb node --id com.app:id/login --click,pb node --id com.app:id/edit --input "hello". Waits up to 3s for the element to appear by default.pb clear <package>— New alias to wipe an app's cached data and preferences, putting it back in a fresh-install state.pb proxy— Query, enable, or disable device proxy.pb proxy --url socks5://ip:portto enable,pb proxy --disableto disable,pb proxyto check status. SDK:pb.call('proxy', {enabled: true, nodes: [{proxy_url: '...'}]}).pb browse <url>— Fixed: the command used to fail outright on every URL. It now reliably opens the link in the device's browser.pb browse <url>— First-launch friction is gone: no taps required on fresh installs, the target page loads directly.pb skills new --path <DIR>— New flag to scaffold a skill into any directory you choose (e.g. a project repo) instead of the default~/.phonebase/skills/. The skill is not auto-registered; runpb skills install <DIR>/<name>when you're ready to enable it.pb skills new --template <DIR_OR_URL>— New flag to scaffold from your own template instead of the default one. Accepts a local directory or a git URL (https / ssh / git / file). Examples:pb skills new my-skill --template ./my-template,pb skills new my-skill --template git@192.168.0.1:team/skill-template.git.pb— The SDK now offers a singlepb.call(command, [subcommand], [args])method that can reach every capability, including platform management (pb.call('devices', 'list')), authentication (pb.call('login')), and configuration (pb.call('config', 'show')).- Device errors — The numeric error code from the device now reaches you as-is (e.g. 404 when a UI node isn't there). The redundant
device error:prefix is also gone.
更新内容
npm install -g phonebase-cli # 首次安装
pb update && pb --version # 升级
- Windows — 全功能支持,安装方式不变(
npm install -g phonebase-cli)。 pb launch— 启动 App 时自动授权所有权限,App 打开即可直接使用,免去手动点授权弹窗。pb node— 新别名:按 文本 / 内容描述 / 资源 ID 查找 UI 节点,可选顺带点击或输入文本。示例:pb node --text 设置、pb node --id com.app:id/login --click、pb node --id com.app:id/edit --input "你好"。默认等待节点出现最多 3 秒。pb clear <包名>— 新别名:一键清除应用的缓存数据与偏好设置,把 App 恢复到刚安装好的状态。pb proxy— 查询、启用、禁用设备代理。pb proxy --url socks5://ip:port启用,pb proxy --disable禁用,pb proxy查询状态。SDK:pb.call('proxy', {enabled: true, nodes: [{proxy_url: '...'}]})。pb browse <url>— 修复:之前对任何 URL 都直接失败打不开。现在能可靠打开链接。pb browse <url>— 首次打开不再卡任何对话框,目标网址直接加载。pb skills new --path <目录>— 新参数:把脚手架生成到任意目录(比如你自己的项目仓库),不再被限死在~/.phonebase/skills/。生成的 skill 不会自动注册,准备好后用pb skills install <目录>/<名字>启用即可。pb skills new --template <目录或地址>— 新参数:用你自己的脚手架代替默认模板。支持本地目录或 git 地址(https / ssh / git / file)。示例:pb skills new my-skill --template ./my-template、pb skills new my-skill --template git@192.168.0.1:team/skill-template.git。- SDK — 简化为
pb.call(命令, [子命令], [参数])单方法,可调用所有能力:平台管理(pb.call('devices', 'list'))、认证(pb.call('login'))、配置(pb.call('config', 'show'))等。 - 设备错误 — 设备端返回的错误码现在原样展示(比如找不到 UI 节点会直接看到 404)。错误消息里多余的
device error:前缀也去掉了。
Assets 8
v1.0.7
@bittired
bittired
eecf9c0
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's New
If you have pb installed, run the following to upgrade and verify:
pb update && pb --version
pb info— Redesigned human-mode output: path, title, markdown body, and arguments are shown in clearly separated sections; markdown is now rendered in-terminal (lists, tables, and code blocks all formatted).pb list -s <device>/pb screencap -s <device>— Fixed:-swas silently ignored when multiple devices were connected, causing a "multiple devices connected" error.- Output rendering — Nested objects in command responses (e.g.
launcher_activityinsidepb package/list) are now expanded line-by-line with indentation instead of squashed into a single-line JSON. - Output rendering — Object arrays are listed vertically as separate blocks instead of being forced into a wide table, making long fields readable.
更新内容
安装好 pb 后,运行下面一行升级并确认:
pb update && pb --version
pb info— 人类模式输出重做:路径、标题、Markdown 正文、参数表分段展示,Markdown 直接在终端渲染(列表、表格、代码块都有格式)。pb list -s <设备>/pb screencap -s <设备>— 修复多设备连接时-s被忽略、导致报"已连接多台设备"的问题。- 通用输出 — 命令响应里的嵌套对象(如
pb package/list的launcher_activity)现在按层缩进展开,不再压成一行 JSON。 - 通用输出 — 对象数组改成纵向逐个展示,不再硬塞进宽表格,长字段终于看得清。
Assets 7
v1.0.6
@bittired
bittired
eecf9c0
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's New
If you have pb installed, run the following to upgrade and verify:
pb update && pb --version
pb connectaccepts a WebSocket URL directly. Example:pb connect wss://10.0.0.1:8080/ws.pb devices --connectednew flag — list only currently connected devices.pb devicesnow shows directly-connected devices in the same table, labeleddirectin the CONNECTED column.pb devicesadds a LATENCY column — measures round-trip time for each connected device.pb devicesadds a CONTROL API column — shows the on-device Control API version (e.g.1.1.1).pb devicesJSON output includestype(phonebase/direct),latency_ms, andcontrol_api_version_namefields on every device.pb devicestable auto-adjusts the CODE column width to fit long identifiers like IP addresses.pb --helpnow surfaces optional arguments in its command list:connect <device_code|ws_url>,disconnect [device_code], anddevices [--connected].- Commands returning data with nested object arrays (e.g.
pb package/list) now render the array as a sub-table instead of inline JSON.
更新内容
安装好 pb 后,运行下面一行升级并确认:
pb update && pb --version
pb connect支持直接传 WebSocket 地址,例如pb connect wss://10.0.0.1:8080/ws。pb devices --connected新参数——只列出当前已连接的设备。pb devices把直连设备也显示在同一个表格里,CONNECTED 列标direct。pb devices新增 LATENCY 列——显示每个已连接设备的网络往返延迟。pb devices新增 CONTROL API 列——显示设备端 Control API 版本号(如1.1.1)。pb devicesJSON 输出给每个设备加了type(phonebase/direct)、latency_ms、control_api_version_name字段。pb devices表格的 CODE 列宽度自动撑开,长 IP 不再错位。pb --help的命令列表现在显示了可选参数:connect <device_code|ws_url>、disconnect [device_code]、devices [--connected]。- 返回嵌套对象数组的命令(如
pb package/list)现在会把数组用子表格展示,不再塞一行压缩 JSON。
Assets 7
v1.0.5
@bittired
bittired
eecf9c0
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's New
If you have pb installed, run the following to upgrade and verify:
pb update && pb --version
New Commands
- Added
pb skills list --remoteto browse hub skills without installing. Supports--page,--size,--category,--refresh. - Added
pb skills search <query>. Searches locally by default;--remotesearches a hub. - Added
pb skills categories— lists every category with counts. - Added
pb skills show <name>— previews commands, arguments, and metadata before install. - Added
pb skills remote— lists all configured hubs. - Added
pb skills remote add <name> <url>. Supports--indexand--branch. - Added
pb skills remote remove <name>. - Added
pb skills remote default [<name>]— shows or switches the default hub. - Added
--remote=NAMEtopb skills install— install from any configured hub.
Connection
- Added multi-source support for skill hubs. Register official / private / personal hubs side-by-side.
PHONEBASE_SKILL_HUB_REPOenv var still overrides the default hub URL.
UI
- Remote listings now match the two-line layout of the local list (icon + status +
DisplayName (id) vX · category+ description). [installed]/[available]tags on remote list.- Pagination footer:
Page A/B · N skills · remote=<name>. - Offline cache fallback with "using offline cache" warning when the hub is unreachable.
Error Handling
- Skill hub errors are now translated: invalid URL, duplicate name, removing default, unknown remote, missing index file, etc.
- "Unknown remote" lists every configured name.
Installation
- Available on npm:
npm install -g phonebase-cli. Nativepbbinary, no Node wrapper. Upgrade withnpm update -g phonebase-cli.
更新内容
安装好 pb 后,运行下面一行升级并确认:
pb update && pb --version
新增命令
- 新增
pb skills list --remote:不装就能浏览 hub。支持--page、--size、--category、--refresh。 - 新增
pb skills search <关键词>:默认搜本地已装,--remote搜远程。 - 新增
pb skills categories:列出所有分类和每类数量。 - 新增
pb skills show <名字>:装前预览命令、参数、元信息。 - 新增
pb skills remote:列出所有已配置的 hub。 - 新增
pb skills remote add <名字> <URL>:支持--index和--branch。 - 新增
pb skills remote remove <名字>。 - 新增
pb skills remote default [<名字>]:显示或切换默认 hub。 pb skills install新增--remote=名字,从任意已配置 hub 安装。
连接管理
- 支持 skill 多源。官方 / 团队私有 / 个人 hub 可并列配置。
PHONEBASE_SKILL_HUB_REPO环境变量仍然覆盖默认 hub URL。
界面
- 远程列表改用和本地列表一致的两行布局(图标 + 状态 +
DisplayName (id) vX · 分类+ 描述)。 - 远程列表标注
[installed]/[available]。 - 分页 footer:
第 A/B 页 · 共 N 条 · remote=<名字>。 - hub 拉不到时回落本地缓存,显示"使用离线缓存"。
错误提示
- skill hub 错误消息全部翻译:URL 非法、名字重复、删默认源、未知 remote、索引文件缺失等。
- "未知 remote" 会列出所有已配置的名字。
安装
- 支持 npm:
npm install -g phonebase-cli。原生pb二进制,无 Node 中间层。升级用npm update -g phonebase-cli。
Assets 7
v1.0.4
@bittired
bittired
eecf9c0
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's New
Install or upgrade with the one-liner:
curl -fsSL https://get.phonebase.cloud | sh
Verify afterwards:
pb --version
pb skills install
Device Control
pb installsupports local files, URLs, and XAPK — Install apps from a local APK/XAPK file, an HTTP URL, or a device path. Large files show a real-time progress bar with speed and ETA. Example:pb install ~/Downloads/app.xapkpb pushuploads files to the device — Push local files with--destfor custom paths, or pass a URL to let the device download directly. Example:pb push photo.jpg --dest /sdcard/Pictures/- Smart error recovery — Missing arguments, invalid paths, and interrupted transfers give clear suggestions. Partial uploads are cleaned up automatically
New Commands
pb daemon status/stop/restart/logs— Full daemon lifecycle management. Check connection status, restart after issues, or tail the log file for debuggingpb skills new <name>— Scaffold a new skill interactively: pick the target app from a live device list, auto-extract the app icon, pre-fill package name and categorypb icon <package>— Show any installed app's launcher icon in the terminal
Skills
pb skills install <name>from the skill hub — Install skills by name with automatic dependency resolution. Example:pb skills install googleplaypulls GooglePlay + its dependency GoogleServices in one commandpb skills listshows icons, versions, and status — Visual skill overview at a glance: app icon, enabled/disabled state, version, and description- Streaming install progress — Watch installs happen in real time:
↓ downloaded,→ found dependency,✓ installed - Remote skill templates —
pb skills newpulls the latest templates automatically — no CLI update needed to get template improvements
UI
- App icons everywhere —
pb packagesandpb skills listnow display launcher icons inline (iTerm2 / Kitty) with colored letter fallback in other terminals - Cleaner
pb listoutput — Commands already available as aliases are hidden, giving you a focused view of what's actually useful - Reorganized
pb --help— Commands grouped into Device Management, Device Control, Skills, and Connection sections - Seamless upgrades —
pb updateautomatically restarts the daemon so the new version takes effect immediately
Connection
- Idle timeout — Auto-disconnects after 10 minutes of inactivity to save resources. Configure with
pb config set idle_timeout <seconds> - Faster sequential commands — Reduced overhead when running multiple pb commands in a row (e.g., AI agent workflows)
- More reliable connections — Rearchitected CLI-to-device communication for better stability under load
Config
- Underscore-style config keys —
network_timeout,idle_timeout(old dash-style keys removed)
更新内容
一键安装或升级:
curl -fsSL https://get.phonebase.cloud | sh
验证安装:
pb --version
pb skills install
设备控制
pb install支持本地文件、URL 和 XAPK — 本地 APK/XAPK、HTTP 链接、设备路径三种方式安装应用,大文件实时显示进度条和预估时间。示例:pb install ~/Downloads/app.xapkpb push上传文件到设备 — 本地文件用--dest指定目标路径,也可传 URL 让设备直接下载。示例:pb push photo.jpg --dest /sdcard/Pictures/- 智能错误恢复 — 缺参数、路径不存在、传输中断都给出清晰的操作建议,失败时自动清理残留文件
新增命令
pb daemon status/stop/restart/logs— 完整的守护进程管理:查看连接状态、重启、查看日志pb skills new <name>— 交互式创建 skill:从已连接设备的应用列表中选择目标应用,自动提取图标,预填包名和分类pb icon <package>— 在终端显示任意已安装应用的图标
Skills
pb skills install <name>从 skill hub 安装 — 按名字安装 skill,自动解析依赖。示例:pb skills install googleplay一条命令拉取 GooglePlay 及其依赖 GoogleServicespb skills list展示图标、版本和状态 — 一览:应用图标、启用/禁用状态、版本号、描述- 流式安装进度 — 实时看到安装过程:
↓ 下载、→ 发现依赖、✓ 安装 - 远程 skill 模板 —
pb skills new自动拉取最新模板,不需要更新 CLI 就能获得模板改进
界面
- 应用图标随处可见 —
pb packages和pb skills list都内联显示应用图标(iTerm2 / Kitty),其他终端用彩色首字母代替 - 更干净的
pb list输出 — 已被别名覆盖的命令自动隐藏,只显示真正需要关注的接口 pb --help分类重组 — 按设备管理、设备操作、Skills、连接分组,快速找到需要的命令- 无缝升级 —
pb update自动重启守护进程,新版本立即生效
连接
- 空闲超时 — 10 分钟无操作自动断连以节省资源,可配置:
pb config set idle_timeout <秒数> - 连续命令更快 — 连续执行多条 pb 命令时开销更低(AI agent 工作流受益明显)
- 连接更稳定 — 重新设计了 CLI 到设备的通信架构,高负载下更可靠
配置
- Config key 统一下划线风格 —
network_timeout、idle_timeout(不再支持横杠风格)
Assets 7
v1.0.3
@bittired
bittired
eecf9c0
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's New
This release introduces the new skills system. Install or upgrade with the one-liner so both the pb binary and the global skills get installed together:
curl -fsSL https://get.phonebase.cloud | sh
Verify afterwards:
pb --version
pb skills list
Skills
pb skills— New subcommand family for managing skill guides:list,install,uninstall,enable,disable. Skills are Claude-standard markdown guides AI agents read for multi-step phone operationspb skills install— Single command installs both bundled builtins (install-app,web-search) to~/.phonebase/skills/AND the globalphonebaseskill to~/.agents/skills/phonebase/vianpx skills add phonebase-cloud/phonebase-skills -g -y- Non-interactive by design —
-g -yflags ensure the install never hangs on prompts, safe for AI / CI /curl | shcontexts - Installer auto-runs
skills install— Bothcurl -fsSL https://get.phonebase.cloud | shandpb updatenow trigger skills installation so AI agents have guides ready immediately - Skills layout — Builtin skills moved from flat
.mdfiles to Claude-standard<name>/SKILL.mddirectory layout
AI Context
- AI context moved to skills — The "For AI Agents" block previously injected at the bottom of
pb --helpis removed. All AI guidance now lives in thephonebaseskill fromphonebase-cloud/phonebase-skills, sopb --helpis cleaner for humans and AI guidance can evolve independently of pb releases
Device Control
pb inspectrewrite — Now generates a Layout Inspector-style HTML with two panels: Wireframe (reproduces UI layout fromboundscoordinates, showing text / buttons / inputs / skeletons) and Screenshot (hover to highlight any element, click to copy its full XML attributes)pb inspectvia daemon — Routed through the persistent daemon (dump + screencap) instead of a standalone HTTP endpoint, much faster and reuses the connected session
Output
pb devicesJSON addsconnected— Each device in JSON output now includesconnected: true/false. AI agents previously only saw device list + online status; now they can pick the already-connected device instead of asking the user which one to use
UI
pb skills --help— Custom template centralizes all subcommand usage lines inline. No global-s/-j/-fnoise, no duplicatehelpsubcommand entry, no per-subcommand--help. Everything is in one placeinstall.shshows download URL — Prints the full GitHub release URL before downloading, so users know what's being fetched
更新内容
本次版本引入全新的 skills 系统。请使用一条命令安装或升级,这样会自动同时安装 pb 和全局 skills:
curl -fsSL https://get.phonebase.cloud | sh
安装完成后验证:
pb --version
pb skills list
Skills
pb skills— 新增 skills 子命令系列:list、install、uninstall、enable、disable。skills 是 Claude 标准的 markdown 指南,AI agent 读它们来执行多步手机操作pb skills install— 一条命令同时安装内置 skills(install-app、web-search→~/.phonebase/skills/)和全局phonebaseskill(→~/.agents/skills/phonebase/,通过npx skills add phonebase-cloud/phonebase-skills -g -y)- 非交互设计 —
-g -y参数确保安装过程绝不卡在交互提示上,AI / CI /curl | sh场景全部可用 - 安装器自动装 skills —
curl -fsSL https://get.phonebase.cloud | sh和pb update都会触发 skills 安装,AI agent 开箱即用 - Skills 目录结构 — 内置 skill 从 flat
.md文件迁移到 Claude 标准的<name>/SKILL.md目录结构
AI 上下文
- AI 上下文迁移到 skills — 之前注入在
pb --help底部的「For AI Agents」段落已移除。所有 AI 指南迁移到phonebase-cloud/phonebase-skills的phonebaseskill,pb --help对人类更干净,AI 指南可以独立于 pb 版本单独迭代
设备控制
pb inspect重写 — 生成 Layout Inspector 风格的 HTML,双面板:Wireframe(按bounds坐标复刻 UI 布局,显示文字 / 按钮 / 输入框 / 骨架屏)+ Screenshot(hover 高亮任意控件,点击复制完整 XML 属性)pb inspect改走 daemon — 通过长连接的 daemon 接口(dump + screencap)而非独立 HTTP 端点,更快,复用已连接会话
输出
pb devicesJSON 补connected字段 — 每个 device 的 JSON 输出新增connected: true/false。之前 AI agent 只能看到设备列表和 online 状态,现在能直接识别已连接的设备,不用再问用户选哪台
UI
pb skills --help— 定制模板把所有子命令的完整用法集中在一处。没有全局-s/-j/-f噪声,没有重复的help子命令条目,子命令也不再有自己的--help。所有信息集中在父命令install.sh显示下载地址 — 下载前打印完整的 GitHub release URL,用户能确认将要下载什么
Assets 7
1.0.2
What's New
If you have pb installed, run the following to upgrade and verify:
pb update && pb --version
Output
- Smart output — Humans see colored text, tables, and ✓/✗ status. AI agents get structured JSON. Automatic, no config needed
PHONEBASE_OUTPUT— Set tojsonortextto force output format (case-insensitive)- Human-friendly tables —
pb devicesandpb devices listshow a clean table in terminal, JSON when piped - Key-value display —
pb status,pb display,pb top-activityetc. show aligned key-value pairs instead of raw JSON - Boolean results — Commands like
pb startshow✓ Success/✗ Failedinstead oftrue/false - Config dual-mode —
pb config show,pb config list,pb config get,pb apikeynow output JSON when piped
New Commands
pb browse <url>— Open URL in browser, auto-picks best available (Via → Via GP → Chrome → system default)pb uninstall <package>— Uninstall app from devicepb install --uri <url>— Install APK from URL (in addition topb install <file>)pb list— Now an alias command, shows API name + description. Hides aliased and internal APIspb info <name>— Now an alias command, shows API details
Screenshot
- JPG format — Quality 80, much smaller than PNG
- Terminal preview — Screenshot displayed directly in terminal (iTerm2/Kitty)
- Organized storage — Saved to
.phonebase/screencap/{YYYYMMDD}/{device_code}-{timestamp}.jpg - Project data directory —
.phonebase/in working directory for screencap, inspect, and future data
Device Control
pb dumpformatting — XML output is now nicely indented instead of a single long linepb swipeupgrade — Now uses bezier curve scrolling (input/scroll_bezier) for smoother swipes- Alias Handler system — Each alias can have custom logic.
clipboardauto-picks get/set,installauto-picks file/uri
Connection
- Auto-disconnect — Idle connections close after 10 minutes to save costs (configurable:
pb config set network.idle_timeout 600) - Removed user aliases —
~/.phonebase/aliases.tomlno longer supported. All aliases are built-in
Error Handling
- No URL leaks — HTTP errors no longer expose internal API URLs
- Friendly prefixes —
✗ Not found: ...,✗ Unauthorized: ...,✗ Rate limited: ...instead of raw error codes
UI
- Device Code — All user-facing text uses "Device Code" (e.g.
IDY291LX6WW6RCW) instead of "Device ID" devices create— Now shows device_code and status after creationuicommand hidden — Removed from help output (still works)screencapsubcommand removed — Now runs as alias command, same usage
更新内容
运行以下命令升级并验证:
pb update && pb --version
输出
- 智能输出 — 人类看到彩色文字、表格和 ✓/✗ 状态,AI 拿到结构化 JSON。自动切换,无需配置
PHONEBASE_OUTPUT— 设为json或text强制指定输出格式(不区分大小写)- 表格显示 —
pb devices和pb devices list终端显示表格,管道输出 JSON - Key-value 显示 —
pb status、pb display、pb top-activity等显示对齐的键值对,不再是原始 JSON - 布尔值友好 —
pb start等命令显示✓ 成功/✗ 失败而不是true/false - 配置双模 —
pb config show、pb config list、pb config get、pb apikey管道输出 JSON
新增命令
pb browse <url>— 用浏览器打开链接,自动选择最佳浏览器(Via → Via GP → Chrome → 系统默认)pb uninstall <包名>— 卸载应用pb install --uri <链接>— 从 URL 安装 APK(原有pb install <文件>保留)pb list— 改为别名命令,显示接口名+描述,隐藏已有别名和内部接口pb info <名称>— 改为别名命令,显示接口详情
截图
- JPG 格式 — 质量 80,体积远小于 PNG
- 终端内预览 — 截图直接在终端中显示(支持 iTerm2/Kitty)
- 有序归档 — 保存到
.phonebase/screencap/{YYYYMMDD}/{设备编号}-{时间戳}.jpg - 项目数据目录 — 工作目录下
.phonebase/统一存放截图、inspect 等数据
设备控制
pb dump格式化 — XML 输出自动缩进,不再是一行到底pb swipe升级 — 改用贝塞尔曲线滑动(input/scroll_bezier),滑动更顺滑- 别名 Handler — 每个别名可以有自定义逻辑。
clipboard自动选 get/set,install自动选 file/uri
连接
- 自动断开 — 空闲 10 分钟自动断开,避免浪费(可配置:
pb config set network.idle_timeout 600) - 移除用户自定义别名 — 不再支持
~/.phonebase/aliases.toml,所有别名内置
错误处理
- 不泄露地址 — HTTP 错误不再暴露内部 API 地址
- 友好前缀 —
✗ 资源不存在: ...、✗ 认证失败: ...、✗ 请求过于频繁: ...替代原始错误码
界面
- 设备编号 — 所有可见文案统一使用「设备编号」(如
IDY291LX6WW6RCW)替代「设备 ID」 devices create— 创建后显示 device_code 和 statusui命令隐藏 — 从帮助中移除(命令仍可用)screencap子命令移除 — 改为别名命令运行,用法不变
image