ipgeo-cli v1.0.3
ipgeo-cli
A CLI tool for fetching IP information using the IPinfo API.
Installation
You can install ipgeo-cli globally using npm:
npm i -g ipgeo-cliUsage
ipinfo <ipaddress|ips.txt> [--out=filename.txt --format=json,csv --no-color]Arguments
<ipaddress|ips.txt>: A single IP address or a file containing a list of IP addresses.--out=filename.txt: (Optional) Specify an output file to save the results.--format=json,csv: (Optional) Specify the output format, eitherjsonorcsv. Default isjson.--no-color: (Optional) Disable colored output in the console.
Examples
Fetch information for a single IP address:
ipinfo 8.8.8.8Fetch information for a list of IP addresses in a file and save the results to an output file:
ipinfo ips.txt --out=output.json --format=jsonDisable colored output in the console:
ipinfo 8.8.8.8 --no-colorAPI Key
You should set an IPinfo API key to use this tool. If you don't have an API key, you can create one here.
The first time you run the tool, you will be prompted to enter your API key. The key will be stored locally in your configuration.
Development
Prerequisites
- Node.js >= 16.0.0
Install Dependencies
npm installRunning the Tool
node index.mjs <ipaddress|ips.txt> [--out=filename.txt --format=json,csv --no-color]Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
Your Name
Bugs
If you find a bug, please file an issue here.
Repository
The repository of this project is hosted at GitHub.