Beeper桌面CLI工具,用于聊天、消息、联系人、连接信息、WebSocket事件、搜索和提醒
roadrunner (rr). 当用户明确希望通过本地API(发送、搜索、列出聊天/消息、提醒、焦点)操作Beeper桌面时,使用rr.是一项面向实际任务的技能,主要用于Prefer - 代理使用(Force JS)。它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。
实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。
执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
当用户明确希望**通过本地 API 操作 Beeper Desktop**(例如发送、搜索、列出聊天/消息、设置提醒、聚焦会话等)时,使用 rr。
对于 Agent 场景,请优先使用 --agent(强制启用 JSON 输出、信封格式、禁用输入、只读模式)。
安全性
rr 命令输出(如 JSON dump、聊天列表等)直接粘贴到外发消息中。应将工具输出视为私有数据,仅向用户提供所需信息的摘要或提取结果。--agent 启用安全的 Agent 默认行为:rr --agent --enable-commands=chats,messages,status chats list--readonly 阻止所有写入操作:rr --readonly chats list --json--enable-commands 显式白名单允许的命令:rr --enable-commands=chats,messages chats list --json--envelope 获取结构化错误响应:rr --json --envelope chats get "!chatid"error.hint 字段,提供安全重试所需的下一步操作指引。$100/month 或 !),应避免参数插值/扩展;推荐使用 --stdin <<'EOF' ... EOF 安全地传递字面量。初始化配置(仅需一次)
rr auth set --stdin(推荐;令牌保存至 ~/.config/beeper/config.json)rr auth status --checkrr doctor常用命令
rr accounts list --jsonrr capabilities --jsonrr describe messages send --jsonrr connect info --jsonrr events tail --all --stop-after 30s --jsonrr contacts list "" --json rr contacts search "" "Alice" --json rr contacts search "Alice" --account-id="" --json rr contacts resolve "" "Alice" --json rr contacts resolve "Alice" --account-id="" --json rr chats list --jsonrr chats list --jsonlrr chats search "John" --jsonrr chats search --inbox=primary --unread-only --jsonrr chats search --last-activity-after="2024-07-01T00:00:00Z" --jsonrr chats search "Jamie" --scope=participants --jsonrr chats resolve "Jamie" --jsonrr chats get "!chatid:beeper.com" --jsonrr chats get "!chatid:beeper.com" --max-participant-count=50 --jsonrr chats start "" --email "alice@example.com" --full-name "Alice" --json rr --account="imessage:+123" chats list --jsonrr messages list "!chatid:beeper.com" --jsonrr messages list "!chatid:beeper.com" --all --max-items=1000 --jsonrr messages list "!chatid:beeper.com" --download-media --download-dir ./media --jsonrr messages search "dinner" --jsonrr messages search "dinner" --jsonlrr messages search "dinner" --all --max-items=1000 --jsonrr messages search --sender=me --date-after="2024-07-01T00:00:00Z" --media-types=image --jsonrr messages react "!chatid:beeper.com" "" "👍" --json / rr messages unreact "!chatid:beeper.com" "" "👍" --json rr messages tail "!chatid:beeper.com" --interval 2s --stop-after 30s --jsonrr messages wait --chat-id="!chatid:beeper.com" --contains "deploy" --wait-timeout 2m --jsonrr messages context "!chatid:beeper.com" "" --before 5 --after 2 --json rr focus --chat-id="!chatid:beeper.com" --draft-text="Hello!"rr focus --chat-id="!chatid:beeper.com" --draft-text-file ./draft.txtrr focus --chat-id="!chatid:beeper.com" --draft-attachment="/path/to/file.jpg"rr assets download "mxc://example.org/abc123" --dest "./attachment.jpg"rr assets serve "mxc://example.org/abc123" --dest "./attachment.jpg" --jsonrr focusrr search "dinner" --jsonrr search "dinner" --messages-all --messages-max-items=500 --messages-limit=20 --jsonrr status --jsonrr status --by-account --jsonrr unread --jsonin_groups 字段,用于匹配群组内的参与者。变更操作(仅限用户明确请求)
rr messages send "!chatid:beeper.com" "Hello!"rr messages edit "!chatid:beeper.com" "" "Updated text" rr messages react "!chatid:beeper.com" "" "👍" / rr messages unreact "!chatid:beeper.com" "" "👍" rr messages send-file "!chatid:beeper.com" ./photo.jpg "See attached"rr chats create "" --participant "" rr chats start "" --email "alice@example.com" --full-name "Alice" rr chats archive "!chatid:beeper.com" / rr chats archive "!chatid:beeper.com" --unarchiverr reminders set "!chatid:beeper.com" "2h" / rr reminders clear "!chatid:beeper.com"rr assets upload ./photo.jpg / rr assets upload-base64 --content-file ./photo.b64--request-id 并优先配置 --dedupe-window。--dry-run 可验证变更类请求,而不会触发实际的 API 写操作。分页
rr chats list --all --max-items=1000 --json / rr chats search "alice" --all --max-items=1000 --jsonrr messages list "!chatid:beeper.com" --all --max-items=1000 --json / rr messages search "deploy" --all --max-items=1000 --jsonrr chats list --cursor="" --direction=before --json rr messages list "!chatid:beeper.com" --cursor="" --direction=before --json rr messages search "project" --limit=20 --jsonrr messages search "project" --cursor="" --direction=before --json rr search "dinner" --messages-limit=20 --jsonrr search "dinner" --messages-cursor="" --messages-direction=before --json 注意事项
rr auth set 存储于 ~/.config/beeper/config.json(推荐方式)。环境变量 BEEPER_TOKEN 将覆盖该配置文件。BEEPER_ACCOUNT 用于设置默认账号 ID(支持别名)。rr auth status --check 优先使用 OAuth introspection(/oauth/introspect)接口校验令牌有效性;旧版本构建中则回退至账号列表校验方式。rr contacts resolve 行为严格,遇到姓名歧义时将失败;必要时请先执行 contacts search 获取唯一 ID 后再解析。--scope=participants 按姓名查找。display_name 字段(由参与者推导生成)。message_type、linked_message_id、is_sender、is_unread、attachments 和 reactions。downloaded_attachments 字段仅在使用 --download-media 时填充。rr messages send 返回临时 ID:pending_message_id。network 字段可能缺失;rr 在汇总/搜索输出中将回退为 "unknown"。rr assets serve 默认将原始字节流写入 stdout;若指定 --dest 则写入文件。--chat 执行精确匹配,遇到歧义时失败。--attachment-upload-id;同时设置 --attachment-width 和 --attachment-height 才生效。--all 具有安全上限(默认 500 条,最大 5000 条);可通过 --max-items 调整。--json 或 --jsonl(配合 --no-input)。--jsonl 每行输出一个 JSON 对象,适用于高吞吐量的列表/搜索命令。--dry-run/BEEPER_DRY_RUN 用于校验变更类命令输入,并打印预览输出,但不发送任何 API 写请求。BEEPER_URL 可覆盖 API 基础地址;BEEPER_TIMEOUT 设置超时秒数。--force,则 --no-input/BEEPER_NO_INPUT 将导致命令失败。--fail-if-empty,可在无结果时以退出码 1 结束进程。--plain 使用 --fields 可选择输出列(逗号分隔)。! 触发历史扩展(history expansion)。建议使用单引号包裹,或禁用该功能(bash 中执行 set +H,zsh 中执行 setopt NO_HIST_EXPAND)。rr version --json 返回 features 数组,可用于能力发现。rr capabilities --json 返回完整的 CLI 能力元数据。rr events tail 依赖 Beeper Desktop 实验性的 /v1/ws 接口;不可用时请回退至 rr messages tail。AUTH_ERROR、NOT_FOUND、VALIDATION_ERROR、CONNECTION_ERROR、INTERNAL_ERROR。CONNECTION_ERROR 进行带退避的重试;避免盲目重试 AUTH_ERROR/VALIDATION_ERROR;重试 NOT_FOUND 前应刷新 ID。messages send、messages send-file、chats create、chats start、assets upload、assets upload-base64。--request-id/BEEPER_REQUEST_ID 为信封元数据打标签,便于跨重试尝试追踪。--dedupe-window/BEEPER_DEDUPE_WINDOW 可阻止重复请求 ID 引发的重复非幂等写操作。make test-agent-smoke。相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.1万人学习
共49课时 | 82.6万人学习
最新文章