Installing KUAL and MRPI
You will need to install KUAL (Kindle Unified Application Launcher) and MRPI (MobileRead Package Installer) to run homebrew on your Kindle.
Download MRPI
This version of MRPI is provided by Marek
MRPI (for legacy devices - pre-K5)You may need to free up 220 MB of space to install both MRPI and KUAL without issues
Download the correct KUAL version
The above version of KUAL is provided by Hackerdude
KUAL - For legacy devices PEKI - Follow this guide instead if Coplate is broken
Extracting MRPI
Extract the contents of the MRPI tar file you downloaded, and copy the extensions and mrpackages folders to your Kindle

Extracting/Copying KUAL
If your device is older than the K5 (Kindle Touch), you only need to copy the KUAL-KDK-1.0.azw2 file to your Kindle's documents folder, you can skip the next steps
If you downloaded KUAL for legacy devices, extract the .tar.xz to get the Update_KUALBooklet_*_install.bin file
Copy the Update_KUALBooklet_*_install.bin file to your Kindle's mrpackages folder

Eject and unplug your Kindle

Running MRPI
On your Kindle, type ;log mrpi into the search bar and hit enter

Done
Now wait whilst KUAL is installed, your Kindle screen turns white and shows some icons, after a while you will be returned to your library and see a KUAL book appear in it.
If you see a "Application Error" dialog, you can close it without worry - this is normal behaviour on some modern Kindles

If you face any issues, please read the troubleshooting section.
Troubleshooting
- The installation or functionality of KUAL and MRPI may fail if there is not enough free space on your Kindle. If you are using the “fill storage” method to block updates, make sure your Kindle has
220 MBof available space before installing KUAL and MRPI - Verify that all folders and files are in the correct locations on your Kindle.
- Try restarting the Kindle if the
;log mrpicommand is not responding - Ensure that the file does not have any special characters such as brackets in it, some browsers may rename files adding
(1)or other additional suffixes to the file name and these should be removed before copying to the Kindle