A super simple tool to get local or public IP address.
$ ip -h
Usage of ip:
-l, --local=false: Print local IP address
-p, --public=false: Print public IP address
Copy public IP into clipboard (on Mac):
$ ip -p | pbcopy
- Download and install Go
- Clone this repo
- Run
go build ip.go
in the cloned directory - Move binary to somewhere f.e.