Amazon's Prime Gaming service has been dishing out free-to-keep games to its subscribers for some time now, but accessing these games required running the Amazon Gaming client through Wine.
The Nile Project provides a native interface for your Prime Gaming library by interacting with the Amazon API to download and play your games from the command line. A nice advantage to using Nile is that you can change your Wine environment on a per-game basis, rather than installing a copy of Amazon Games for each. I spoke with project developer Linguin, who also works on Heroic Launcher, and he plans to incorporate Nile into Heroic in the near future, so if you aren't keen to use the command line you can consider this a quick sneak peek. The developer also mentioned it's not ready for Steam Deck yet and while possible it's not recommended, so this is for desktop Linux for now.
The project is still in early days, and as such the documentation is a bit sparse. Let's take a look at using Nile to access some of those Bezos freebies. Most of this information can be found in the project's README.
Step 1: Get Nile and dependencies
Nile is not (yet) packaged for distributions, so grab it from the GitHub repository using git:
git clone https://github.com/imLinguin/nile
You will also need the project dependencies, which you can install system-wide for Arch Linux like so:
pacman -Syu pyqt5 python-pycryptodome python-zstandard python-requests python-protobuf
or or for Ubuntu like so:
sudo apt install python3-pyqt5 python3-pycryptodome python3-requests python3-zstd
If you are on a different distribution you could instead install the required python packages system-wide with pip, although personally I wouldn't recommend it. A better option is to make a virtual environment, then activate the environment before running Nile. To do this, run:
python3 -m venv env && source ./env/bin/activate && pip install -r requirements.txtNote that the virtual environment will only be active for the terminal you ran
source ./env/bin/activate on, so you will need to re-run it for new terminals before running Nile.
Step 2: Download your Games
In the Nile directory you downloaded from GitHub, run
./bin/nile auth --login, which will pop open a window with the Amazon login. Once you have logged in, you can list your games with
./bin/nile library list.
Choose the game you would like to install and copy the associated ID string, then run
./bin/nile install , replacing with the string you copied. The download will start - there is no indication of download progress so you'll just have to be patient. You can verify that the game has been installed with
./bin/nile library list.
Step 3: Play
Once completed, you can launch the game using the default system Wine prefix with
./bin/nile launch . A nice feature is that you can instead use one of your pre-existing Wine bottles from Bottles.
For example, if you want to run one of your Amazon games with GE Proton you could create a bottle using the Bottles GUI or from the command line
bottles-cli new --bottle-name ge_proton --environment gaming --runner GE-Proton7-38
Then use that bottle to play your game
./bin/nile launch --bottle ge_proton
While it's still early days for this project, I think it's great how easy it's getting to access games on platforms besides Steam, and the Nile project moves us that little bit farther into the glorious Linux gaming future.