To this day, balafetch registers 7 exit codes.
You might refer to these if you plan to write a script with balafetch or when debugging balafetch.
Note
The balafetch CLI V0.4.0 and above use a different set of exit codes that are not compatible with the previous versions. If you have scripts that rely on the old exit codes, make sure to update them according to the new exit codes listed in this documentation.
| Code | Type | Reason | Category |
|---|---|---|---|
| 50 | Setup Failure | Happens when balafetch can't access the balafetch.log file (think of it as startup unsuccessful) | Fatal |
| 0 | Success | Happens when balafetch successfully completes (no Fatal/Fallible errors encountered) | Success |
| 1 | Internet Related Failures | Any internet-related error such as no internet connection, temporary failure in DNS resolution, or timeout | Failable |
| 2 | Command Not Found, Invalid Usage | Happens when there's no command named 'fastfetch' in your system | Fatal |
| 3 | Unexpected API Response | Happens when the Balatro API responds to a request in a format that balafetch doesn't know how to handle | Failable |
| 4 | File Related Failures | Happens when the OS refuses to grant balafetch file access. This is different from Error 50 because it only triggers when balafetch tries to download a card image and can't access your temporary folder | Failable |
| 5 | Update Failure | Happens when the --update flag fails to download, verify, or install a new version of balafetch from GitHub |
Failable |
- Make sure that the
balafetch.logfile andbalafetch/folder have the right permissions balafetch/needs read, write, and execute permissions for the userbalafetch/balafetch.logneeds at least read and write permissions for the user
Linux/macOS/FreeBSD:
chmod u=rwx ~/balafetch/
chmod u=rw ~/balafetch/balafetch.logWhy would you fix something that works? 🎉
- Check your internet connection
- Retry later
- Verify DNS is working properly
- Install the fastfetch binary on your system/OS.
- Make sure the binary is named
fastfetchand is in your system's PATH. You can verify this by runningwhich fastfetch(Linux/macOS/FreeBSD) orwhere fastfetch(Windows) in your terminal. - Make sure you're using the correct command syntax. You can refer to the cli documentation for the correct usage.
Open an issue on the official balafetch repository. This is a task for the developers.
- Make sure your temporary folder has write permissions for the user
- Rare but possible: not enough storage space for balafetch to download the image. The images are very lightweight, but in such cases, try to free up some space or add more storage
Check temporary folder permissions:
Linux/macOS/FreeBSD:
# Check /tmp permissions
ls -ld /tmpWindows:
# Check %TEMP% permissions
icacls %TEMP%- Check your internet connection and try again
- Verify you have write permissions to the balafetch binary location
- Linux/macOS: typically
/usr/local/bin/balafetchor~/.local/bin/balafetch - Windows: typically
C:\Windows\System32\balafetch.exeor your custom installation path
- Linux/macOS: typically
- Ensure you're running a version with the
--updatefeature (V0.8.0or later) - Check balafetch logs in
~/balafetch/balafetch.logfor detailed error information - If the issue persists, open an issue on the official balafetch repository with your logs
Installation options:
- Package manager (recommended):
apt install fastfetch,brew install fastfetch,winget install fastfetch, etc. - Manual download from fastfetch releases