https://github.com/twin/gip
Get your public IP from the command line.
https://github.com/twin/gip
executable go golang ip
Last synced: 3 months ago
JSON representation
Get your public IP from the command line.
- Host: GitHub
- URL: https://github.com/twin/gip
- Owner: TwiN
- Created: 2018-12-23T03:00:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-26T19:27:41.000Z (over 5 years ago)
- Last Synced: 2026-02-12T07:06:17.300Z (4 months ago)
- Topics: executable, go, golang, ip
- Language: Go
- Size: 1.98 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gip
Get your public IP from the command line.
From the same collection as [show-my-ip](https://github.com/TwinProduction/show-my-ip), a Firefox extension that does just that.

## Usage
Type the following in a command line:
```
gip
```
And as a result, your public IP is returned.
## Installation
You can either use a precompiled binary from the [release](https://github.com/TwinProduction/gip/releases) section,
or you can build it yourself by doing the following, assuming you have a working Go environment:
```bash
go get -u github.com/TwinProduction/gip
```
## Custom API URL
By default, this uses my website's API - https://twinnation.org/api/v1/ip
Want to use a different API for getting the IP?
No problem, all you have to do is set the **GIP_API_URL** environment variable to the API of your choice.
Here are some APIs you can use:
- http://ip-api.com/line?fields=query
- https://ip.seeip.org