# Remote Cli **Repository Path**: sunshinewithmoonlight/remote-cli ## Basic Information - **Project Name**: Remote Cli - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-28 - **Last Updated**: 2026-03-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # remote-cli `remote-cli` 把飞书消息桥接到本机 tmux 主会话,并提供基于 macOS LaunchAgent 的系统任务运行时。 ## 当前支持 - 飞书入站到主会话:`text`、`image`、`file`、`audio`、`media` - 入站附件会尽量下载到 `/cache/feishu_attachments//...`,并把绝对路径追加给 Codex - 多个附件可以先积累到当前 draft,等待下一条文本一并提交 - `/new` 会在 Codex 主会话中开启新对话,并回发固定文案 `新对话已开启` - 飞书出站:`send-feishu-text`、`send-feishu-message` - 系统任务:`task create`、`task find`、`task status`、`task pause`、`task resume`、`task cancel`、`task delete` - `task create` 当前只支持 `type=time` ## 编译 ```bash cp ./config.example.yaml ./config.local.yaml make test make build ./bin/remote-cli -dry-run ./config.local.yaml ``` 产物位于 `./bin/remote-cli`。 ## 配置 至少填写这些字段: - `feishu.app_id` - `feishu.app_secret` - `main_session.command` - `scheduled_session.cron.timezone` 推荐的 `main_session.command`: ```yaml main_session: command: "$(which codex) --sandbox danger-full-access --dangerously-bypass-approvals-and-sandbox --no-alt-screen" ``` `schedule.system_tasks_root` 可选。不填时,系统任务和附件缓存默认落在 `~/Library/Application Support/remote-cli`。 ## 运行 如果本机已安装 `~/Library/LaunchAgents/com.remotecli.service.plist`,优先把它当作真实常驻服务: ```bash launchctl print gui/$(id -u)/com.remotecli.service launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.remotecli.service.plist 2>/dev/null || true launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.remotecli.service.plist ``` 只有在未安装该 LaunchAgent 的临时开发场景下,才使用: ```bash ./scripts/dev-service.sh restart ``` 统一健康检查: ```bash curl -sS http://127.0.0.1:6230/healthz ``` 如果当前走的是 `dev-service.sh` 路径,日志和 pid 在: - `/tmp/remote-cli/remote-cli.log` - `/tmp/remote-cli/remote-cli.pid` ## 文档 - [文档导航](docs/index.md) - [快速部署](docs/quick-deploy.md) - [当前架构](docs/architecture.md) - [Codex 主会话运行细节](docs/technical-details/11-codex-main-session-runtime.md)