Community程式設計與開發github.com

Epic Games CLI(Legendary)

一套適用於 AI 驅動開發工具的有用代理技能集合

Epic Games CLI(Legendary) 是什麼?

此技能提供 Epic Games CLI(Legendary)的完整使用指南,Legendary 是一款免費且開源的命令列工具,可取代 Epic Games Launcher。對於希望從終端機管理 Epic Games 遊戲庫的開發者與 AI 代理使用者來說非常實用,支援安裝、啟動遊戲、同步雲端存檔以及瀏覽遊戲庫。技能內容涵蓋安裝步驟(透過 PyPI 或原始碼)、初始設定(包括瀏覽器式與匯入式驗證)、常用命令(如 list、install、launch、sync-saves)及進階功能(跨平台遊戲、選擇性下載、設定檔配置)。也提供故障排除指南(驗證問題、遊戲無法啟動、下載緩慢)與限制說明(無法購買遊戲、無法領取免費遊戲),並推薦 GUI 替代工具(Heroic Games Launcher、Lutris)。支援 Linux、macOS 與 Windows 平台,配置儲存於 ~/.config/legendary/config.ini 或 %APPDATA%\legendary\config.ini。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add Carton/agent-skills

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

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

基於瀏覽器的驗證流程如下:

  1. 開啟您的預設瀏覽器並導向 Epic Games 登入頁面
  2. 提示您使用 Epic 憑證登入
  3. 顯示驗證碼
  4. 當您返回終端機時,自動儲存工作階段

驗證

確認您已登入:

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

遊戲無法啟動

  1. 檢查遊戲是否需要線上驗證:

    legendary launch <app-name>
    
  2. 如果 DRM 允許,嘗試離線模式:

    legendary launch <app-name> --offline
    
  3. 使用 --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

資源

限制

  • 無法購買遊戲(僅能下載已擁有的遊戲)
  • 無法領取免費遊戲(必須使用網頁商店或 EGL)
  • 不支援 macOS EGL 同步(EGL 限制)
  • 需要使用終端機(無圖形介面)

替代工具

如需圖形介面體驗:

相關技能