Metadata-Version: 2.4
Name: cli-notifier
Version: 1.0.2
Summary: echo-notifier — push notifikasi ke HP via Telegram saat AI agent selesai task
Author: dinarradja
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
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 :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<!-- markdownlint-disable MD041 -->

[![CI](https://github.com/dinarradja/cli-notifier/actions/workflows/ci.yml/badge.svg)](https://github.com/dinarradja/cli-notifier/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/cli-notifier)](https://pypi.org/project/cli-notifier/)
[![Python versions](https://img.shields.io/pypi/pyversions/cli-notifier)](https://pypi.org/project/cli-notifier/)
[![License](https://img.shields.io/pypi/l/cli-notifier)](LICENSE)

# 📡 echo-notifier

**Push notifikasi ke HP via Telegram saat AI agent selesai task.**

```
AI Agent → echon → Telegram Bot API → HP
```

## Quick Install

```bash
pipx install cli-notifier
echon --init     # Setup AI agent global
echon --setup    # Setup Telegram @radjaCLInotifierBOT
```

**Selesai.** Setiap AI agent di project mana pun bakal kirim notifikasi ke HP.

## Kenapa ECHO)))?

Zero-dependency Python script yang langsung kirim notifikasi ke Telegram — **gak perlu backend, gak perlu server, gak perlu Expo Go**.

| Fitur | Status |
|-------|--------|
| Telegram bot bawaan — gak perlu bikin sendiri | ✅ |
| Zero dependency (stdlib only) | ✅ |
| Cross-platform (macOS, Linux, Windows) | ✅ |
| Auto-detect chat ID | ✅ |
| Env var override: `ECHO_BOT_TOKEN` | ✅ |
| Global AI agent config via `--init` | ✅ |
| Clean uninstall via `--uninstall` | ✅ |

## Usage

Wrap command (jalanin + notify pas selesai):
```bash
echon "sleep 5 && echo selesai"
```

Direct dari AI agent:
```bash
echon --agent "CommandCode" --message "Berhasil setup database"
echon --agent "Claude Code" --message "Gagal deploy" --status failed
```

### Semua Command

| Perintah | Fungsi |
|----------|--------|
| `echon <command>` | Jalankan command + notify |
| `--message, -m` | Kirim notifikasi langsung |
| `--status, -s` | `success` (default) / `failed` |
| `--agent, -a` | Nama AI agent |
| `--setup` | Setup ulang Telegram/Expo |
| `--init` | Setup AI agent global config |
| `--uninstall` | Hapus semua config |
| `--version` | Tampilkan versi |

## Setup Kustom

Lewati bot bawaan dan pake bot sendiri:
```bash
export ECHO_BOT_TOKEN="token_dari_bot_father"
echon --setup
```

## Development

```bash
git clone https://github.com/dinarradja/cli-notifier
cd cli-notifier
python -m venv venv && source venv/bin/activate
pip install build twine
python -m unittest tests/test_echo.py -v
```

### Build + Publish

```bash
python -m build
python -m twine upload dist/*
```

## Struktur Proyek

```
cli-notifier/
├── echo.py                  ← Main script (stdlib only)
├── tests/test_echo.py       ← 20+ unit tests
├── backend/main.py          ← FastAPI server (opsional, Expo)
├── App.js                   ← Expo app (opsional)
└── .github/workflows/ci.yml ← CI pipeline
```
