Swylink Docs
CLI setup, auth, keys, and IDE wiring
引导式配置

生成设置令牌

在仪表盘 -> 连接中创建一次性设置令牌。CLI 将其兑换为本地设备凭证并自动复用。

已选 IDE
Cursor
.cursor/mcp.json
Swylink 在文档中显示 --ide cursor 和对应的 MCP 配置路径,以明确当前 IDE 的桥接设置。
章节

引导新设备

在仪表盘 -> 连接中生成设置令牌,然后使用该令牌首次运行桥接。

令牌安全须知

设置令牌为一次性且短期有效。如设备泄露,请在仪表盘连接页面撤销生成的设备凭证。

CLI
创建设置令牌
# Dashboard -> Connections -> Generate setup token for cursor
CLI
首次启动时使用令牌
SWYLINK_SETUP_TOKEN=YOUR_SWYLINK_SETUP_TOKEN npx -y @swylink/cli start --server wss://api.swylink.com/ws --ide cursor
章节

使用令牌文件

在 CI/CD 或自动化环境中,可将设置令牌存储在文件中而非环境变量。

文件与环境变量

--setup-token-file 参数从文件读取令牌,避免在进程参数或 shell 历史中暴露令牌。

CLI
令牌文件
npx -y @swylink/cli start --setup-token-file /path/to/token.txt --server wss://api.swylink.com/ws --ide cursor
继续
从认证到 IDE 连接完成完整的 CLI 流程,或跳回起点为新用户生成引导文档。