Metadata-Version: 2.4
Name: infogram-bot
Version: 1.3.0
Summary: Telegram bot module for remote VPS shell access
Author-email: Aapka Naam <you@example.com>
License: MIT
Project-URL: Homepage, https://github.com/YOUR_GITHUB_USERNAME/infogram
Project-URL: Repository, https://github.com/YOUR_GITHUB_USERNAME/infogram
Keywords: telegram,bot,vps,remote,shell,terminal
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
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: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-telegram-bot>=20.0
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: twine; extra == "build"
Dynamic: license-file

# Infogram

Telegram bot module for remote VPS shell access — ab module ka naam **`infogram`** hai.

- **Import name:** `infogram` (Python mein: `from infogram import start_bot`)
- **PyPI distribution name:** `infogram-bot`
- **CLI command:** `infogram --token ... --owner ...`

> ⚠️ **Important:** PyPI par `infogram` naam kisi aur ka hai (infogr.am ka library), isliye
> `pip install infogram` aapka module **nahi** laga payega. Distribution ka naam
> `infogram-bot` rakha gaya hai taaki PyPI par publish ho sake.

---

## 📦 Install kaise karein

### 1) Local install (sabse simple — aapke VPS ke liye)

```bash
cd ~/telegram_bot_module        # jahan pyproject.toml hai
pip install --upgrade pip       # purana pip ho toh
pip install -e .                # editable install
```

### 2) Kisi bhi machine par — GitHub se (RECOMMENDED 🚀)

Project ko apne GitHub par push karo, phir **koi bhi machine** par:

```bash
pip install git+https://github.com/YOUR_GITHUB_USERNAME/infogram.git
```

Yeh PyPI ke bina kaam karta hai — GitHub se seedha install! Sirf Python 3.8+ chahiye.

### 3) PyPI se (sabse "official" tarika)

Pehle baar publish karne ke liye (sirf aapko karna padega):

```bash
cd ~/telegram_bot_module
pip install build twine
python -m build                                   # dist/ folder banega
python -m twine upload dist/*                     # PyPI credentials maangega
```

Uske baad duniya mein **koi bhi**:

```bash
pip install infogram-bot
```

> GitHub username aur email `pyproject.toml` mein apne se replace karo pehle!

---

## 🚀 Bot chalao

Python script se:

```python
from infogram import start_bot

TOKEN = "YOUR_BOT_TOKEN"
OWNERS = [123456789]  # Apna Telegram user ID integer mein daalo

start_bot(TOKEN, OWNERS)
```

```bash
python3 run_bot.py
```

Ya terminal se seedha (CLI):

```bash
infogram --token YOUR_BOT_TOKEN --owner 123456789
```

---

## 🎮 Telegram par commands

| Command | Kaam |
|---|---|
| Any text | Shell command chalao (aliases bhi support hain) |
| `download <file>` | File download karo |
| `getall [path]` | Directory ka tar.gz bhejo |
| `dumpall [path]` / `takeall` | Poora VPS dump karo |
| `help` | Saare aliases dekho |
| `/com <command>` | Slash ke saath command chalao |
| Document bhejo | VPS par save ho jata hai (current dir mein) |

---

## 🔒 Security notes

- Sirf `OWNERS` list mein diye Telegram user IDs hi commands chala sakte hain.
- Commands 120s timeout ke saath chalti hain (tar ke liye 300–600s).
- Uploaded file names sanitize hote hain (path traversal blocked).

## 📁 Project structure

```
├── src/infogram/
│   ├── __init__.py      (start_bot, run_cmd, ALIASES)
│   ├── bot.py           (Telegram handlers register)
│   ├── handlers.py      (terminal, download, getall, dumpall, help)
│   ├── core.py          (shell execution engine)
│   ├── constants.py     (saare aliases)
│   └── cli.py           (terminal CLI)
├── pyproject.toml       (packaging)
├── run_bot.py           (example runner)
└── README.md
```

## 🔧 Agar aapne pehle wale `mybot` commands VPS par chala diye hain

```bash
cd ~/telegram_bot_module
mv src/mybot src/infogram
sed -i 's/mybot/infogram/g' src/infogram/*.py
```
