roadbook
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese路书分享
Roadbook Sharing
用户意图 → 执行路径速查
User Intent → Execution Path Quick Reference
| 用户说 | 路径 | 是否需要登录 |
|---|---|---|
| "生成路书链接" / "帮我规划路线" / 分享旅行计划 | → 走 生成路书流程(步骤A) | 需要 |
| "查看路书列表" | → 走 列出路书流程(步骤B) | 需要 |
| "登录" / "登录路书" | → 走 登录流程(步骤C) | — |
| "查看某个路书详情" | → 走 查看路书流程(步骤D) | 不需要 |
| User says | Path | Login required? |
|---|---|---|
| "Generate a roadbook link" / "Help me plan a route" / Share a travel plan | → Follow the Roadbook Generation Flow (Step A) | Requires |
| "View the roadbook list" | → Follow the Roadbook Listing Flow (Step B) | Requires |
| "Log in" / "Log in to roadbooks" | → Follow the Login Flow (Step C) | — |
| "View details of a specific roadbook" | → Follow the Roadbook Details Flow (Step D) | No |
安装
Installation
安装前先阅读下面的命令。示例固定为 v1.1.4,不跟随 latest;下载的是可执行程序归档。
仅在需要安装 CLI 时执行,不要在每次调用命令时重复安装。
Before installing, read the commands below. The example is pinned to v1.1.4 rather than following latest; the downloaded artifact is an executable archive.
Run this only when the CLI needs to be installed; do not repeat the installation on every command invocation.
macOS / Linux:校验后安装到用户目录
macOS / Linux: Verify and Install to the User Directory
在 Bash 或 Zsh 中执行;需要 、、,以及 或 。
脚本自动选择 macOS / Linux 的 arm64 或 x86_64,其他平台会停止。
curltarinstallshasumsha256sumbash
(
set -eu
version='v1.1.4'
case "$(uname -s)/$(uname -m)" in
Darwin/arm64)
asset='cyeam_Darwin_arm64.tar.gz'
sha256='06b5af004ab4f0f05d5829ea6bd18b97c4449c262af7df14c67175f7d3cb29db' ;;
Darwin/x86_64)
asset='cyeam_Darwin_x86_64.tar.gz'
sha256='107342bb9d2fa444b96155c468e71b8cc63e0f5ad0acc784698afe221548efa6' ;;
Linux/aarch64|Linux/arm64)
asset='cyeam_Linux_arm64.tar.gz'
sha256='ed87697f3948bead67b585e9881c3bef20e8d2d903beb5b125587281a5091c5b' ;;
Linux/x86_64)
asset='cyeam_Linux_x86_64.tar.gz'
sha256='873d6805fab8ab56540bb034aaf2f57f12eb672fcabd322ebe401e8250a5966d' ;;
*) echo '不支持的平台,请查看固定版本的 Release。' >&2; exit 1 ;;
esac
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
cd "$workdir"
curl --fail --show-error --silent --location --proto '=https' --proto-redir '=https' \
--output "$asset" "https://github.com/mnhkahn/cyeam-cli/releases/download/$version/$asset"
printf '%s %s\n' "$sha256" "$asset" > expected.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c expected.sha256
else
shasum -a 256 -c expected.sha256
fi
# set -e 确保下载或校验失败时,不会解压或安装。
tar -xzf "$asset" cyeam
mkdir -p "$HOME/.local/bin"
install -m 0755 cyeam "$HOME/.local/bin/cyeam"
CYEAM_CLI_NO_UPDATE_NOTIFIER=1 "$HOME/.local/bin/cyeam" --no-analytics version
)只写临时目录和 (已有同名程序会被替换),无需管理员权限,
不修改系统目录、服务或 shell 配置。当前 shell 使用:
~/.local/bin/cyeambash
export PATH="$HOME/.local/bin:$PATH"如需永久生效,可自行把上面这一行加入 shell 配置。
可在 v1.1.4 发布页 和
checksums.txt
核对摘要。升级固定版本时,必须同时核对并替换版本号和对应 SHA-256。
摘要用于核对发布文件一致性,不等同于独立签名或安全审计。
Run this in Bash or Zsh; , , , and either or are required.
The script automatically selects arm64 or x86_64 on macOS / Linux and stops on other platforms.
curltarinstallshasumsha256sumbash
(
set -eu
version='v1.1.4'
case "$(uname -s)/$(uname -m)" in
Darwin/arm64)
asset='cyeam_Darwin_arm64.tar.gz'
sha256='06b5af004ab4f0f05d5829ea6bd18b97c4449c262af7df14c67175f7d3cb29db' ;;
Darwin/x86_64)
asset='cyeam_Darwin_x86_64.tar.gz'
sha256='107342bb9d2fa444b96155c468e71b8cc63e0f5ad0acc784698afe221548efa6' ;;
Linux/aarch64|Linux/arm64)
asset='cyeam_Linux_arm64.tar.gz'
sha256='ed87697f3948bead67b585e9881c3bef20e8d2d903beb5b125587281a5091c5b' ;;
Linux/x86_64)
asset='cyeam_Linux_x86_64.tar.gz'
sha256='873d6805fab8ab56540bb034aaf2f57f12eb672fcabd322ebe401e8250a5966d' ;;
*) echo '不支持的平台,请查看固定版本的 Release。' >&2; exit 1 ;;
esac
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
cd "$workdir"
curl --fail --show-error --silent --location --proto '=https' --proto-redir '=https' \
--output "$asset" "https://github.com/mnhkahn/cyeam-cli/releases/download/$version/$asset"
printf '%s %s\n' "$sha256" "$asset" > expected.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c expected.sha256
else
shasum -a 256 -c expected.sha256
fi
# set -e 确保下载或校验失败时,不会解压或安装。
tar -xzf "$asset" cyeam
mkdir -p "$HOME/.local/bin"
install -m 0755 cyeam "$HOME/.local/bin/cyeam"
CYEAM_CLI_NO_UPDATE_NOTIFIER=1 "$HOME/.local/bin/cyeam" --no-analytics version
)It writes only to the temporary directory and (an existing binary with the same name will be replaced), requires no administrator privileges, and does not modify system directories, services, or shell configuration. Use it in the current shell with:
~/.local/bin/cyeambash
export PATH="$HOME/.local/bin:$PATH"To make the change permanent, you can add the line above to your shell configuration.
You can verify the digest on the v1.1.4 release page and in checksums.txt.
When upgrading a pinned version, you must verify and replace both the version and its corresponding SHA-256.
The digest verifies the consistency of release artifacts; it is not equivalent to independent signature verification or a security audit.
外部请求和权限用途
External Requests and Permission Purposes
- 安装下载:只从 GitHub 的固定 Release 下载选定归档;GitHub 可能重定向到其资产 CDN。
下载后先验证文档中固定的 SHA-256,再解压单个 文件。安装检查关闭统计与更新提示。
cyeam - Microsoft 授权:仅在需要云端功能时运行 ,通过
cyeam login的设备码流程登录,并尝试打开授权页面。 请求https://login.microsoftonline.com/consumers(读写 OneDrive 文件)、Files.ReadWrite(读取账号信息)、User.Read(刷新令牌,免于每次登录)。文件权限覆盖授权账号的 OneDrive 文件, 不局限于本技能的文件夹;令牌优先存系统钥匙串,不可用时回退到offline_access。~/.cyeam/token.json - OneDrive 路书:通过
list读取https://graph.microsoft.com/v1.0文件夹及文件内容以获得标题;Microsoft 的文件下载可能重定向到其存储域名。路书/从 stdin 读取行程,把生成的 JSON 写入该文件夹,然后向 cyeam.com 分享。csv - 路书分享和读取:读取用户指定的本地 JSON,
share使用生成的 JSON,向csv上传行程以生成链接;https://www.cyeam.com/api/roadbook/share向get查询已分享内容。https://www.cyeam.com/api/roadbook/get?id=<ID>无需 Microsoft 登录;生成的链接用于让持有链接的人查看行程, 仅在用户要求分享时执行上传。share/get - 使用统计:默认向 发送命令名称、CLI 版本、系统信息和随机安装编号, 服务端可根据出口 IP 解析地域;不发送命令参数、图片内容或登录凭证。 随机编号保存在
https://us.i.posthog.com,用~/.cyeam/analytics-id或--no-analytics关闭。CYEAM_CLI_NO_ANALYTICS=1 - 更新提示:默认最多每 24 小时向 GitHub 检查最新版本,并缓存到 , 提示本身不会替换程序。设置
~/.cyeam/update-state.json关闭。CYEAM_CLI_NO_UPDATE_NOTIFIER=1是显式升级命令,会下载并校验最新 Release、替换当前程序,成功后还会尝试通过cyeam update同步 skills;需要保持固定版本时不要运行它,按上述步骤安装选定版本。npx skills add
关闭 CLI 统计和更新提示(业务本身的网络请求不受影响),可在当前 shell 设置:
bash
export CYEAM_CLI_NO_ANALYTICS=1
export CYEAM_CLI_NO_UPDATE_NOTIFIER=1- Installation download: Downloads only the selected archive from a pinned GitHub Release; GitHub may redirect to its asset CDN. After downloading, verify the pinned SHA-256 from this document before extracting the single file. The installation check disables analytics and the update notifier.
cyeam - Microsoft authorization: Run only when cloud features are needed. It signs in through the device-code flow at
cyeam loginand attempts to open the authorization page. It requestshttps://login.microsoftonline.com/consumers(read and write OneDrive files),Files.ReadWrite(read account information), andUser.Read(refresh tokens so you do not have to log in each time). File permissions cover OneDrive files under the authorized account and are not limited to this skill's folder; tokens are stored in the system keychain when possible and fall back tooffline_accesswhen unavailable.~/.cyeam/token.json - OneDrive roadbooks: reads the
listfolder and file contents through路书/to obtain titles; Microsoft file downloads may redirect to its storage domain.https://graph.microsoft.com/v1.0reads the itinerary from stdin, writes the generated JSON to that folder, and then shares it to cyeam.com.csv - Roadbook sharing and retrieval: reads the user-specified local JSON, while
shareuses the generated JSON to upload the itinerary tocsvand generate a link.https://www.cyeam.com/api/roadbook/sharequeries shared content atget. Thehttps://www.cyeam.com/api/roadbook/get?id=<ID>operations do not require Microsoft login; the generated link allows anyone who holds it to view the itinerary, and the upload should only be performed when the user requests sharing.share/get - Usage analytics: By default, command names, the CLI version, system information, and a random installation identifier are sent to . The service may infer the geographic region from the outgoing IP; command arguments, image content, and login credentials are not sent. The random identifier is stored in
https://us.i.posthog.comand can be disabled with~/.cyeam/analytics-idor--no-analytics.CYEAM_CLI_NO_ANALYTICS=1 - Update notifications: By default, GitHub is checked for the latest version at most once every 24 hours, and the result is cached in ; the notification itself does not replace the program. Set
~/.cyeam/update-state.jsonto disable it.CYEAM_CLI_NO_UPDATE_NOTIFIER=1is an explicit upgrade command that downloads and verifies the latest Release, replaces the current program, and then attempts to synchronize skills viacyeam update. Do not run it when keeping a pinned version; install the selected version using the steps above.npx skills add
To disable CLI analytics and update notifications (the business network requests themselves are unaffected), set the following in the current shell:
bash
export CYEAM_CLI_NO_ANALYTICS=1
export CYEAM_CLI_NO_UPDATE_NOTIFIER=1命令
Commands
cyeam roadbook list 从 OneDrive 列出所有路书
cyeam roadbook share <file.json> 分享本地路书 JSON,返回 id 和可分享 URL
cyeam roadbook get <id> 查看已分享路书详情
cyeam roadbook csv 从 stdin 读取 CSV 文本生成路书(需要 cyeam login)cyeam roadbook list 从 OneDrive 列出所有路书
cyeam roadbook share <file.json> 分享本地路书 JSON,返回 id 和可分享 URL
cyeam roadbook get <id> 查看已分享路书详情
cyeam roadbook csv 从 stdin 读取 CSV 文本生成路书(需要 cyeam login)输出
Output
list标题 修改时间 链接
────────────── ──────────── ─────────
京都三日游 2026-03-15 链接sharecsv{"id":"xxx","url":"https://www.cyeam.com/tool/roadbook?id=xxx"}list标题 修改时间 链接
────────────── ──────────── ─────────
京都三日游 2026-03-15 链接sharecsv{"id":"xxx","url":"https://www.cyeam.com/tool/roadbook?id=xxx"}⚠️ 执行流程(模型请严格按步骤执行)
⚠️ Execution Flow (Models must strictly follow these steps)
步骤 A:生成路书链接(用户说"生成路书" / 分享旅行计划时使用)
Step A: Generate a Roadbook Link (Use when the user says "Generate a roadbook" / shares a travel plan)
直接按以下步骤执行:
A1. 检查登录
bash
cyeam whoami如果输出包含 "Not logged in",先走步骤 C 登录,再继续。
A2. 整理行程信息
如果用户已提供完整行程(地点、天数、顺序),直接跳到 A3 整理 CSV。信息不足时只问缺失项。不要问多余问题。
A3. 整理 CSV
每行一个地点,5列逗号分隔:
名称,地址,类型,日期,备注- 类型:景点/餐饮/住宿/起点/其他
- 日期:Day1 / Day2... 或 5.1 / 5.2...
A4. 执行命令
用 管道传给 ,不要创建临时文件:
printfcyeam roadbook csvbash
printf "%s\n" \
"故宫博物院,北京市东城区景山前街4号,景点,Day1,上午" \
"国家博物馆,北京市东城区东长安街16号,景点,Day1,下午" \
| cyeam roadbook csv --title "北京行" --pretty命令会依次做三件事:
- 把路书 JSON 保存到 OneDrive 文件夹
路书 - 调 接口生成短分享链接
/api/roadbook/share - 返回 JSON 结果
A5. 返回结果
输出包含 字段,直接回复用户:
url路书已生成,点击链接查看完整行程地图:https://www.cyeam.com/tool/roadbook?id=xxx
A6. 检查输出
- 如果报 "Not logged in" 错误,走步骤 C 登录
- 如果报其他错误,把错误信息告诉用户
Directly follow the steps below:
A1. Check Login
bash
cyeam whoamiIf the output contains "Not logged in", first follow Step C to log in, then continue.
A2. Organize the Itinerary Information
If the user has provided a complete itinerary (locations, number of days, and order), proceed directly to A3 to prepare the CSV. If information is missing, ask only for the missing items. Do not ask unnecessary questions.
A3. Prepare the CSV
One location per row, with five comma-separated columns:
Name,Address,Type,Date,Notes- Type: Attraction / Dining / Accommodation / Starting point / Other
- Date: Day1 / Day2... or 5.1 / 5.2...
A4. Run the Command
Pipe the data to using ; do not create a temporary file:
cyeam roadbook csvprintfbash
printf "%s\n" \
"故宫博物院,北京市东城区景山前街4号,景点,Day1,上午" \
"国家博物馆,北京市东城区东长安街16号,景点,Day1,下午" \
| cyeam roadbook csv --title "北京行" --prettyThe command performs three actions in sequence:
- Saves the roadbook JSON to the OneDrive folder
路书 - Calls the endpoint to generate a short share link
/api/roadbook/share - Returns the JSON result
A5. Return the Result
If the output contains the field, reply to the user directly:
urlThe roadbook has been generated. Click the link to view the complete itinerary map: https://www.cyeam.com/tool/roadbook?id=xxx
A6. Check the Output
- If the "Not logged in" error appears, follow Step C to log in
- If any other error occurs, report the error message to the user
步骤 B:列出路书(用户说"列出路书" / "我的路书")
Step B: List Roadbooks (Use when the user says "List roadbooks" / "My roadbooks")
B1. 检查登录状态
bash
cyeam whoami如果输出包含 "Not logged in",走步骤 C 让用户先登录。
B2. 列出路书
bash
cyeam roadbook list --prettyB3. 返回给用户
以表格形式展示标题、修改时间。
B1. Check Login Status
bash
cyeam whoamiIf the output contains "Not logged in", follow Step C so the user can log in first.
B2. List Roadbooks
bash
cyeam roadbook list --prettyB3. Return the Results to the User
Display the title and modification time in a table.
步骤 C:登录(用户说"登录"或在 B1 中检测到未登录)
Step C: Log In (Use when the user says "Log in" or when B1 detects that the user is not logged in)
C1. 执行登录
bash
cyeam login命令会打印授权链接和验证码:有桌面环境时自动尝试打开浏览器;在远程服务器(SSH 等无桌面环境)浏览器会静默失败,按打印的链接和验证码在任意浏览器完成授权即可,CLI 自动获取 token。
C2. 告知用户
告诉用户:
C3. 运行命令并等待
运行命令后,CLI 会等待用户在浏览器完成授权。等待命令输出结果。
C4. 验证登录
bash
cyeam whoami确认显示 "logged in" 状态。
C1. Run the Login Command
bash
cyeam loginThe command prints an authorization URL and verification code. In a desktop environment, it automatically attempts to open the browser. On a remote server, such as one accessed through SSH without a desktop environment, the browser launch will fail silently; use the printed URL and code to complete authorization in any browser, and the CLI will automatically obtain the token.
C2. Tell the User
Tell the user:
Please visit the displayed link (https://microsoft.com/devicelogin) in your browser and enter the verification code to complete login. Return here after logging in.
C3. Run the Command and Wait
After running the command, the CLI waits for the user to complete authorization in the browser. Wait for the command output.
C4. Verify Login
bash
cyeam whoamiConfirm that it displays a "logged in" status.
步骤 D:查看路书详情(用户说"查看某个路书")
Step D: View Roadbook Details (Use when the user says "View a specific roadbook")
直接执行:
bash
cyeam roadbook get <id> --pretty返回 JSON 格式的路书数据。把内容展示给用户。
Run the following directly:
bash
cyeam roadbook get <id> --prettyIt returns the roadbook data in JSON format. Display the content to the user.
注意事项
Notes
- 、
csv需要list(Microsoft OneDrive 登录)cyeam login - 、
get不需要登录,通过 cyeam.com API 操作share - 命令流程:登录 → 解析 CSV → 存 OneDrive
csv文件夹 → 调 share API → 返回短链接路书 - 路书数据存储在 OneDrive 文件夹 + Redis 分享快照(30天有效)
路书
- and
csvrequirelist(Microsoft OneDrive login)cyeam login - and
getdo not require login and operate through the cyeam.com APIshare - The command flow is: Log in → Parse CSV → Save to the OneDrive
csvfolder → Call the share API → Return a short link路书 - Roadbook data is stored in the OneDrive folder + a Redis sharing snapshot (valid for 30 days)
路书