Epic Games CLI(Legendary) 是做什麼的?
Legendary 是 Epic Games Launcher 的一款免費且開源命令列替代方案。當使用者想要從終端機管理他們的 Epic Games 遊戲庫時—安裝遊戲、啟動作品、同步雲端存檔或瀏覽 Epic 收藏集,請使用此技能。
安裝
先決條件:
- Python 3.9+(64 位元)
- pip 套件管理員
透過 PyPI 安裝(建議):
pip install legendary-gl
如需網頁瀏覽器登入支援:
pip install legendary-gl[webview]
替代方案:從原始碼安裝
git clone https://github.com/derrod/legendary.git
cd legendary
pip install .
初始設定
驗證
首先,使用您的 Epic Games 帳號進行驗證:
# 標準驗證(開啟瀏覽器進行登入)
legendary auth
# 從 Epic Games Launcher 匯入現有工作階段(會將您從 EGL 登出)
legendary auth --import
基於瀏覽器的驗證流程如下:
- 開啟您的預設瀏覽器並導向 Epic Games 登入頁面
- 提示您使用 Epic 憑證登入
- 顯示驗證碼
- 當您返回終端機時,自動儲存工作階段
驗證
確認您已登入:
legendary whoami
設定檔儲存於 ~/.config/legendary/config.ini(Linux/macOS)或 %APPDATA%\legendary\config.ini(Windows)。
命令概覽
| 命令 | 說明 |
|---|---|
legendary auth | 與 Epic Games 進行驗證 |
legendary list | 列出您遊戲庫中的所有遊戲 |
legendary list-installed | 列出已安裝的遊戲並檢查更新 |
legendary install <app> | 安裝/下載遊戲 |
legendary launch <app> | 啟動/遊玩遊戲 |
legendary uninstall <app> | 解除安裝遊戲 |
legendary sync-saves | 同步雲端存檔 |
legendary egl-sync | 與 Epic Games Launcher 同步 |
常見使用案例
瀏覽您的遊戲庫
# 列出 Epic Games 遊戲庫中的所有遊戲
legendary list
# 顯示詳細資訊
legendary list --csv
# 強制重新整理後設資料(如果清單似乎過時,此功能很有用)
legendary list --force-refresh
# 僅列出 Unreal Engine 內容
legendary list --include-ue
管理已安裝的遊戲
# 列出已安裝的遊戲
legendary list-installed
# 檢查已安裝遊戲的更新
legendary list-installed --check-updates
# 更新特定遊戲
legendary update <app-name>
# 更新所有已安裝的遊戲
legendary update --skip-dlc
安裝遊戲
# 安裝遊戲(使用 list 命令中的應用程式名稱)
legendary install Anemone
# 安裝到自訂目錄
legendary install <app-name> --base-path /path/to/games
# 使用特定平台安裝
legendary install <app-name> --platform Windows
# 安裝遊戲與 DLC
legendary install <app-name> --include-dlc
# 不安裝選擇性下載(取得所有元件)
legendary install <app-name> --disable-sdl
# 靜默安裝(無提示)
legendary install <app-name> -y
啟動遊戲
# 啟動遊戲
legendary launch "world of goo"
# 以離線模式啟動
legendary launch <app-name> --offline
# 顯示啟動命令但不執行
legendary launch <app-name> --dry-run
# 使用自訂參數啟動
legendary launch <app-name> --override- exe "path/to/exe" --working-dir "path/to/dir"
雲端存檔管理
# 同步所有雲端存檔(上傳與下載)
legendary sync-saves
# 僅下載存檔(不上傳)
legendary sync-saves --skip-upload
# 即使本機檔案較新,也強制下載
legendary sync-saves --force-download
# 清理舊的雲端存檔
legendary clean-saves
遊戲資訊
# 取得遊戲的詳細資訊
legendary info <app-name>
# 列出遊戲清單中的檔案
legendary list-files <app-name>
# 列出遊戲可用的雲端存檔
legendary list-saves <app-name>
匯入現有遊戲
如果您有透過 Epic Games Launcher 安裝的遊戲:
# 從 Epic Games Launcher 匯入遊戲
legendary import-game <app-name> "/path/to/epic/install/dir"
# 一次性與 Epic Games Launcher 同步
legendary egl-sync --one-shot
# 持續與 EGL 同步(macOS 不支援)
legendary egl-sync
便利別名
在 ~/.config/legendary/config.ini 中建立別名:
[Legendary.aliases]
; Alias = App Name
HITMAN 3 = Eider
gtav = 9d2d0eb64d5c44529cece33fe2a46482
然後在命令中使用別名:
legendary launch HITMAN 3
legendary install gtav
命令參考
legendary list [options]
| 選項 | 說明 |
|---|---|
--platform <p> | 依平台篩選(Windows/Mac) |
--include-ue | 包含 Unreal Engine 內容 |
-T | 停用終端機格式化 |
--csv | 以 CSV 格式輸出 |
--tsv | 以 TSV 格式輸出 |
--json | 以 JSON 格式輸出 |
--force-refresh | 強制重新整理所有後設資料 |
legendary install <app-name> [options]
| 選項 | 說明 |
|---|---|
--base-path <path> | 自訂安裝目錄 |
--platform <p> | 特定平台 |
--include-dlc | 安裝 DLC |
--disable-sdl | 停用選擇性下載 |
--reset-sdl | 重設選擇性下載選項 |
--skip-dl | 跳過下載,僅安裝 |
-y | 自動確認所有提示 |
--update | 如果已安裝則更新 |
legendary launch <app-name> [options]
| 選項 | 說明 |
|---|---|
--offline | 以離線模式啟動 |
--dry-run | 顯示命令但不執行 |
--json | 將啟動資訊輸出為 JSON |
--override- exe <path> | 自訂可執行檔 |
--working-dir <path> | 自訂工作目錄 |
legendary sync-saves [options]
| 選項 | 說明 |
|---|---|
--skip-upload | 僅下載存檔 |
--force-download | 強制下載並覆寫本機檔案 |
--force-upload | 強制上傳並覆寫遠端檔案 |
進階功能
跨平台遊戲
# 透過 Proton/WINE 在 Linux 上執行 Windows 遊戲
legendary install <app-name> --platform Windows
legendary launch <app-name> --wine
# 透過 CrossOver 執行(macOS)
legendary launch <app-name> --crossover-bottle <bottle-name>
選擇性下載
Legendary 支援選擇性下載以節省磁碟空間:
# 啟用選擇性下載進行安裝
legendary install <app-name>
# 重設 SDL 選擇
legendary install <app-name> --reset-sdl
# 停用 SDL(取得所有元件)
legendary install <app-name> --disable-sdl
配置
編輯 ~/.config/legendary/config.ini:
[Legendary]
max_memory = 2048 ; 最大共享記憶體(MB)
max_workers = 8 ; 最大工作者處理程序數
install_dir = ~/Games ; 預設安裝目錄
故障排除
驗證問題
如果驗證失敗:
# 清除現有工作階段
legendary auth --delete
# 重新驗證
legendary auth
遊戲無法啟動
-
檢查遊戲是否需要線上驗證:
legendary launch <app-name> -
如果 DRM 允許,嘗試離線模式:
legendary launch <app-name> --offline -
使用
--dry-run查看啟動命令:legendary launch <app-name> --dry-run
下載速度慢
在配置中調整工作者數量:
[Legendary]
max_workers = 16
max_memory = 4096
從 Epic Games Launcher 匯入
macOS 版本的 EGL 不支援匯入。請使用:
# 在 Windows/Linux 上
legendary egl-sync
資源
- 官方 GitHub:https://github.com/derrod/legendary
- 文件:https://github.com/derrod/legendary#readme
- PyPI 套件:https://pypi.org/project/legendary-gl/
- 授權:GPL-3.0
限制
- 無法購買遊戲(僅能下載已擁有的遊戲)
- 無法領取免費遊戲(必須使用網頁商店或 EGL)
- 不支援 macOS EGL 同步(EGL 限制)
- 需要使用終端機(無圖形介面)
替代工具
如需圖形介面體驗:
- Heroic Games Launcher:https://heroicgameslauncher.com/(Legendary 的圖形介面前端)
- Lutris:https://lutris.net/(Linux 遊戲管理器,整合 Legendary)