# Technical Documentation: legendary-gl/legendary

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/legendary-gl/legendary)

### Overview (`README.md`)

# Legendary
## A free and open-source Epic Games Launcher alternative


[](https://legendary.gl/discord) [](https://twitter.com/legendary_gl)

Legendary is an open-source game launcher that can download and install games from the Epic Games platform on Linux, macOS, and Windows.
Its name as a tongue-in-cheek play on tiers of [item rarity in many MMORPGs](https://wow.gamepedia.com/Quality).

Please read the the [config file](#config-file) and [cli usage](#usage) sections before creating an issue to avoid invalid reports.

If you run into any issues [ask for help on our Discord](https://legendary.gl/discord) or [create an issue on GitHub](https://github.com/derrod/legendary/issues/new/choose) so we can fix it!

Finally, if you wish to support the project, please consider [buying me a coffee on Ko-Fi](https://ko-fi.com/derrod).
Alternatively, if you've been considering picking up a copy of CrossOver you can use my [affiliate link](https://www.codeweavers.com/?ad=892) and discount code `LEGENDARY15` in their store.

**Note:** Legendary is currently a CLI (command-line interface) application without a graphical user interface,
it has to be run from a terminal (e.g. PowerShell)

**Features:**
 - Authenticating with Epic's service
 - Downloading and installing your games and their DLC
 - Delta patching/updating of installed games
 - Launching games with online authentication (for multiplayer/DRM)
 - Syncing cloud saves (compatible with EGL)
 - Running games with WINE on Linux/macOS
 - Importing/Exporting installed games from/to the Epic Games Launcher (unsupported for macOS version of EGL)

**Planned:**
 - Simple GUI for managing/launching games
 - Lots and lots of bug fixes, optimizations, and refactoring...

## Requirements

- Linux, Windows (8.1+), or macOS (12.0+)
  + 32-bit operating systems are not supported
- python 3.10+ (64-bit)
  + (Windows) `pythonnet` is not yet compatible with 3.14+
- PyPI packages:
  + `requests`
  + (optional) `pywebview` for webview-based login
  + (optional) `uv` for setup/building

**Note:** Running Windows applications on Linux or macOS requires [Wine](https://www.winehq.org/).

## How to run/install

### Package Manager (Linux)

Several distros already have packages available, check out the [Available Linux Packages](https://github.com/derrod/legendary/wiki/Available-Linux-Packages) wiki page for details.

Currently this includes
[Arch](https://github.com/derrod/legendary/wiki/Available-Linux-Packages#arch-aur),
[Fedora](https://github.com/derrod/legendary/wiki/Available-Linux-Packages#fedora),
[openSUSE](https://github.com/derrod/legendary/wiki/Available-Linux-Packages#opensuse), and
[Gentoo](https://github.com/derrod/legendary/wiki/Available-Linux-Packages#gentoo)
but more will be available in the future.

Note that since packages are maintained by third parties it may take a bit for them to be updated to the latest version.
If you always want to have the latest features and fixes available then using the PyPI distribution is recommended.

### Prebuilt Standalone Binary (Windows, macOS, and Linux)

Download the `legendary` or `legendary.exe` binary from [the latest release](https://github.com/derrod/legendary/releases/latest)
and move it to somewhere in your `$PATH`/`%PATH%`. Don't forget to `chmod +x` it on Linux/macOS.

The Windows .exe and Linux/macOS executable were created with PyInstaller and will run standalone even without python being installed.
Note that on Linux glibc >= 2.25 is required, so older distributions such as Ubuntu 16.04 or Debian stretch will not work.

### Python Package (any)

#### Prerequisites

To prevent problems with permissions during installation, please upgrade your `pip` by running `python -m pip install -U pip --user`. 

> **Tip:** You may need to replace `python` in the above command with `python3` on Linux/macOS, or `py -3` on Windows.

#### Installation from PyPI (recommended)

Legendary is available on [PyPI](https://pypi.org/project/legendary-gl/), to install simply run:

Note: `uv pip` may be used as a substitute to `pip` in the below commands

```bash
pip install legendary-gl
```

Optionally if logging in via an embedded web view is desired also run
```bash
pip install legendary-gl[webview]
```
On Linux this may also require installing a supported web engine and its python bindings.  
Ubunutu example:
```bash
sudo apt install python3-gi-cairo
pip install legendary-gl[webview]
```

Alternatively `pip install legendary-gl[webview_gtk]` or `pip install pywebview[gtk]` will work
but may require manually installing dependencies needed to build `PyGObject`.

**Note:** Using pywebview's Qt engine may not work correctly. Using pywebview is currently unsupported on macOS.

#### Manually from the repo

- Install uv
- Clone the git repository and cd into it
- Run `uv sync --no-editable`

#### Ubuntu 20.04 example

`uv` has various methods of installation. See <https://docs.astral.sh/uv/getting-started/installation/> and choose one.

````bash
git clone https://github.com/derrod/legendary.git
cd legendary
uv sync --no-editable
````

If the `legendary` executable is not available after installation, you may need to configure your `PATH` correctly. You can do this by running the command: 

```bash
echo 'export PATH=$PATH:~/.local/bin' >> ~/.profile && source ~/.profile
```

### Directly from the repo (for dev/testing)

- Install uv
- cd into the repository
- Run `uv sync`

This installs `legendary` in "editable" mode - any changes to the source code will take effect next time the `legendary` executable runs.

## Quickstart

**Tip:** When using PowerShell with the standalone executable, you may need to replace `legendary` with `.\legendary` in the commands below.

To log in:
````
legendary auth
````
When using the prebuilt Windows executables of version 0.20.14 or higher this should open a new window with the Epic Login.

Otherwise, authentication is a little finicky since we have to go through the Epic website and manually copy a code.
The login page should open in your browser and after logging in you should be presented with a JSON response that contains a code ("authorizationCode"), just copy the code into the terminal and hit enter.

Alternatively you can use the `--import` flag to import the authentication from the Epic Games Launcher (manually specifying the used WINE prefix may be required on Linux).
Note that this will log you out of the Epic Launcher.

Listing your games
````
legendary list
````
This will fetch a list of games available on your account, the first time may take a while depending on how many games you have.

Installing a game
````
legendary install Anemone
````
**Note:** the name used here is generally the game's "app name" as seen in the games list rather than its title, but as of 0.20.12 legendary will try to match game names or abbreviations thereof as well. In this case `legendary install world of goo` or `legendary install wog` would also work!

List installed games and check for updates
````
legendary list-installed --check-updates
````

Launch (run) a game with online authentication
````
legendary launch "world of goo"
````
**Tip:** most games will run fine offline (`--offline`), and thus won't require launching through legendary for online authentication.
You can run `legendary launch <App Name> --offline --dry-run` to get a command line that will launch the game with all parameters that would be used by the Epic Launcher.
These can then be entered into any other game launcher (e.g. Lutris/Steam) if the game requires them.

Importing a previously installed game
````
legendary import Anemone /mnt/games/Epic/WorldOfGoo
````
**Note:** Importing will require a full verification so Legendary can correctly update the game later.  
**Note 2:** In order to use an alias here you may have to put it into quotes if if contains more than one word, e.g. `legendary import-game "world of goo" /mnt/games/Epic/WorldOfGoo`.

Sync savegames with the Epic Cloud
````
legendary sync-saves
````
**Note:** When this command is run the first time after a supported game has been installed it will ask you to confirm or provide the path to where the savegame is located.

Automatically sync all games with the Epic Games Launcher
````
legendary -y egl-sync
````

## Usage

```
/* Detailed source-code truncated for AI context efficiency. */
````


## Config file

Legendary supports some options as well as game specific configuration in `~/.config/legendary/config.ini`:
```
/* Detailed source-code truncated for AI context efficiency. */
````

---

--- METRICS ---
- Files Extracted: 1
- Estimated Token Budget: ~2148 tokens
- Canonical Reference: https://codewiki.google/github.com/legendary-gl/legendary
