Metadata-Version: 2.4
Name: ipry
Version: 1.0.0
Summary: CLI tool for inspecting IP addresses
Author: カネキ
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: maxminddb
Requires-Dist: requests
Requires-Dist: pytricia
Requires-Dist: pipebar
Requires-Dist: bs4

---

## 🚀 Features

- IP lookup with optional City & ASN info
- Raw or pretty-printed output
- Local DB support (DB-IP Free Lite)
- Easy settings toggle via CLI
- Cross-platform (Linux / Windows / macOS)

---

## 📦 Installation

`ipry` requires **Python 3.10+** to run. Recommended installation via [`pipx`](https://pypa.github.io/pipx/).

### 🪟 Windows

```bash
pip install ipry
```

Or optionally via pipx:
```bash
pipx install ipry
```


### 🐧 Linux

```bash
pipx install ipry
```

If pipx is not installed:
```bash
sudo pacman -S python-pipx         # Arch-based
sudo apt install pipx              # Debian/Ubuntu
sudo dnf install pipx              # Fedora
apk add py3-pipx                   # Alpine Linux
sudo xbps-install -S python3-pipx  # Void Linux
nix-env -iA nixpkgs.pipx           # NixOS
sudo zypper install pipx           # OpenSUSE
```


### 🍎 macOS

```bash
pipx install ipry
```

If pipx is not installed:
```bash
brew install pipx && pipx ensurepath
```

By default, `ipry` uses [ip-api.com](https://ip-api.com) to fetch public IP geolocation data.

---

## 🧪 Usage

Lookup any IP:
```bash
ipry 8.8.8.8
```

Raw output (compact JSON):
```bash
ipry 8.8.8.8 --raw
```

Change settings:
```bash
ipry --settings
```

Update all databases:
```bash
ipry --update
```

Show help:
```bash
ipry --help
```

---

### 🔧 Available Flags

| Flag         | Description                                                               |
| ------------ | ------------------------------------------------------------------------- |
| `--raw`      | Outputs plain JSON (no colors or formatting)                              |
| `--local-db` | Use local geolocation database (from DB-IP.com, licensed under CC BY 4.0) |
| `--settings` | Open interactive settings menu                                            |
| `--update`   | Force update of all local DB files                                        |
| `--help`     | Show help message                                                         |

---

## 🌐 Local DB Mode (Optional)

When `--local-db` is enabled, `ipry` will download and use local geolocation datasets from [DB-IP.com](https://db-ip.com):

- [IP-to-City Lite](https://db-ip.com/db/download/ip-to-city-lite)
- [IP-to-ASN Lite](https://db-ip.com/db/download/ip-to-asn-lite)

These files are free for personal and open-source use under the  
[Creative Commons Attribution 4.0 License (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/).
