命令字典
Slash 命令、CLI 子命令、Hook 事件、启动参数的字典与演进史。
Slash 命令、CLI 子命令、Hook 事件、启动参数的字典与演进史。
将当前终端会话推送到网页版 Claude Code (claude.ai/code)
/teleport 是 Claude Code 的会话迁移命令。它将一个正在本地终端运行的会话"推送"到 claude.ai/code(云端网页沙箱),使你可以在云端环境中继续该会话——对话历史随之携带。
对应的 CLI 入口标志为 --teleport。官方文档在 Claude Code on the web 页面中以章节标题 "Move tasks between web and terminal with --remote and --teleport" 来描述这组功能。
可用计划: Claude Code on the web 目前处于 research preview,/teleport 随之受限于同一范围——Pro、Max、Team 用户以及 Enterprise 中拥有 premium seats 或 Chat + Claude Code seats 的席位。不支持 API key 认证。
在一个已打开的本地 Claude Code 会话中输入:
/teleport
弹出交互式选择器,列出可推送到云端的会话供选择。
# 交互式——展示可迁移的会话列表
claude --teleport
# 直接指定 session ID 跳过选择器
claude --teleport <session-id>
/teleport 与 /remote-control(别名 /rc)是两个会话桥接命令:
| 命令 | 数据流向 | 会话运行位置 | 适用场景 |
|---|---|---|---|
/teleport / claude --teleport | 本地终端 → 云端(claude.ai/code) | 迁移后在云端执行 | 本地开始的任务想切到云端继续 |
/remote-control / --remote-control | 本地终端 → 网页/手机 | 始终在本机运行 | 本地任务想从浏览器或手机远程继续 |
引自官方 Remote Control 文档:
"Use Remote Control when you're in the middle of local work and want to keep going from another device. Use Claude Code on the web when you want to kick off a task without any local setup, work on a repo you don't have cloned, or run multiple tasks in parallel."
Remote Control 在文档中注明需要 Claude Code v2.1.51 或更高版本。
/teleport 或 claude --teleport 推送到 claude.ai/code,从网页/移动端继续。claude --teleport <session-id> 将指定会话迁移到云端。自动补全中找不到命令: GitHub issue #16846 记录了 v2.1.1 中 /teleport 不出现在 slash 命令自动补全的 bug——按 issue 复现步骤需输入完整的 /teleport。该 issue 标签为 area:core、bug、has repro、platform:macos。若遇到此问题,可先尝试 CLI 入口 claude --teleport 绕过。
更高版本中仍可能缺失: perrotta.dev 的作者在 v2.1.4 中同样无法在会话内触发 /teleport——官方文档已提及该命令,但实例内不可用。功能可能尚未对所有符合条件的账号全量放开。
API key 用户无法使用: /teleport 要求 claude.ai OAuth 登录,API key 或 Console 账号认证的用户无法触发该功能。如命令不可用,先在会话内运行 /login 确认当前登录方式。
为 claude.ai 订阅者新增斜杠命令,允许恢复和配置远程会话