Skip to content

1.0.2

Choose a tag to compare

@bittired bittired released this 07 Apr 04:27
· 3 commits to main since this release

What's New

If you have pb installed, run the following to upgrade and verify:

pb update && pb --version

Output

  1. Smart output — Humans see colored text, tables, and ✓/✗ status. AI agents get structured JSON. Automatic, no config needed
  2. PHONEBASE_OUTPUT — Set to json or text to force output format (case-insensitive)
  3. Human-friendly tables — pb devices and pb devices list show a clean table in terminal, JSON when piped
  4. Key-value display — pb status, pb display, pb top-activity etc. show aligned key-value pairs instead of raw JSON
  5. Boolean results — Commands like pb start show ✓ Success / ✗ Failed instead of true / false
  6. Config dual-mode — pb config show, pb config list, pb config get, pb apikey now output JSON when piped

New Commands

  1. pb browse <url> — Open URL in browser, auto-picks best available (Via → Via GP → Chrome → system default)
  2. pb uninstall <package> — Uninstall app from device
  3. pb install --uri <url> — Install APK from URL (in addition to pb install <file>)
  4. pb list — Now an alias command, shows API name + description. Hides aliased and internal APIs
  5. pb info <name> — Now an alias command, shows API details

Screenshot

  1. JPG format — Quality 80, much smaller than PNG
  2. Terminal preview — Screenshot displayed directly in terminal (iTerm2/Kitty)
  3. Organized storage — Saved to .phonebase/screencap/{YYYYMMDD}/{device_code}-{timestamp}.jpg
  4. Project data directory — .phonebase/ in working directory for screencap, inspect, and future data

Device Control

  1. pb dump formatting — XML output is now nicely indented instead of a single long line
  2. pb swipe upgrade — Now uses bezier curve scrolling (input/scroll_bezier) for smoother swipes
  3. Alias Handler system — Each alias can have custom logic. clipboard auto-picks get/set, install auto-picks file/uri

Connection

  1. Auto-disconnect — Idle connections close after 10 minutes to save costs (configurable: pb config set network.idle_timeout 600)
  2. Removed user aliases — ~/.phonebase/aliases.toml no longer supported. All aliases are built-in

Error Handling

  1. No URL leaks — HTTP errors no longer expose internal API URLs
  2. Friendly prefixes — ✗ Not found: ..., ✗ Unauthorized: ..., ✗ Rate limited: ... instead of raw error codes

UI

  1. Device Code — All user-facing text uses "Device Code" (e.g. IDY291LX6WW6RCW) instead of "Device ID"
  2. devices create — Now shows device_code and status after creation
  3. ui command hidden — Removed from help output (still works)
  4. screencap subcommand removed — Now runs as alias command, same usage

更新内容

运行以下命令升级并验证:

pb update && pb --version

输出

  1. 智能输出 — 人类看到彩色文字、表格和 ✓/✗ 状态,AI 拿到结构化 JSON。自动切换,无需配置
  2. PHONEBASE_OUTPUT — 设为 json 或 text 强制指定输出格式(不区分大小写)
  3. 表格显示 — pb devices 和 pb devices list 终端显示表格,管道输出 JSON
  4. Key-value 显示 — pb status、pb display、pb top-activity 等显示对齐的键值对,不再是原始 JSON
  5. 布尔值友好 — pb start 等命令显示 ✓ 成功 / ✗ 失败 而不是 true / false
  6. 配置双模 — pb config show、pb config list、pb config get、pb apikey 管道输出 JSON

新增命令

  1. pb browse <url> — 用浏览器打开链接,自动选择最佳浏览器(Via → Via GP → Chrome → 系统默认)
  2. pb uninstall <包名> — 卸载应用
  3. pb install --uri <链接> — 从 URL 安装 APK(原有 pb install <文件> 保留)
  4. pb list — 改为别名命令,显示接口名+描述,隐藏已有别名和内部接口
  5. pb info <名称> — 改为别名命令,显示接口详情

截图

  1. JPG 格式 — 质量 80,体积远小于 PNG
  2. 终端内预览 — 截图直接在终端中显示(支持 iTerm2/Kitty)
  3. 有序归档 — 保存到 .phonebase/screencap/{YYYYMMDD}/{设备编号}-{时间戳}.jpg
  4. 项目数据目录 — 工作目录下 .phonebase/ 统一存放截图、inspect 等数据

设备控制

  1. pb dump 格式化 — XML 输出自动缩进,不再是一行到底
  2. pb swipe 升级 — 改用贝塞尔曲线滑动(input/scroll_bezier),滑动更顺滑
  3. 别名 Handler — 每个别名可以有自定义逻辑。clipboard 自动选 get/set,install 自动选 file/uri

连接

  1. 自动断开 — 空闲 10 分钟自动断开,避免浪费(可配置:pb config set network.idle_timeout 600)
  2. 移除用户自定义别名 — 不再支持 ~/.phonebase/aliases.toml,所有别名内置

错误处理

  1. 不泄露地址 — HTTP 错误不再暴露内部 API 地址
  2. 友好前缀 — ✗ 资源不存在: ...、✗ 认证失败: ...、✗ 请求过于频繁: ... 替代原始错误码

界面

  1. 设备编号 — 所有可见文案统一使用「设备编号」(如 IDY291LX6WW6RCW)替代「设备 ID」
  2. devices create — 创建后显示 device_code 和 status
  3. ui 命令隐藏 — 从帮助中移除(命令仍可用)
  4. screencap 子命令移除 — 改为别名命令运行,用法不变

image