๐ฅ rFortune
rFortune is a modern, cross-platform reimplementation of the classic Unix fortune program, written in Rust.
It displays a random quote or witty phrase from a plain text file, making it perfect for terminal startup messages, scripting, or just a bit of inspiration.
๐ Features
- โ Cross-platform: works on Linux, Windows, macOS Intel and Apple Silicon
- โก Fast and lightweight (native Rust binary)
- ๐ Simple input format: one or more lines per fortune, separated by
% - ๐น UTF-8 support for multilingual content
- ๐งฉ Easily extensible
- โจ Supports
--file,--init,--version, and--helpoptions
๐ฆ Installation
๐บ Homebrew Tap for rFortune
This is the official Homebrew tap for rFortune, a fast and cross-platform clone of the classic UNIX fortune command, written in Rust.
Also, available on crates.io for installation via cargo install.
To install rfortune using Homebrew:
Then simply run:
Youโll see a randomly selected quote from a classic-style fortune file.
๐ฅ๏ธ Supported Platforms
This tap provides precompiled binaries for:
- โ
macOS (Intel -
x86_64) - โ
macOS (Apple Silicon -
arm64) - โ
Linux (
x86_64) via Homebrew on Linux
The correct binary is automatically chosen based on your system architecture.
๐ฅ Download
Precompiled binaries are available in the Releases section.
| Platform | Architecture | File |
|---|---|---|
| Windows | x86_64 | rfortune-<version>-x86_64-pc-windows-msvc.zip |
| Linux | x86_64 | rfortune-<version>-unknown-linux-gnu.tar.gz |
| macOS Intel Architecture | x86_64 | rfortune-<version>-x86_64-apple-darwin.tar.gz |
| macOS Apple Silicon | aarch64 | rfortune-<version>-aarch64-apple-darwin.tar.gz |
๐ GPG Signature
All release archives are cryptographically signed with GPG.
.sigfiles contain the ASCII-armored detached signature for the corresponding archive.- You can verify the archive with:
๐ Public Key
The releases are signed with the following GPG key:
- Key ID: 423FABCE0A1921FB
- Fingerprint: 8118 9716 9512 2A32 1F3D C04C 423F ABCE 0A19 21FB
- Download: https://github.com/umpire274.gpg
To import the key from a keyserver:
Or from OpenPGP server:
Then verify the fingerprint:
๐ Initialization (optional)
To create the default fortune directory and a starter rfortunes.dat file:
- On Linux/macOS: creates
/usr/local/share/rfortune/rfortunes.dat - On Windows: creates
%APPDATA%\rfortune\rfortunes.dat
๐ Usage
๐งฉ Options
| Option | Description |
|---|---|
-f, --file |
Use a custom file of fortunes |
--init |
Create the default directory and test file |
-V, --version |
Show version |
-h, --help |
Show help message |
If no file is specified, the program defaults to platform-specific location.
๐งช Example
๐ File Format
Each fortune must be on one or more lines separated by '%', like so:
%
The best way to get a good idea is to get a lot of ideas.
%
Do or do not. There is no try.
%
To iterate is human, to recurse divine.
%
๐ License
This project is licensed under the MIT License.
ยฉ 2025 Alessandro Maestri
๐ก Contributing
Pull requests are welcome! If youโd like to add support for more languages, improve performance, or fix bugs, feel free to fork the repo and contribute.
๐ Acknowledgments
Inspired by the classic BSD fortune program. Built with โค๏ธ in Rust.