Roadbook Sharing
User Intent → Execution Path Quick Reference
| 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
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: Verify and Install to the User Directory
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.
bash
(
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:
bash
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
- 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.
- Microsoft authorization: Run only when cloud features are needed. It signs in through the device-code flow at
https://login.microsoftonline.com/consumers
and attempts to open the authorization page. It requests (read and write OneDrive files), (read account information), and (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 to when unavailable.
- OneDrive roadbooks: reads the folder and file contents through
https://graph.microsoft.com/v1.0
to obtain titles; Microsoft file downloads may redirect to its storage domain. reads the itinerary from stdin, writes the generated JSON to that folder, and then shares it to cyeam.com.
- Roadbook sharing and retrieval: reads the user-specified local JSON, while uses the generated JSON to upload the itinerary to
https://www.cyeam.com/api/roadbook/share
and generate a link. queries shared content at https://www.cyeam.com/api/roadbook/get?id=<ID>
. The 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.
- 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 and can be disabled with or .
- Update notifications: By default, GitHub is checked for the latest version at most once every 24 hours, and the result is cached in
~/.cyeam/update-state.json
; the notification itself does not replace the program. Set CYEAM_CLI_NO_UPDATE_NOTIFIER=1
to disable it. is an explicit upgrade command that downloads and verifies the latest Release, replaces the current program, and then attempts to synchronize skills via . Do not run it when keeping a pinned version; install the selected version using the steps above.
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)
Output
标题 修改时间 链接
────────────── ──────────── ─────────
京都三日游 2026-03-15 链接
and
return JSON:
{"id":"xxx","url":"https://www.cyeam.com/tool/roadbook?id=xxx"}
⚠️ Execution Flow (Models must strictly follow these steps)
Step A: Generate a Roadbook Link (Use when the user says "Generate a roadbook" / shares a travel plan)
Directly follow the steps below:
A1. Check Login
If 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:
bash
printf "%s\n" \
"故宫博物院,北京市东城区景山前街4号,景点,Day1,上午" \
"国家博物馆,北京市东城区东长安街16号,景点,Day1,下午" \
| cyeam roadbook csv --title "北京行" --pretty
The command performs three actions in sequence:
- Saves the roadbook JSON to the OneDrive folder
- Calls the endpoint to generate a short share link
- Returns the JSON result
A5. Return the Result
If the output contains the
field, reply to the user directly:
The 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
Step B: List Roadbooks (Use when the user says "List roadbooks" / "My roadbooks")
B1. Check Login Status
If the output contains "Not logged in", follow Step C so the user can log in first.
B2. List Roadbooks
bash
cyeam roadbook list --pretty
B3. Return the Results to the User
Display the title and modification time in a table.
Step C: Log In (Use when the user says "Log in" or when B1 detects that the user is not logged in)
C1. Run the Login Command
The 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
Confirm that it displays a "logged in" status.
Step D: View Roadbook Details (Use when the user says "View a specific roadbook")
Run the following directly:
bash
cyeam roadbook get <id> --pretty
It returns the roadbook data in JSON format. Display the content to the user.
Notes
- and require (Microsoft OneDrive login)
- and do not require login and operate through the cyeam.com API
- The command flow is: Log in → Parse CSV → Save to the OneDrive folder → Call the share API → Return a short link
- Roadbook data is stored in the OneDrive folder + a Redis sharing snapshot (valid for 30 days)