Metadata-Version: 2.4
Name: helper-cli
Version: 0.2.2
Summary: Simple system info CLI
Author-email: Huy Nguyen <huy.ntq02@gmail.com>
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/nguyenhuy158/helper
Project-URL: Repository, https://github.com/nguyenhuy158/helper
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0.0
Requires-Dist: speedtest-cli>=2.1.0
Requires-Dist: psutil>=5.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.0.0; extra == "dev"
Requires-Dist: watchdog>=2.0.0; extra == "dev"

# 📦 Helper CLI

A simple command-line tool to show system info (IP, CPU arch, etc.) and the commands used to get them.

---

### 🚀 Install

```bash
pip install helper
```

---

### 🧠 Usage

```bash
helper [command]
```

#### Available commands:

| Command | Description                       | Example              |
| ------- | --------------------------------- | -------------------- |
| `ip`    | Show internal IP                  | `helper ip`          |
| `pubip` | Show public IP                    | `helper pubip`       |
| `arch`  | Show CPU architecture (arm / amd) | `helper arch`        |
| `si`    | Show system information           | `helper si`          |
| `nix`   | Show NixOS information            | `helper nix`         |
| `d`     | Show Docker information           | `helper d`           |
| `sp`    | Show speed test results           | `helper sp`          |
| `v`     | Show virtual environment info     | `helper v`           |
| `f`     | Show file information             | `helper f`           |
| `env`   | Show environment variables        | `helper env`         |
| `run`   | Run command snippets              | `helper run`         |
| `kill`  | Kill processes by name or port    | `helper kill <name>` |
| `disk`  | Show disk usage, mount, and list info | `helper disk usage`  |
| `journalctl` | Show useful journalctl options and examples | `helper journalctl` |
| `all`   | Show all info                     | `helper all`         |

Use `-v` for verbose output (e.g., `helper ip -v`).

Each command also prints the shell command it runs to get the result.

### 📚 Library Usage

You can import and use helper functions programmatically:

```python
import helper

# Get disk usage information
usage = helper.disk.get_usage()
print(usage)

# Get system information as dict
info = helper.system_info.get_info()
print(f"System: {info['system']['system']}")
print(f"CPU: {info['cpu']['cpu']}")

# Get internal IP
ip = helper.internal_ip.get_internal_ip()
print(f"Internal IP: {ip}")

# Get public IP
pub_ip = helper.public_ip.get_public_ip()
print(f"Public IP: {pub_ip}")

# Get architecture
arch = helper.arch.get_arch()
print(f"Architecture: {arch}")

# Get all info
all_info = helper.all_info.get_info()
print(all_info)
```

### 🔄 Upgrade

```bash
pip install --upgrade helper
```

---

### 🧑‍💻 Contribute

Pull requests are welcome!

Before submitting a PR, ensure your code passes pylint checks and tests:
```bash
make lint
make test
```

#### Testing

Run the test suite:
```bash
make test
```

Or run pytest directly:
```bash
pytest
```

Tests are located in the `tests/` directory. For detailed testing guidelines and conventions, see `src_docs/testing.md`.

Repo: [https://github.com/nguyenhuy158/helper](https://github.com/nguyenhuy158/helper)
