[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Emanuele-web04--remodex":3,"tool-Emanuele-web04--remodex":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159267,2,"2026-04-17T11:29:14",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":68,"readme_en":69,"readme_zh":70,"quickstart_zh":71,"use_case_zh":72,"hero_image_url":73,"owner_login":74,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":77,"owner_location":77,"owner_email":77,"owner_twitter":77,"owner_website":77,"owner_url":78,"languages":79,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":100,"env_os":101,"env_gpu":102,"env_ram":102,"env_deps":103,"category_tags":109,"github_topics":77,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":110,"updated_at":111,"faqs":112,"releases":146},8586,"Emanuele-web04\u002Fremodex","remodex","Remote Control for Codex.","Remodex 是一款专为 OpenAI Codex 打造的开源远程遥控工具，让你能用 iPhone 无缝操控运行在 Mac 上的 Codex 编程助手。它巧妙解决了开发者必须守在电脑前才能与 AI 协作的痛点，将强大的本地代码生成能力延伸至移动端，实现真正的随时随地编程。\n\n这款工具特别适合希望提升工作灵活性的软件开发者和技术研究人员。通过 Remodex，你可以在通勤或休息时审查代码、规划任务结构，甚至直接执行 Git 提交、推送和分支切换等操作。其独特的“本地优先”架构确保了数据隐私与安全：Codex 的核心运算始终保留在你的 Mac 上，手机仅作为加密的控制终端，两者通过端到端加密的 WebSocket 桥接通信。\n\n技术亮点方面，Remodex 支持在 macOS 后台以守护进程形式静默运行，利用系统原生机制实现可信设备自动重连。它不仅提供低延迟的快速响应模式，还允许用户在 AI 思考过程中动态调整策略、排队后续指令，甚至从手机摄像头直接发送图片辅助编程。作为一个完全自托管的开源项目，Remodex 不依赖任何公共云端服务，传输层透明可查，为注重隐私和控制权的极客用户提供了理","Remodex 是一款专为 OpenAI Codex 打造的开源远程遥控工具，让你能用 iPhone 无缝操控运行在 Mac 上的 Codex 编程助手。它巧妙解决了开发者必须守在电脑前才能与 AI 协作的痛点，将强大的本地代码生成能力延伸至移动端，实现真正的随时随地编程。\n\n这款工具特别适合希望提升工作灵活性的软件开发者和技术研究人员。通过 Remodex，你可以在通勤或休息时审查代码、规划任务结构，甚至直接执行 Git 提交、推送和分支切换等操作。其独特的“本地优先”架构确保了数据隐私与安全：Codex 的核心运算始终保留在你的 Mac 上，手机仅作为加密的控制终端，两者通过端到端加密的 WebSocket 桥接通信。\n\n技术亮点方面，Remodex 支持在 macOS 后台以守护进程形式静默运行，利用系统原生机制实现可信设备自动重连。它不仅提供低延迟的快速响应模式，还允许用户在 AI 思考过程中动态调整策略、排队后续指令，甚至从手机摄像头直接发送图片辅助编程。作为一个完全自托管的开源项目，Remodex 不依赖任何公共云端服务，传输层透明可查，为注重隐私和控制权的极客用户提供了理想的移动编程解决方案。","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmanuele-web04_remodex_readme_1752fa2f2fed.png\" alt=\"Remodex\" \u002F>\n\u003C\u002Fp>\n\n# Remodex\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fremodex)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fremodex)\n[![License: ISC](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-ISC-blue.svg)](LICENSE)\n[Follow on X](https:\u002F\u002Fx.com\u002Femanueledpt)\n\nControl [Codex](https:\u002F\u002Fopenai.com\u002Findex\u002Fcodex\u002F) from your iPhone. Remodex is a local-first open-source bridge + iOS app that keeps the Codex runtime on your Mac and lets your phone connect through a paired secure session.\n\n## Key App Features\n\n- End-to-end encrypted pairing and chats between your iPhone and Mac\n- Fast mode for lower-latency turns\n- Plan mode for structured planning before execution\n- Subagents from iPhone with the `\u002Fsubagents` command\n- Steer active runs without starting over\n- Queue follow-up prompts while a turn is still running\n- In-app notifications when turns finish or need attention\n- Git actions from your phone, including commit, push, pull, and branch switching\n- Reasoning controls to tune how much thinking Codex uses\n- Access controls with On-Request or Full access\n- Photo attachments from camera or library\n- One-time QR bootstrap with trusted Mac reconnects\n- macOS-only background bridge service via `launchd`\n- Live streaming on your phone while Codex runs on your Mac\n- Shared thread history with Codex on your Mac\n\nThe repo stays local-first and self-host friendly: the iOS app source does not embed a public hosted endpoint, and the transport layer remains inspectable for anyone who wants to run their own setup.\n\nToday, the background daemon \u002F trusted auto-reconnect flow is implemented for macOS. Self-hosted relay setups still work on other OSes, but they currently use the foreground bridge flow instead of the macOS `launchd` service path.\n\nIf you want the public-repo distribution model explained clearly, read [SELF_HOSTING_MODEL.md](SELF_HOSTING_MODEL.md).\n\n> **I am very early in this project. Expect bugs.**\n>\n> I am not actively accepting contributions yet. If you still want to help, read [CONTRIBUTING.md](CONTRIBUTING.md) first.\n\n## Get the App\n\nThe app is live on the [App Store](https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002Fremodex-remote-ai-coding\u002Fid6760243963).\n\nBuild the iOS app from source in Xcode, install your own signed build on-device, then use the in-app onboarding flow to pair by scanning the QR from `remodex up`.\n\nIf you scan the pairing QR with a generic camera or QR reader before installing the app, your device may treat the QR payload as plain text and open a web search instead of pairing.\n\n## Architecture\n\n```\n┌──────────────┐       Paired session   ┌───────────────┐       stdin\u002Fstdout       ┌─────────────┐\n│  Remodex iOS │ ◄────────────────────► │ remodex (Mac) │ ◄──────────────────────► │ codex       │\n│  app         │    WebSocket bridge    │ bridge        │    JSON-RPC              │ app-server  │\n└──────────────┘                        └───────────────┘                          └─────────────┘\n                                               │                                         │\n                                               │  AppleScript route bounce                │ JSONL rollout\n                                               ▼                                         ▼\n                                        ┌─────────────┐                           ┌─────────────┐\n                                        │  Codex.app  │ ◄─── reads from ──────── │  ~\u002F.codex\u002F  │\n                                        │  (desktop)  │      disk on navigate     │  sessions   │\n                                        └─────────────┘                           └─────────────┘\n```\n\n1. Run `remodex up` on your Mac\n2. On macOS, Remodex installs\u002Fstarts a lightweight background bridge service and prints a QR for first-time pairing or recovery\n3. Scan the QR once with the Remodex iOS app to trust that Mac\n4. After the first handshake, the iPhone can resolve the Mac's live session through the configured relay and reconnect automatically\n5. Your phone sends instructions to Codex through the bridge and receives responses in real-time\n6. The bridge handles git operations and local session persistence on your Mac\n7. `Codex.app` can read the same thread history from disk, but it is not a true live mirror unless you enable the optional refresh workaround\n\n## Repository Structure\n\nThis repo contains the local bridge, the iOS app target, and their tests:\n\n```\n├── phodex-bridge\u002F                # Node.js bridge package used by `remodex`\n│   ├── bin\u002F                      # CLI entrypoints\n│   └── src\u002F                      # Bridge runtime, git\u002Fworkspace handlers, refresh helpers\n├── CodexMobile\u002F                  # Xcode project root\n│   ├── CodexMobile\u002F              # App source target\n│   │   ├── Services\u002F             # Connection, sync, incoming-event, git, and persistence logic\n│   │   ├── Views\u002F                # SwiftUI screens and timeline\u002Fsidebar components\n│   │   ├── Models\u002F               # RPC, thread, message, and UI models\n│   │   └── Assets.xcassets\u002F      # App icons and UI assets\n│   ├── CodexMobileTests\u002F         # Unit tests\n│   ├── CodexMobileUITests\u002F       # UI tests\n│   └── BuildSupport\u002F             # Info.plist, xcconfig defaults, and local override templates\n```\n\n## Prerequisites\n\n- **Node.js** v18+\n- **[Codex CLI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex)** installed and in your PATH\n- **[Codex desktop app](https:\u002F\u002Fopenai.com\u002Findex\u002Fcodex\u002F)** (optional — for viewing threads on your Mac)\n- **A signed Remodex iOS build** installed on your iPhone or iPad before scanning the pairing QR\n- **macOS** (for desktop refresh features — the core bridge works on any OS)\n- **Xcode 16+** (only if building the iOS app from source)\n\n## Install the Bridge\n\n\u003Csub>Install from npm with `@latest` so you get the newest bridge fixes.\u003C\u002Fsub>\n\nIf you plan to use the macOS menu bar companion, `remodex` must be installed globally and available in your login-shell `PATH`.\n\n```sh\nnpm install -g remodex@latest\n```\n\nTo update an existing global install later:\n\n```sh\nnpm install -g remodex@latest\n```\n\nIf you only want to try Remodex, you can install it from npm and run it without cloning this repository.\n\n## Quick Start\n\nInstall the bridge, then run:\n\n```sh\nremodex up\n```\n\nOn first connect, open the Remodex app, follow the onboarding flow, then scan the QR code from inside the app.\n\nAfter that first scan:\n\n- the iPhone saves the Mac as a trusted device\n- the Mac bridge keeps its identity locally\n- the app tries trusted reconnect automatically on later launches\n- the QR remains available as a recovery path if trust changes or the relay cannot resolve the live session\n\nFor now, the daemon-backed trusted reconnect path is macOS-only. If you self-host on Linux or Windows, pairing still works, but the bridge runs in the foreground unless you set up your own OS-specific service wrapper.\n\n## Run Locally\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex.git\ncd remodex\n.\u002Frun-local-remodex.sh\n```\n\nThat launcher starts a local relay, points the bridge at `ws:\u002F\u002F\u003Cyour-host>:9000\u002Frelay`, and prints the pairing QR for the iPhone app.\n\nFor iPhone self-hosting, the recommended path is Tailscale or another stable private network. Plain LAN pairing over `ws:\u002F\u002F\u003Clan-ip>` on the same Wi-Fi is still available for local testing, but it can be unreliable on some iOS devices even when the relay and Wi-Fi are healthy.\n\nOptions:\n\n- `.\u002Frun-local-remodex.sh --hostname \u003Clan-hostname-or-ip>`\n- `.\u002Frun-local-remodex.sh --bind-host 127.0.0.1 --port 9100`\n\nIf your iPhone is pairing over LAN, use a hostname or IP the phone can actually reach.\n\n## Custom Relay Endpoint\n\nFor a full public self-hosting walkthrough, see [`Docs\u002Fself-hosting.md`](Docs\u002Fself-hosting.md).\n\nIf you want the npm bridge to point at your own setup instead of the package default, override `REMODEX_RELAY` explicitly:\n\n```sh\nREMODEX_RELAY=\"ws:\u002F\u002Flocalhost:9000\u002Frelay\" remodex up\n```\n\nFor self-hosted iPhone usage, prefer a relay URL reachable over Tailscale or another stable private network. Treat plain local `ws:\u002F\u002F192.168.x.x` pairing as best-effort rather than the recommended production path on iOS.\n\nA common private setup looks like this:\n\n1. Run the relay on your Mac, a mini server, or a VPS you control\n2. Put that machine on Tailscale\n3. Set `REMODEX_RELAY` to the Tailscale-reachable `ws:\u002F\u002F` or `wss:\u002F\u002F` relay URL\n4. Pair once with QR\n5. Let the iPhone reconnect to the same trusted Mac over that relay later\n\nIf that relay is fronting a Mac bridge, the macOS daemon can keep the bridge alive for hands-free reconnects. If you self-host against a non-macOS bridge, the same relay path still works, but automatic background service management is not built in yet.\n\nReverse-proxy subpaths work too, so a hosted relay behind Traefik can live under the same domain as other APIs:\n\n```sh\nREMODEX_RELAY=\"wss:\u002F\u002Fapi.example.com\u002Fremodex\u002Frelay\" remodex up\n```\n\nIn that setup, the public endpoints can look like this:\n\n- `wss:\u002F\u002Fapi.example.com\u002Fremodex\u002Frelay`\n- `https:\u002F\u002Fapi.example.com\u002Fremodex\u002Fv1\u002Fpush\u002Fsession\u002Fregister-device`\n- `https:\u002F\u002Fapi.example.com\u002Fremodex\u002Fv1\u002Fpush\u002Fsession\u002Fnotify-completion`\n\nHave the proxy strip `\u002Fremodex` before forwarding so the relay still receives `\u002Frelay\u002F...` and `\u002Fv1\u002Fpush\u002F...`.\n\nIf you point `REMODEX_RELAY` at your own self-hosted relay, managed push stays off unless you also set `REMODEX_PUSH_SERVICE_URL` on the bridge and explicitly enable push on the relay.\n\n## Publish to npm\n\nPublished npm packages can embed default private relay settings at pack time via the `prepack` script.\n\nThe current package version is `1.3.4`.\n\nTo publish the bridge with `api.phodex.app` as the default relay:\n\n```sh\ncd phodex-bridge\nnpm login\nREMODEX_PACKAGE_DEFAULT_RELAY_URL=\"wss:\u002F\u002Fapi.phodex.app\u002Frelay\" \\\nnpm publish\n```\n\nAfter publish, users can still override the packaged default at runtime with `REMODEX_RELAY`.\n\nYou can also run the bridge from source:\n\n```sh\ncd phodex-bridge\nnpm install\nREMODEX_RELAY=\"ws:\u002F\u002Flocalhost:9000\u002Frelay\" npm start\n```\n\n## Commands\n\n### `remodex up`\n\nStarts Remodex.\n\nOn macOS, `remodex up` is the friendly entrypoint for the background bridge service:\n\n- Writes the daemon config used by the `launchd` service\n- Starts or restarts the background bridge service\n- Waits for a pairing payload and prints a QR for first-time trust or recovery\n- Keeps the bridge alive even if you close the terminal later\n\nOn non-macOS platforms, `remodex up` runs the bridge in the foreground.\n\nIn both cases the bridge:\n\n- Spawns `codex app-server` (or connects to an existing endpoint)\n- Connects the Mac bridge to the configured relay\n- Forwards JSON-RPC messages bidirectionally\n- Handles git commands from the phone\n- Persists the active thread for later resumption\n\n### `remodex start`\n\nmacOS only. Starts the background bridge service without waiting for or printing a QR in the current terminal.\nIf the service is already loaded, this path refreshes it in place.\n\n### `remodex restart`\n\nmacOS only. Explicitly restarts the background bridge service without waiting for or printing a QR in the current terminal.\n\n### `remodex stop`\n\nmacOS only. Stops the background bridge service and clears its transient runtime status.\n\n### `remodex status`\n\nmacOS only. Prints the current `launchd` \u002F bridge status, including whether the service is loaded and whether a recent pairing payload exists.\n\n### `remodex run-service`\n\nmacOS only. Internal service entrypoint used by `launchd`. You normally do not run this manually.\n\n### `remodex --version`\n\nPrints the installed Remodex CLI version.\n\n```sh\nremodex --version\n# => 1.3.4\n```\n\n### `remodex reset-pairing`\n\nClears the saved bridge pairing state so the next trusted connection requires a fresh QR bootstrap again.\nYou normally do not need this for corrupted local state anymore: recent Remodex builds auto-repair unreadable pairing files\u002Fmirrors on startup.\n\n```sh\nremodex reset-pairing\n# => [remodex] Cleared the saved pairing state. Run `remodex up` to pair again.\n```\n\n### `remodex resume`\n\nReopens the last active thread in Codex.app on your Mac.\n\n```sh\nremodex resume\n# => [remodex] Opened last active thread: abc-123 (phone)\n```\n\n### `remodex watch [threadId]`\n\nTails the event log for a thread in real-time.\n\n```sh\nremodex watch\n# => [14:32:01] Phone: \"Fix the login bug in auth.ts\"\n# => [14:32:05] Codex: \"I'll look at auth.ts and fix the login...\"\n# => [14:32:18] Task started\n# => [14:33:42] Task complete\n```\n\n## Environment Variables\n\n`REMODEX_RELAY` is optional, but the default depends on how you got Remodex:\n\n- public GitHub\u002Fsource checkouts stay open-source and self-host friendly, so they do not ship with a hosted relay baked in\n- official published packages may include a default relay at publish time\n- if you are running from source, assume you should use `.\u002Frun-local-remodex.sh` or set `REMODEX_RELAY` yourself\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `REMODEX_RELAY` | empty in source checkouts; optional in published packages | Session base URL used for QR bootstrap, trusted-session resolve, and phone\u002FMac session routing |\n| `REMODEX_PUSH_SERVICE_URL` | disabled by default | Optional HTTP base URL for managed push registration\u002Fcompletion |\n| `REMODEX_CODEX_ENDPOINT` | — | Connect to an existing Codex WebSocket instead of spawning a local `codex app-server` |\n| `REMODEX_REFRESH_ENABLED` | `false` | Auto-refresh Codex.app when phone activity is detected (`true` enables it explicitly) |\n| `REMODEX_REFRESH_DEBOUNCE_MS` | `1200` | Debounce window (ms) for coalescing refresh events |\n| `REMODEX_REFRESH_COMMAND` | — | Custom shell command to run instead of the built-in AppleScript refresh |\n| `REMODEX_CODEX_BUNDLE_ID` | `com.openai.codex` | macOS bundle ID of the Codex app |\n| `CODEX_HOME` | `~\u002F.codex` | Codex data directory (used here for `sessions\u002F` rollout files) |\n\n```sh\n# Enable desktop refresh explicitly\nREMODEX_REFRESH_ENABLED=true remodex up\n\n# Connect to an existing Codex instance\nREMODEX_CODEX_ENDPOINT=ws:\u002F\u002Flocalhost:8080 remodex up\n\n# Use a custom self-hosted relay endpoint (`ws:\u002F\u002F` is unencrypted)\nREMODEX_RELAY=\"ws:\u002F\u002Flocalhost:9000\u002Frelay\" remodex up\n\n# Enable managed push only if your self-hosted relay also exposes a configured APNs push service\nREMODEX_RELAY=\"wss:\u002F\u002Frelay.example\u002Frelay\" \\\nREMODEX_PUSH_SERVICE_URL=\"https:\u002F\u002Frelay.example\" \\\nremodex up\n```\n\nOn the relay\u002FVPS side, keep push disabled until you actually want it. The HTTP push endpoints are off by default and only turn on when you set `REMODEX_ENABLE_PUSH_SERVICE=true`.\n\n## Pairing and Safety\n\n- Remodex is local-first: Codex, git operations, and workspace actions run on your Mac, while the iPhone acts as a paired remote control.\n- On iPhone, the most reliable self-host setup is a Tailscale-reachable relay. Plain LAN pairing over `ws:\u002F\u002F` on the same Wi-Fi can fail on some iOS devices because local-network routing from the app is not always reliable.\n- The pairing QR carries the connection URL, the session ID, and the bridge identity key used to bootstrap end-to-end encryption. After a successful first scan, the iPhone stores a trusted Mac record in Keychain and the bridge persists its trusted phone identity locally on the Mac.\n- On macOS, the bridge can keep running as a lightweight `launchd` service, so the phone can resolve the Mac's current live relay session and reconnect without scanning a new QR every time.\n- The QR is still the recovery path when trust changes, the bridge identity rotates, or the relay cannot resolve the current live session.\n- The bridge state lives canonically in `~\u002F.remodex\u002Fdevice-state.json` with local-only permissions. On macOS the bridge also mirrors that state to Keychain as best-effort backup\u002Fmigration data, and recent builds auto-repair unreadable local state on startup instead of requiring manual cleanup.\n- The CLI no longer prints the connection URL in plain text below the QR.\n- Set `REMODEX_RELAY` only when you want to self-host or test locally against your own setup.\n- Leave `REMODEX_TRUST_PROXY` unset for direct\u002Fself-hosted installs. Turn it on only when a trusted reverse proxy such as Traefik, Nginx, or Caddy is forwarding the relay traffic.\n- The transport implementation is public in [`relay\u002F`](relay\u002F), but your real deployed hostname and credentials should stay private.\n- On the iPhone, the default agent permission mode is `On-Request`. Switching the app to `Full access` auto-approves runtime approval prompts from the agent.\n\n## Security and Privacy\n\nRemodex now uses an authenticated end-to-end encrypted channel between the paired iPhone and the bridge running on your Mac. The transport layer still carries the WebSocket traffic, but it does not get the plaintext contents of prompts, tool calls, Codex responses, git output, or workspace RPC payloads once the secure session is established.\n\nThe secure channel is built in these steps:\n\n1. The bridge generates and persists a long-term device identity keypair on the Mac.\n2. The pairing QR shares the connection URL, session ID, bridge device ID, bridge identity public key, and a short expiry window.\n3. During pairing, the iPhone and bridge exchange fresh X25519 ephemeral keys and nonces.\n4. The bridge signs the handshake transcript with its Ed25519 identity key, and the iPhone verifies that signature against the public key from the QR code or the previously trusted Mac record.\n5. The iPhone signs a client-auth transcript with its own Ed25519 identity key, and the bridge verifies that before accepting the session.\n6. Both sides derive directional AES-256-GCM keys with HKDF-SHA256 and then wrap application messages in encrypted envelopes with monotonic counters for replay protection.\n\nPrivacy notes:\n\n- The transport layer can still see connection metadata and the plaintext secure control messages used to set up the encrypted session, including session IDs, device IDs, public keys, nonces, and handshake result codes.\n- The transport layer does not see decrypted application payloads after the secure handshake succeeds.\n- A fresh QR scan can replace the previously trusted iPhone automatically. Use `remodex reset-pairing` only when you intentionally want to wipe the remembered pairing state yourself.\n- On-device message history is also encrypted at rest on iPhone using a Keychain-backed AES key.\n\n## Git Integration\n\nThe bridge intercepts `git\u002F*` JSON-RPC calls from the phone and executes them locally:\n\n| Command | Description |\n|---------|-------------|\n| `git\u002Fstatus` | Branch, tracking info, dirty state, file list, and diff |\n| `git\u002Fcommit` | Commit staged changes with an optional message |\n| `git\u002Fpush` | Push to remote |\n| `git\u002Fpull` | Pull from remote (auto-aborts on conflict) |\n| `git\u002Fbranches` | List all branches with current\u002Fdefault markers |\n| `git\u002Fcheckout` | Switch branches |\n| `git\u002FcreateBranch` | Create and switch to a new branch |\n| `git\u002Flog` | Recent commit history |\n| `git\u002Fstash` | Stash working changes |\n| `git\u002FstashPop` | Pop the latest stash |\n| `git\u002FresetToRemote` | Hard reset to remote (requires confirmation) |\n| `git\u002FremoteUrl` | Get the remote URL and owner\u002Frepo |\n\n## Workspace Integration\n\nThe bridge also handles local workspace-scoped revert operations for the assistant revert flow:\n\n| Command | Description |\n|---------|-------------|\n| `workspace\u002FrevertPatchPreview` | Checks whether a reverse patch can be applied cleanly in the local repo |\n| `workspace\u002FrevertPatchApply` | Applies the reverse patch locally when the preview succeeds |\n\n## Codex Desktop App Integration\n\nRemodex works with both the Codex CLI and the Codex desktop app (`Codex.app`). Under the hood, the bridge spawns a `codex app-server` process — the same JSON-RPC interface that powers the desktop app and IDE extensions. Conversations are persisted as JSONL rollout files under `~\u002F.codex\u002Fsessions`, so threads started from your phone show up in the desktop app too.\n\nWhat is live today:\n\n- The iPhone conversation is live while the bridge session is connected.\n- The Mac-side Codex runtime is the real runtime doing the work.\n\nWhat is not fully live today:\n\n- `Codex.app` does not act like a second live subscriber to the active run by default.\n- The desktop app catches up from the persisted session files and can be nudged with the optional refresh workaround below.\n- True phone-to-desktop live sync in the `Codex.app` GUI is not supported today.\n\nTo make that limitation more practical, Remodex also includes a hand-off button in the iPhone app. It lets you explicitly continue the current chat on your Mac by opening the matching thread in `Codex.app` when you are ready to switch devices.\n\n**Known limitation**: The Codex desktop app does not live-reload when an external `app-server` process writes new data to disk. Threads created or updated from your phone won't appear in the desktop app until it remounts that route. Remodex keeps desktop refresh off by default for now because the current deep-link bounce is still disruptive. You can still enable it manually if you want the old remount workaround.\n\n```sh\n# Enable the old deep-link refresh workaround manually\nREMODEX_REFRESH_ENABLED=true remodex up\n```\n\nThis triggers a debounced deep-link bounce (`codex:\u002F\u002Fsettings` → `codex:\u002F\u002Fthreads\u002F\u003Cid>`) that forces the desktop app to remount the current thread without interrupting any running tasks. While a turn is running, Remodex also watches the persisted rollout for that thread and issues occasional throttled refreshes so long responses become visible on Mac without a full app relaunch. If the local desktop path is unavailable, the bridge self-disables desktop refresh for the rest of that run instead of retrying noisily forever.\n\n## Connection Resilience\n\n- **Auto-reconnect**: If the session connection drops, the bridge reconnects with exponential backoff (1 s → 5 s max)\n- **Secure catch-up**: The bridge keeps a bounded local outbound buffer and re-sends missed encrypted messages after a secure reconnect\n- **Codex persistence**: The Codex process stays alive across transient session reconnects during the current bridge run\n- **Graceful shutdown**: SIGINT\u002FSIGTERM cleanly close all connections\n\n## Building the iOS App\n\n```sh\ncd CodexMobile\nopen CodexMobile.xcodeproj\n```\n\nBuild and run on a physical device or simulator with Xcode. The app uses SwiftUI and the current project target is iOS 18.6.\n\n## Contributing\n\nI'm not actively accepting contributions yet. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n## FAQ\n\n**Do I need an OpenAI API key?**\nNot for Remodex itself. You need Codex CLI set up and working independently.\n\n**Does this work on Linux\u002FWindows?**\nThe core bridge client (Codex forwarding + git) works on any OS. Desktop refresh (AppleScript) is macOS-only, and the built-in daemon \u002F trusted auto-reconnect service path is currently macOS-only too.\n\n**What happens if I close the terminal?**\nOn macOS, the bridge can keep running in the background through `launchd`, so closing the terminal does not stop the trusted reconnect path. On other OSes, the foreground bridge stops when the terminal stops.\n\n**How do I force a fresh QR pairing?**\nRun `remodex reset-pairing`, then start the bridge again with `remodex up`. You should only need this when you intentionally want to replace the paired iPhone or wipe the remembered pairing.\n\n**Can I connect to a remote Codex instance?**\nYes — set `REMODEX_CODEX_ENDPOINT=ws:\u002F\u002Fhost:port` to skip spawning a local `codex app-server`.\n\n**Why don't my phone threads show up in the Codex desktop app immediately?**\nThe desktop app reads session data from disk (`~\u002F.codex\u002Fsessions`) but doesn't live-reload when an external process writes new data. Your phone still gets the live stream; it is the desktop GUI that lags unless you explicitly enable the refresh workaround with `REMODEX_REFRESH_ENABLED=true`.\n\n**Does Remodex support true live sync between phone and `Codex.app`?**\nNo. The phone session is live, but the `Codex.app` GUI is not a true live mirror of the active run. To help with that, the iPhone app includes a `Hand off to Mac app` button so you can explicitly continue the same thread on your Mac.\n\n**Can I self-host the relay?**\nYes. That is the intended forking path. The transport and push-service code are in [`relay\u002F`](relay\u002F); point `REMODEX_RELAY` at the instance you run.\n\n**Can I use Tailscale?**\nYes. It is the recommended private-network option for self-hosting on iPhone. Run your relay somewhere reachable over Tailscale, set `REMODEX_RELAY` to that relay URL, pair once with QR, then let the app reconnect to the trusted Mac through the same relay.\n\n**Is the transport layer safe for sensitive work?**\nIt is much stronger than a plain text proxy: traffic can be protected in transit with TLS, application payloads are end-to-end encrypted after the secure handshake, and all Codex execution still happens on your Mac. The transport can still observe connection metadata and handshake control messages, so the tightest trust model is to run it yourself.\n\n## License\n\n[ISC](LICENSE)\n","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmanuele-web04_remodex_readme_1752fa2f2fed.png\" alt=\"Remodex\" \u002F>\n\u003C\u002Fp>\n\n# Remodex\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fremodex)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fremodex)\n[![License: ISC](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-ISC-blue.svg)](LICENSE)\n[关注 X](https:\u002F\u002Fx.com\u002Femanueledpt)\n\n通过你的 iPhone 控制 [Codex](https:\u002F\u002Fopenai.com\u002Findex\u002Fcodex\u002F)。Remodex 是一款本地优先的开源桥接工具及 iOS 应用，它将 Codex 运行时保留在你的 Mac 上，并允许你的手机通过配对的安全会话进行连接。\n\n## 应用核心功能\n\n- iPhone 与 Mac 之间的端到端加密配对和聊天\n- 快速模式以降低回合延迟\n- 计划模式用于在执行前进行结构化规划\n- 使用 `\u002Fsubagents` 命令从 iPhone 创建子代理\n- 在不重新开始的情况下引导正在进行的运行\n- 在当前回合仍在运行时排队后续提示\n- 回合结束或需要关注时的应用内通知\n- 通过手机执行 Git 操作，包括提交、推送、拉取和分支切换\n- 推理控制以调整 Codex 的思考程度\n- 访问控制，支持按需访问或完全访问\n- 可从相机或相册添加照片附件\n- 一次性 QR 码引导，配合受信任的 Mac 自动重连\n- 仅限 macOS 的后台桥接服务，通过 `launchd` 实现\n- 在 Codex 于 Mac 上运行时，手机可进行实时流式传输\n- 与 Mac 上的 Codex 共享线程历史记录\n\n该仓库坚持本地优先和自托管友好原则：iOS 应用源码未嵌入公共托管端点，传输层对任何希望自行搭建环境的人都可检查。\n\n目前，后台守护进程\u002F受信任自动重连流程仅适用于 macOS。其他操作系统上的自托管中继设置仍然有效，但它们目前使用前台桥接流程，而非 macOS 的 `launchd` 服务路径。\n\n如需清晰了解公开仓库的分发模式，请阅读 [SELF_HOSTING_MODEL.md](SELF_HOSTING_MODEL.md)。\n\n> **该项目尚处于非常早期阶段，可能存在诸多 bug。**\n>\n> 我目前暂不接受贡献。若您仍希望提供帮助，请先阅读 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n## 获取应用\n\n该应用已在 [App Store](https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002Fremodex-remote-ai-coding\u002Fid6760243963) 上架。\n\n你可以在 Xcode 中从源码构建 iOS 应用，将自己签名的版本安装到设备上，然后使用应用内的引导流程，扫描 `remodex up` 生成的 QR 码完成配对。\n\n若在安装应用之前，使用普通相机或 QR 读取器扫描配对 QR 码，设备可能会将 QR 负载视为纯文本，并打开网页搜索，而非执行配对操作。\n\n## 架构设计\n\n```\n┌──────────────┐       配对会话   ┌───────────────┐       stdin\u002Fstdout       ┌─────────────┐\n│  Remodex iOS │ ◄────────────────────► │ remodex (Mac) │ ◄──────────────────────► │ codex       │\n│  应用         │    WebSocket 桥接    │ 桥接          │    JSON-RPC              │ 应用服务器  │\n└──────────────┘                        └───────────────┘                          └─────────────┘\n                                               │                                         │\n                                               │  AppleScript 路由反弹                │ JSONL 展示\n                                               ▼                                         ▼\n                                        ┌─────────────┐                           ┌─────────────┐\n                                        │  Codex.app  │ ◄─── 从磁盘读取 ──────── │  ~\u002F.codex\u002F  │\n                                        │  (桌面)  │      导航时的数据文件     │  会话数据   │\n                                        └─────────────┘                           └─────────────┘\n```\n\n1. 在你的 Mac 上运行 `remodex up`\n2. 在 macOS 上，Remodex 会安装并启动一个轻量级的后台桥接服务，并打印出用于首次配对或恢复的 QR 码。\n3. 使用 Remodex iOS 应用扫描一次该 QR 码，以信任该 Mac。\n4. 完成首次握手后，iPhone 可通过配置的中继解析 Mac 的实时会话，并自动重新连接。\n5. 你的手机通过桥接向 Codex 发送指令，并实时接收响应。\n6. 桥接负责处理 Git 操作以及在 Mac 上的本地会话持久化。\n7. `Codex.app` 可以从磁盘读取相同的线程历史记录，但除非启用可选的刷新 workaround，否则它并非真正的实时镜像。\n\n## 仓库结构\n\n本仓库包含本地桥接、iOS 应用目标及其测试：\n\n```\n├── phodex-bridge\u002F                # `remodex` 使用的 Node.js 桥接包\n│   ├── bin\u002F                      # CLI 入口\n│   └── src\u002F                      # 桥接运行时、Git\u002F工作区处理器、刷新辅助工具\n├── CodexMobile\u002F                  # Xcode 项目根目录\n│   ├── CodexMobile\u002F              # 应用源码目标\n│   │   ├── Services\u002F             # 连接、同步、事件接收、Git 和持久化逻辑\n│   │   ├── Views\u002F                # SwiftUI 界面及时间线\u002F侧边栏组件\n│   │   ├── Models\u002F               # RPC、线程、消息和 UI 模型\n│   │   └── Assets.xcassets\u002F      # 应用图标和 UI 资源\n│   ├── CodexMobileTests\u002F         # 单元测试\n│   ├── CodexMobileUITests\u002F       # UI 测试\n│   └── BuildSupport\u002F             # Info.plist、xcconfig 默认值及本地覆盖模板\n```\n\n## 先决条件\n\n- **Node.js** v18+\n- 已安装并位于 PATH 中的 **[Codex CLI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex)**\n- **[Codex 桌面应用](https:\u002F\u002Fopenai.com\u002Findex\u002Fcodex\u002F)**（可选——用于在 Mac 上查看线程）\n- 在扫描配对 QR 码之前，已将签名的 Remodex iOS 版本安装到你的 iPhone 或 iPad 上\n- **macOS**（用于桌面刷新功能——核心桥接可在任何操作系统上运行）\n- **Xcode 16+**（仅当你需要从源码构建 iOS 应用时）\n\n## 安装桥接\n\n\u003Csub>请使用 `@latest` 从 npm 安装，以获得最新的桥接修复。\u003C\u002Fsub>\n\n如果你计划使用 macOS 菜单栏伴侣程序，`remodex` 必须全局安装，并且在你的登录 shell 的 PATH 中可用。\n\n```sh\nnpm install -g remodex@latest\n```\n\n若要更新现有的全局安装：\n\n```sh\nnpm install -g remodex@latest\n```\n\n如果你想简单试用 Remodex，可以直接从 npm 安装并运行，无需克隆此仓库。\n\n## 快速入门\n\n安装桥接后，运行以下命令：\n\n```sh\nremodex up\n```\n\n首次连接时，打开 Remodex 应用，按照引导流程操作，然后扫描应用内部显示的 QR 码。\n\n首次扫描之后：\n\n- iPhone 会将 Mac 保存为受信任的设备\n- Mac 上的桥接会将自身身份本地保存\n- 应用会在后续启动时自动尝试受信任的重连\n- QR 码仍将作为恢复路径，以防信任关系发生变化或中继无法解析实时会话。\n\n目前，基于守护进程的受信任重连路径仅适用于 macOS。如果你在 Linux 或 Windows 上进行自托管，配对仍然有效，但桥接将在前台运行，除非你设置自己的特定于操作系统的服务封装。\n\n## 本地运行\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex.git\ncd remodex\n.\u002Frun-local-remodex.sh\n```\n\n该启动脚本会启动一个本地中继服务，将桥接指向 `ws:\u002F\u002F\u003Cyour-host>:9000\u002Frelay`，并打印用于 iPhone 应用配对的二维码。\n\n对于 iPhone 的自托管场景，推荐使用 Tailscale 或其他稳定的私有网络。虽然在同一 Wi‑Fi 下通过 `ws:\u002F\u002F\u003Clan-ip>` 进行局域网配对仍可用于本地测试，但在某些 iOS 设备上，即使中继和 Wi‑Fi 状态良好，这种方式也可能不够稳定。\n\n选项：\n\n- `.\u002Frun-local-remodex.sh --hostname \u003Clan-hostname-or-ip>`\n- `.\u002Frun-local-remodex.sh --bind-host 127.0.0.1 --port 9100`\n\n如果您的 iPhone 是通过局域网配对，请确保使用的主机名或 IP 地址是手机能够实际访问到的。\n\n## 自定义中继端点\n\n有关完整的公开自托管教程，请参阅 [`Docs\u002Fself-hosting.md`](Docs\u002Fself-hosting.md)。\n\n如果您希望 npm 桥接指向您自己的部署而非包的默认设置，可以显式覆盖 `REMODEX_RELAY`：\n\n```sh\nREMODEX_RELAY=\"ws:\u002F\u002Flocalhost:9000\u002Frelay\" remodex up\n```\n\n对于自托管的 iPhone 使用场景，建议使用可通过 Tailscale 或其他稳定私有网络访问的中继 URL。请将普通的本地 `ws:\u002F\u002F192.168.x.x` 配对视为一种尽力而为的方式，而不是 iOS 生产环境中的推荐路径。\n\n常见的私有部署方案如下：\n\n1. 在您的 Mac、小型服务器或您控制的 VPS 上运行中继服务。\n2. 将该机器接入 Tailscale 网络。\n3. 设置 `REMODEX_RELAY` 为 Tailscale 可访问的 `ws:\u002F\u002F` 或 `wss:\u002F\u002F` 中继 URL。\n4. 使用二维码完成首次配对。\n5. 之后让 iPhone 通过该中继重新连接到同一台受信任的 Mac。\n\n如果该中继前端连接的是 Mac 桥接，macOS 守护进程可以保持桥接持续运行，实现无感重连。若您自托管非 macOS 平台的桥接，同样可以使用上述中继路径，但目前尚未内置自动后台服务管理功能。\n\n反向代理子路径同样适用，因此位于 Traefik 后端的托管中继可以与其他 API 共享同一域名：\n\n```sh\nREMODEX_RELAY=\"wss:\u002F\u002Fapi.example.com\u002Fremodex\u002Frelay\" remodex up\n```\n\n在这种配置下，公共端点可能如下所示：\n\n- `wss:\u002F\u002Fapi.example.com\u002Fremodex\u002Frelay`\n- `https:\u002F\u002Fapi.example.com\u002Fremodex\u002Fv1\u002Fpush\u002Fsession\u002Fregister-device`\n- `https:\u002F\u002Fapi.example.com\u002Fremodex\u002Fv1\u002Fpush\u002Fsession\u002Fnotify-completion`\n\n请确保代理在转发请求前移除 `\u002Fremodex` 路径，以便中继仍然能够接收 `\u002Frelay\u002F...` 和 `\u002Fv1\u002Fpush\u002F...` 请求。\n\n如果您将 `REMODEX_RELAY` 指向您自己的自托管中继，则托管推送功能将不会启用，除非您同时在桥接上设置 `REMODEX_PUSH_SERVICE_URL`，并在中继上明确开启推送服务。\n\n## 发布到 npm\n\n已发布的 npm 包可以在打包时通过 `prepack` 脚本嵌入默认的私有中继配置。\n\n当前包版本为 `1.3.4`。\n\n要将桥接发布并以 `api.phodex.app` 作为默认中继：\n\n```sh\ncd phodex-bridge\nnpm login\nREMODEX_PACKAGE_DEFAULT_RELAY_URL=\"wss:\u002F\u002Fapi.phodex.app\u002Frelay\" \\\nnpm publish\n```\n\n发布后，用户仍可在运行时通过 `REMODEX_RELAY` 覆盖打包时的默认值。\n\n您也可以直接从源代码运行桥接：\n\n```sh\ncd phodex-bridge\nnpm install\nREMODEX_RELAY=\"ws:\u002F\u002Flocalhost:9000\u002Frelay\" npm start\n```\n\n## 命令\n\n### `remodex up`\n\n启动 Remodex。\n\n在 macOS 上，`remodex up` 是后台桥接服务的友好入口：\n\n- 写入 `launchd` 服务所需的守护进程配置文件。\n- 启动或重启后台桥接服务。\n- 等待配对载荷并打印用于首次信任或恢复的二维码。\n- 即使您随后关闭终端，桥接也会保持运行。\n\n在非 macOS 平台上，`remodex up` 会在前台运行桥接。\n\n无论在哪种平台上，桥接都会：\n\n- 启动 `codex app-server`（或连接到现有端点）。\n- 将 Mac 桥接连接到配置的中继。\n- 双向转发 JSON-RPC 消息。\n- 处理来自手机的 Git 命令。\n- 保存当前线程状态，以便后续恢复。\n\n### `remodex start`\n\n仅限 macOS。启动后台桥接服务，但不在当前终端等待或打印二维码。若服务已加载，则会就地刷新。\n\n### `remodex restart`\n\n仅限 macOS。显式重启后台桥接服务，不等待或打印二维码。\n\n### `remodex stop`\n\n仅限 macOS。停止后台桥接服务，并清除其临时运行状态。\n\n### `remodex status`\n\n仅限 macOS。打印当前 `launchd` \u002F 桥接的状态，包括服务是否已加载以及是否存在最近的配对载荷。\n\n### `remodex run-service`\n\n仅限 macOS。由 `launchd` 使用的内部服务入口点。通常无需手动运行此命令。\n\n### `remodex --version`\n\n打印已安装的 Remodex CLI 版本。\n\n```sh\nremodex --version\n# => 1.3.4\n```\n\n### `remodex reset-pairing`\n\n清除已保存的桥接配对状态，以便下次受信任的连接需要重新进行 QR 引导。\n对于本地状态损坏的情况，您通常不再需要此操作：近期的 Remodex 版本会在启动时自动修复无法读取的配对文件或镜像。\n\n```sh\nremodex reset-pairing\n# => [remodex] 已清除已保存的配对状态。请运行 `remodex up` 以再次配对。\n```\n\n### `remodex resume`\n\n在您的 Mac 上重新打开 Codex.app 中的上一个活动线程。\n\n```sh\nremodex resume\n# => [remodex] 已打开上一个活动线程：abc-123（手机）\n```\n\n### `remodex watch [threadId]`\n\n实时跟踪某个线程的事件日志。\n\n```sh\nremodex watch\n# => [14:32:01] 手机：“修复 auth.ts 中的登录 bug。”\n# => [14:32:05] Codex：“我来检查 auth.ts 并修复登录问题……”\n# => [14:32:18] 任务开始。\n# => [14:33:42] 任务完成。\n```\n\n## 环境变量\n\n`REMODEX_RELAY` 是可选的，但其默认值取决于您获取 Remodex 的方式：\n\n- 公开的 GitHub 仓库或源码检出保持开源且便于自托管，因此不会内置托管中继。\n- 官方发布的软件包在发布时可能会包含一个默认中继。\n- 如果您是从源码运行，请假设应使用 `.\u002Frun-local-remodex.sh` 或自行设置 `REMODEX_RELAY`。\n\n| 变量 | 默认值 | 描述 |\n|----------|---------|-------------|\n| `REMODEX_RELAY` | 源码检出时为空；已发布软件包中可选 | 用于 QR 启动、可信会话解析以及手机\u002FMac 会话路由的会话基础 URL |\n| `REMODEX_PUSH_SERVICE_URL` | 默认禁用 | 用于托管推送注册\u002F完成的可选 HTTP 基础 URL |\n| `REMODEX_CODEX_ENDPOINT` | — | 连接到现有的 Codex WebSocket，而不是启动本地的 `codex app-server` |\n| `REMODEX_REFRESH_ENABLED` | `false` | 当检测到手机活动时自动刷新 Codex.app（设置为 `true` 则显式启用） |\n| `REMODEX_REFRESH_DEBOUNCE_MS` | `1200` | 用于合并刷新事件的防抖窗口（毫秒） |\n| `REMODEX_REFRESH_COMMAND` | — | 替换内置 AppleScript 刷新的自定义 Shell 命令 |\n| `REMODEX_CODEX_BUNDLE_ID` | `com.openai.codex` | Codex 应用程序的 macOS 包 ID |\n| `CODEX_HOME` | `~\u002F.codex` | Codex 数据目录（此处用于存储 `sessions\u002F` 部署文件） |\n\n```sh\n# 显式启用桌面刷新\nREMODEX_REFRESH_ENABLED=true remodex up\n\n# 连接到现有的 Codex 实例\nREMODEX_CODEX_ENDPOINT=ws:\u002F\u002Flocalhost:8080 remodex up\n\n# 使用自定义的自托管中继端点（`ws:\u002F\u002F` 未加密）\nREMODEX_RELAY=\"ws:\u002F\u002Flocalhost:9000\u002Frelay\" remodex up\n\n# 仅当您的自托管中继也暴露了配置好的 APNs 推送服务时，才启用托管推送\nREMODEX_RELAY=\"wss:\u002F\u002Frelay.example\u002Frelay\" \\\nREMODEX_PUSH_SERVICE_URL=\"https:\u002F\u002Frelay.example\" \\\nremodex up\n```\n\n在中继\u002FVPS 侧，应将推送功能保持禁用，直到您真正需要它为止。HTTP 推送端点默认关闭，只有在您设置 `REMODEX_ENABLE_PUSH_SERVICE=true` 时才会开启。\n\n## 配对与安全性\n\n- Remodex 是“本地优先”：Codex、Git 操作和工作区操作都在您的 Mac 上执行，而 iPhone 则作为配对的远程控制设备。\n- 在 iPhone 上，最可靠的自托管设置是通过 Tailscale 可达的中继。在同一 Wi‑Fi 网络上使用 `ws:\u002F\u002F` 进行普通局域网配对，在某些 iOS 设备上可能会失败，因为应用程序的本地网络路由并不总是可靠。\n- 配对二维码携带连接 URL、会话 ID 以及用于启动端到端加密的桥接身份密钥。首次成功扫描后，iPhone 会在 Keychain 中存储一条受信任的 Mac 记录，而桥接则会在 Mac 本地持久化其受信任的手机身份。\n- 在 macOS 上，桥接可以作为轻量级的 `launchd` 服务持续运行，这样手机就可以解析 Mac 当前的实时中继会话，并在无需每次重新扫描二维码的情况下重新连接。\n- 当信任关系发生变化、桥接身份轮换或中继无法解析当前的实时会话时，二维码仍然是恢复路径。\n- 桥接状态以规范形式存储在 `~\u002F.remodex\u002Fdevice-state.json` 中，权限仅限于本地访问。在 macOS 上，桥接还会将该状态镜像到 Keychain，作为尽力而为的备份\u002F迁移数据；最近的版本会在启动时自动修复无法读取的本地状态，而无需手动清理。\n- CLI 不再在二维码下方以明文打印连接 URL。\n- 仅在您希望自托管或针对自己的部署进行本地测试时，才设置 `REMODEX_RELAY`。\n- 对于直接安装或自托管安装，请保持 `REMODEX_TRUST_PROXY` 未设置。仅当受信任的反向代理（如 Traefik、Nginx 或 Caddy）正在转发中继流量时，才将其打开。\n- 传输实现公开在 [`relay\u002F`](relay\u002F) 目录中，但您实际部署的主机名和凭据应保持私密。\n- 在 iPhone 上，默认的代理权限模式是“按需”。将应用切换为“完全访问”会自动批准代理发出的运行时授权提示。\n\n## 安全与隐私\n\nRemodex 现在在配对的 iPhone 和您 Mac 上运行的桥接之间使用经过身份验证的端到端加密通道。传输层仍然承载 WebSocket 流量，但在安全会话建立后，它将不再获取提示、工具调用、Codex 响应、Git 输出或工作区 RPC 负载的明文内容。\n\n安全通道的构建步骤如下：\n\n1. 桥接在 Mac 上生成并持久化一对长期使用的设备身份密钥。\n2. 配对二维码共享连接 URL、会话 ID、桥接设备 ID、桥接身份公钥以及一个短期的有效期窗口。\n3. 在配对过程中，iPhone 和桥接交换新的 X25519 临时密钥和随机数。\n4. 桥接使用其 Ed25519 身份密钥对握手记录进行签名，iPhone 则使用来自二维码或先前受信任的 Mac 记录的公钥验证该签名。\n5. iPhone 使用其自身的 Ed25519 身份密钥对客户端认证记录进行签名，桥接在接受会话之前会验证该签名。\n6. 双方使用 HKDF-SHA256 导出方向性的 AES-256-GCM 密钥，然后使用带有单调计数器的加密信封封装应用消息，以防止重放攻击。\n\n隐私注意事项：\n\n- 传输层仍然可以看到连接元数据以及用于建立加密会话的明文安全控制消息，包括会话 ID、设备 ID、公钥、随机数和握手结果代码。\n- 在安全握手成功之后，传输层将看不到解密后的应用负载。\n- 重新扫描二维码可以自动替换先前受信任的 iPhone。请仅在您有意手动清除记忆中的配对状态时，才使用 `remodex reset-pairing`。\n- 在 iPhone 上，设备端的消息历史也会使用基于 Keychain 的 AES 密钥进行静态加密。\n\n## Git 集成\n\n桥接会拦截来自手机的 `git\u002F*` JSON-RPC 调用，并在本地执行它们：\n\n| 命令 | 描述 |\n|---------|-------------|\n| `git\u002Fstatus` | 分支、跟踪信息、脏状态、文件列表和差异 |\n| `git\u002Fcommit` | 提交暂存的更改，可选附带提交信息 |\n| `git\u002Fpush` | 推送到远程仓库 |\n| `git\u002Fpull` | 从远程仓库拉取（遇到冲突时自动中止） |\n| `git\u002Fbranches` | 列出所有分支，并标记当前\u002F默认分支 |\n| `git\u002Fcheckout` | 切换分支 |\n| `git\u002FcreateBranch` | 创建并切换到新分支 |\n| `git\u002Flog` | 最近的提交历史 |\n| `git\u002Fstash` | 暂存工作中的更改 |\n| `git\u002FstashPop` | 弹出最新的暂存内容 |\n| `git\u002FresetToRemote` | 硬重置到远程仓库（需要确认） |\n| `git\u002FremoteUrl` | 获取远程仓库的 URL 以及所有者\u002F仓库名称 |\n\n## 工作区集成\n\n该桥接还处理助手回滚流程中的本地工作区范围内的回滚操作：\n\n| 命令 | 描述 |\n|---------|-------------|\n| `workspace\u002FrevertPatchPreview` | 检查是否可以在本地仓库中干净地应用反向补丁 |\n| `workspace\u002FrevertPatchApply` | 在预览成功时，在本地应用反向补丁 |\n\n## Codex 桌面应用集成\n\nRemodex 同时支持 Codex CLI 和 Codex 桌面应用 (`Codex.app`)。在底层，该桥接会启动一个 `codex app-server` 进程——这与驱动桌面应用和 IDE 扩展的相同 JSON-RPC 接口。对话会以 JSONL 格式的回滚文件保存在 `~\u002F.codex\u002Fsessions` 目录下，因此您在手机上开始的对话线程也会出现在桌面应用中。\n\n目前实时功能包括：\n\n- 当桥接会话保持连接时，iPhone 上的对话是实时的。\n- Mac 端的 Codex 运行时才是实际执行任务的运行时。\n\n目前尚未完全实现实时功能的是：\n\n- 默认情况下，`Codex.app` 不会作为第二个实时订阅者来订阅当前的活跃会话。\n- 桌面应用会从持久化的会话文件中同步数据，并可通过下面的可选刷新 workaround 来手动触发更新。\n- 目前 `Codex.app` 的 GUI 尚不支持真正的手机到桌面的实时同步。\n\n为了使这一限制更加实用，Remodex 还在 iPhone 应用中提供了一个“移交至 Mac”按钮。当您准备切换设备时，该按钮可以将当前聊天明确地继续在您的 Mac 上，并在 `Codex.app` 中打开相应的对话线程。\n\n**已知限制**：当外部 `app-server` 进程向磁盘写入新数据时，Codex 桌面应用不会实时重新加载。您在手机上创建或更新的对话线程，只有在桌面应用重新挂载该路由后才会显示出来。出于当前深度链接跳转仍会造成干扰的考虑，Remodex 目前默认关闭了桌面刷新功能。如果您仍然希望使用旧的重新挂载 workaround，也可以手动启用它。\n\n```sh\n# 手动启用旧的深度链接刷新 workaround\nREMODEX_REFRESH_ENABLED=true remodex up\n```\n\n这会触发一个防抖后的深度链接跳转（`codex:\u002F\u002Fsettings` → `codex:\u002F\u002Fthreads\u002F\u003Cid>`），强制桌面应用重新挂载当前的对话线程，而不会中断任何正在运行的任务。在一轮对话进行中，Remodex 还会监控该线程的持久化回滚文件，并定期进行限流刷新，以便长响应能够在不完全重启应用的情况下在 Mac 上可见。如果本地桌面路径不可用，桥接会在该次运行剩余时间内自动禁用桌面刷新功能，而不是一直无休止地尝试重连。\n\n## 连接韧性\n\n- **自动重连**：如果会话连接断开，桥接会以指数退避策略重新连接（1 秒 → 最大 5 秒）。\n- **安全追加**：桥接会维护一个有限的本地出站缓冲区，并在安全重连后重新发送丢失的加密消息。\n- **Codex 持久化**：在当前桥接运行期间，Codex 进程会持续存活，即使会话短暂断开也能自动重连。\n- **优雅关闭**：SIGINT\u002FSIGTERM 会干净地关闭所有连接。\n\n## 构建 iOS 应用\n\n```sh\ncd CodexMobile\nopen CodexMobile.xcodeproj\n```\n\n使用 Xcode 在物理设备或模拟器上构建并运行。该应用使用 SwiftUI，当前项目目标为 iOS 18.6。\n\n## 贡献\n\n我目前暂不接受贡献。详情请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n## 常见问题解答\n\n**我需要 OpenAI API 密钥吗？**\n不需要用于 Remodex 本身。您只需要独立设置并运行 Codex CLI 即可。\n\n**这能在 Linux\u002FWindows 上运行吗？**\n核心桥接客户端（Codex 转发 + git）可在任何操作系统上运行。但桌面刷新功能（AppleScript）仅适用于 macOS，内置守护进程和可信自动重连服务路径目前也仅限于 macOS。\n\n**如果我关闭终端会发生什么？**\n在 macOS 上，桥接可以通过 `launchd` 在后台持续运行，因此关闭终端并不会停止可信重连路径。而在其他操作系统上，前台运行的桥接会在终端关闭时停止。\n\n**如何强制进行新的 QR 配对？**\n运行 `remodex reset-pairing`，然后再次使用 `remodex up` 启动桥接。您只需在有意更换配对的 iPhone 或清除已记住的配对信息时才需要执行此操作。\n\n**我可以连接到远程 Codex 实例吗？**\n可以——设置 `REMODEX_CODEX_ENDPOINT=ws:\u002F\u002Fhost:port` 即可跳过本地 `codex app-server` 的启动。\n\n**为什么我的手机对话线程不会立即显示在 Codex 桌面应用中？**\n桌面应用是从磁盘读取会话数据的（`~\u002F.codex\u002Fsessions`），但它不会在外部进程写入新数据时实时重新加载。您的手机仍然能接收到实时流；只是桌面 GUI 会滞后，除非您手动启用 `REMODEX_REFRESH_ENABLED=true` 的刷新 workaround。\n\n**Remodex 是否支持手机与 `Codex.app` 之间的真正实时同步？**\n不。手机会话是实时的，但 `Codex.app` 的 GUI 并不是当前活跃会话的真实实时镜像。为此，iPhone 应用中提供了一个“移交至 Mac 应用”按钮，方便您明确地在 Mac 上继续同一对话线程。\n\n**我可以自托管中继服务吗？**\n可以。这是预期的分叉路径。传输和推送服务的代码位于 [`relay\u002F`](relay\u002F) 目录下；您可以将 `REMODEX_RELAY` 指向您运行的实例。\n\n**我可以使用 Tailscale 吗？**\n可以。它是推荐的私有网络选项，适合在 iPhone 上进行自托管。将您的中继服务部署在可通过 Tailscale 访问的位置，设置 `REMODEX_RELAY` 为该中继 URL，通过 QR 码完成一次配对，然后让应用通过同一中继服务与受信任的 Mac 自动重连。\n\n**传输层对于敏感工作安全吗？**\n它比纯文本代理要安全得多：流量可在传输过程中使用 TLS 加密保护，应用负载在安全握手之后会进行端到端加密，而所有的 Codex 执行仍然发生在您的 Mac 上。不过，传输层仍可能观察到连接元数据和握手控制消息，因此最严格的信任模式是自行运行该服务。\n\n## 许可证\n\n[ISC](LICENSE)","# Remodex 快速上手指南\n\nRemodex 是一个开源的本地优先桥接工具，允许你通过 iPhone 安全地控制运行在 Mac 上的 OpenAI Codex。它支持端到端加密、Git 操作、子代理调用以及实时流式输出，让移动端编码体验如同本地一般流畅。\n\n## 环境准备\n\n在开始之前，请确保满足以下系统和软件要求：\n\n*   **操作系统**：\n    *   **Mac 端**：macOS（推荐，支持后台守护进程和自动重连）。Linux\u002FWindows 也可运行桥接服务，但需前台运行且无后台守护支持。\n    *   **移动端**：iPhone 或 iPad (iOS)。\n*   **核心依赖**：\n    *   **Node.js**: 版本 v18 或更高。\n    *   **Codex CLI**: 必须安装并配置到环境变量 `PATH` 中。\n    *   **Codex Desktop App** (可选): 用于在 Mac 上查看会话历史。\n*   **开发构建（仅当需要从源码编译 iOS 应用时）**：\n    *   Xcode 16+\n    *   有效的 Apple 开发者签名证书（用于真机调试）\n\n> **注意**：目前官方未提供中国镜像源。如遇网络问题，建议配置稳定的全局代理或使用 Tailscale 等内网穿透工具进行连接。\n\n## 安装步骤\n\n### 1. 安装 Mac 端桥接服务\n\n通过 npm 全局安装最新的 `remodex` 包：\n\n```sh\nnpm install -g remodex@latest\n```\n\n如需更新现有版本，再次运行上述命令即可。\n\n### 2. 安装 iOS 客户端\n\n你有两种选择：\n\n*   **方式 A（推荐）：从 App Store 下载**\n    直接在 App Store 搜索 \"Remodex\" 或访问链接下载安装。\n    \n*   **方式 B：从源码构建（需签名）**\n    如果你需要自定义功能或测试最新代码：\n    ```sh\n    git clone https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex.git\n    cd remodex\n    # 使用 Xcode 打开 CodexMobile\u002FCodexMobile.xcodeproj\n    # 配置 Signing & Capabilities，选择你的团队 ID\n    # 编译并部署到设备\n    ```\n\n## 基本使用\n\n### 第一步：启动 Mac 端服务\n\n在终端运行以下命令启动桥接服务。在 macOS 上，这将注册一个后台守护进程（`launchd`），即使关闭终端服务也会继续运行：\n\n```sh\nremodex up\n```\n\n运行后，终端会打印出一个 **QR 二维码**。\n\n### 第二步：配对设备\n\n1.  打开 iPhone 上的 **Remodex App**。\n2.  跟随应用内的引导流程，使用应用内的扫描器扫描 Mac 终端上显示的 QR 码。\n    *   *警告：请勿使用系统自带相机或其他通用扫码工具扫描，否则可能无法触发配对协议。*\n3.  扫描成功后，iPhone 将该 Mac 标记为受信任设备。\n\n### 第三步：开始使用\n\n配对完成后，你就可以在 iPhone 上：\n*   向 Codex 发送指令并实时查看代码生成流。\n*   使用 `\u002Fsubagents` 命令调用子代理。\n*   执行 Git 操作（commit, push, pull, 切换分支等）。\n*   上传照片作为上下文附件。\n*   调整推理强度（Reasoning controls）。\n\n后续打开 App 时，它将尝试通过配置的 Relay 自动重连到受信任的 Mac，无需再次扫码（除非信任状态变更）。\n\n### 进阶：自托管与局域网连接\n\n如果你希望在非公网环境或特定网络下使用（例如通过 Tailscale 组网）：\n\n1.  确保手机和 Mac 在同一稳定网络或通过 Tailscale 互通。\n2.  指定 Relay 地址启动服务：\n    ```sh\n    REMODEX_RELAY=\"ws:\u002F\u002F\u003C你的局域网 IP 或 Tailscale IP>:9000\u002Frelay\" remodex up\n    ```\n3.  在 App 中扫描新生成的二维码进行配对。\n\n> **提示**：在 iOS 设备上，纯局域网 (`ws:\u002F\u002F192.168.x.x`) 连接有时不稳定，强烈建议使用 Tailscale 等工具提供稳定的私有网络连接。","资深后端工程师李明正在咖啡馆利用午休时间排查一个紧急的生产环境 Bug，但他此刻身边只有一台 iPhone，而包含完整上下文和运行环境的 Codex 会话正运行在他的办公室 Mac 上。\n\n### 没有 remodex 时\n- **被迫中断工作流**：必须打开笔记本电脑远程桌面连接办公室电脑，操作延迟高且体验卡顿，无法充分利用手机便携性。\n- **上下文割裂**：在手机上查看日志或截图后，无法直接发送给桌面的 Codex，只能靠记忆复述或手动打字输入，极易出错。\n- **被动等待结果**：提交修复指令后无法随时掌握进度，若需调整思路必须重新发起会话，导致之前的推理链条断裂。\n- **Git 操作繁琐**：发现代码问题后，无法直接在移动端执行 commit 或切换分支验证，只能干等回到工位处理。\n\n### 使用 remodex 后\n- **无缝移动接管**：通过 remodex 的端到端加密配对，李明直接用 iPhone 接入 Mac 上的 Codex 运行时，像操作本地应用一样流畅。\n- **多模态即时交互**：他直接调用手机相机拍摄报错屏幕，作为附件发送给 Codex，AI 立即结合图像与现有代码上下文给出修复方案。\n- **动态 steering 控制**：在 Codex 生成代码过程中，李明随时插入新的约束条件或排队后续指令，无需打断当前运行即可引导方向。\n- **移动端 Git 闭环**：确认修复无误后，他直接在 app 内执行 git commit 和 push 操作，并利用通知功能在任务完成时收到提醒。\n\nremodex 将原本被束缚在桌面的强大 AI 编程能力延伸至移动端，让开发者真正实现了“代码随人走”的无间断开发体验。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmanuele-web04_remodex_1752fa2f.png","Emanuele-web04","Emanuele Di Pietro","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FEmanuele-web04_562ded3b.jpg",null,"https:\u002F\u002Fgithub.com\u002FEmanuele-web04",[80,84,88,92],{"name":81,"color":82,"percentage":83},"Swift","#F05138",83,{"name":85,"color":86,"percentage":87},"JavaScript","#f1e05a",16.4,{"name":89,"color":90,"percentage":91},"Shell","#89e051",0.5,{"name":93,"color":94,"percentage":95},"AppleScript","#101F1F",0.1,2155,206,"2026-04-17T10:53:06","ISC",4,"macOS, Linux, Windows","未说明",{"notes":104,"python":102,"dependencies":105},"核心桥接服务可在任何操作系统上运行，但 macOS 专属的后台守护进程（launchd）和自动重连功能仅限 macOS。需要在 Mac 上安装 OpenAI Codex 桌面应用或 CLI。iOS 端需要安装已签名的 Remodex 应用进行配对。若自行构建 iOS 应用需使用 Xcode 16+。",[106,107,108],"Node.js v18+","Codex CLI","Xcode 16+ (仅构建 iOS 应用时需要)",[35,13,45],"2026-03-27T02:49:30.150509","2026-04-18T02:22:20.696355",[113,118,123,128,133,137,141],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},38473,"为什么每次重启 Bridge 后都需要重新扫描二维码？","这是因为当前的实现中，每次运行 `remodex up` 时，Bridge 都会使用 `uuidv4()` 生成一个新的 `sessionId`。中继服务（Relay）只接受内存中已存在的会话房间，因此当 Bridge 重启后，旧的会话 ID 失效，手机保存的旧会话无法匹配，必须重新扫码建立新会话。目前仅实现了设备信任状态的持久化（如配对信息），但尚未实现跨重启的会话 ID 持久化。","https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex\u002Fissues\u002F3",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},38474,"无法通过二维码与本地 Mac 配对，卡在“安全握手”阶段怎么办？","最常见的原因是未安装 Codex CLI。即使安装了 Codex Desktop 应用，也不一定自动包含命令行工具。请确保在终端中手动安装 Codex CLI，然后再次尝试配对。如果之前失败，可以先运行 `remodex reset-pairing` 重置配对状态，再执行 `remodex up` 重新启动服务。","https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex\u002Fissues\u002F50",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},38475,"iOS 应用中模型的回答为什么会重复显示两次？","这是一个已知 Bug，已在主分支（main branch）中修复。如果您是通过 App Store 安装的版本，可能需要等待应用商店审核更新；如果您使用的是测试版或自行构建的版本，请拉取最新代码重新构建即可解决。","https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex\u002Fissues\u002F55",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},38476,"是否支持手动输入配对码作为扫描二维码的替代方案？","目前官方默认仅支持二维码扫描以确保安全边界。但在用户强烈建议下，维护者表示可以考虑添加备用恢复机制（如一次性配对 URL、短 reconnect 代码或恢复令牌），以便在用户远离电脑无法扫码时，仍能通过文本方式完成受信任设备的重连。该功能尚在讨论或规划中，旨在不削弱安全模型的前提下提升远程可用性。","https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex\u002Fissues\u002F13",{"id":134,"question_zh":135,"answer_zh":136,"source_url":132},38477,"为什么配对后连接仍然不稳定，经常断开并要求重新扫码？","当前设计将活动连接视为“短期安全会话”。一旦 Bridge 进程关闭、重启，或 Mac 空闲导致连接过期，之前的中继会话即被销毁且不会复用。这是为了强化隐私和设备信任的安全边界。因此，若发生上述情况，iPhone 必须建立新的实时会话（通常需重新扫码）。目前的行为是有意为之，而非故障。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":117},38478,"如何在没有图形界面的 Linux 服务器上部署 Remodex 并保持持久连接？","目前在无头（headless）Linux 服务器上运行存在限制：由于无法显示二维码，且每次重启 Bridge 都会生成新会话 ID，导致手机无法自动重连。变通方法是：先在有界面的设备上完成配对，然后将生成的信任凭证文件（通常位于 `secure-device-state.js` 管理的路径下）复制到 Linux 服务器。但需注意，除非修改代码以固定 `sessionId`，否则完全持久的自动重连尚不可靠，可能需要社区贡献 PR 来实现固定会话 ID 的功能。",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},38479,"Remodex 连接到了 Codex 会话，但看不到或无法切换到 Codex 应用界面？","这通常是因为环境配置或会话上下文问题。用户反馈即使执行 `git pull` 更新后问题仍存在，且有时只能看到部分线程（如仅显示 'lab' 线程）。维护者建议提供具体的操作流程截图以便排查。请检查是否正确启动了 Codex 服务，并确认 Remodex 指向了正确的会话上下文。如果问题持续，建议在 Issue 中附上屏幕截图和详细复现步骤。","https:\u002F\u002Fgithub.com\u002FEmanuele-web04\u002Fremodex\u002Fissues\u002F8",[]]