If you use minecrafts "open to lan" feature, this tool automatically determines your public IP address as well as the port and lays it into the system clipboard so that you can easily share the address with your friends.
Run pubip and your ipv4 will magically appear in your clipboard
pubip uses
reqwestnetstatrust-clipboard- external service: icanhazip.com
-
Choose a location, for example
$ cd /opt -
Clone the repo
$ git clone https://github.com/okiwi6/pubip-cli.git -
Enter the repo
$ cd pubip-cli -
Build the tool using cargo (if you don't have the rust toolchain installed, do so first)
$ cargo build --release -
If you want to, create a symlink so you can use the tool from the command line
$ sudo ln -s /opt/pubip-cli/target/release/pubip /usr/local/bin/