Metadata-Version: 2.4
Name: os-notif-telegram
Version: 0.1.1
Summary: Forward OS notifications to Telegram
Project-URL: Homepage, https://github.com/go2run/os-notif-telegram
Project-URL: Issues, https://github.com/go2run/os-notif-telegram/issues
License: MIT
Keywords: notifications,telegram,toast,windows,winrt
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
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: Topic :: Communications
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: click>=8.0
Requires-Dist: pillow>=9.0
Requires-Dist: platformdirs>=3.0
Requires-Dist: pystray>=0.19
Requires-Dist: requests>=2.28
Requires-Dist: winrt-runtime
Requires-Dist: winrt-windows-data-xml-dom
Requires-Dist: winrt-windows-foundation
Requires-Dist: winrt-windows-ui-notifications
Requires-Dist: winrt-windows-ui-notifications-management
Description-Content-Type: text/markdown

# os-notif-telegram

Forward OS notifications to Telegram in real time.

Currently supports: **Windows 10 / 11**

## Requirements

- Python 3.9+

## Installation

```bash
pipx install os-notif-telegram
```

`pipx` automatically adds the command to your PATH so it works from any terminal.
If you don't have `pipx` yet:

```bash
pip install pipx
pipx ensurepath
```

Then open a new terminal and install:

```bash
pipx install os-notif-telegram
```

## Quick Start

**1. Create a Telegram bot**

Talk to [@BotFather](https://t.me/BotFather) → `/newbot` → copy the **bot token**.

**2. Get your Chat ID**

Talk to [@userinfobot](https://t.me/userinfobot) → copy the **id** number.

**3. Configure**

```bash
os-notif-telegram setup
```

Follow the prompts to enter your bot token and chat ID.
Config is saved to `%APPDATA%\os-notif-telegram\config.json` — never committed to any repo.

**4. Start forwarding**

```bash
os-notif-telegram start
```

The program minimises to the system tray. You can close the terminal window.

## Commands

| Command | Description |
|---------|-------------|
| `os-notif-telegram setup` | Interactive setup wizard |
| `os-notif-telegram config` | Show current configuration |
| `os-notif-telegram start` | Start forwarding (system tray) |
| `os-notif-telegram start --no-tray` | Start in terminal (foreground) |
| `os-notif-telegram stop` | Stop the running forwarder |
| `os-notif-telegram status` | Show whether the forwarder is running |
| `os-notif-telegram test` | Send a test notification to verify Telegram is working |
| `os-notif-telegram --version` | Show version |

### Non-interactive setup

```bash
os-notif-telegram setup --token "YOUR_TOKEN" --chat-id "YOUR_CHAT_ID"
```

## Windows Notification Access

If you see an "Access denied" error, enable notification access:

**Settings → Privacy & security → Notifications**

Enable access for your terminal application (e.g. Windows Terminal, PowerShell).

## How it Works

- Listens to OS notification APIs
- On each new notification, extracts app name, title, and body
- Sends a formatted message to your Telegram chat via the Bot API
- Deduplicates notifications by ID and content to prevent spam

## License

MIT
