Metadata-Version: 2.4
Name: openclip-huanime
Version: 0.1.5
Summary: AI Creative Studio — multi-agent video production for Indonesian Shorts
Project-URL: Homepage, https://openclip.huanime.cloud
Project-URL: Repository, https://github.com/ahmdd4vd/OpenClip
Project-URL: Documentation, https://openclip.huanime.cloud/docs
Author-email: David <david@huanime.cloud>
License: MIT
License-File: LICENSE
Keywords: ai,langgraph,multi-agent,shorts,tts,video
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Requires-Dist: anthropic>=0.45.0
Requires-Dist: asyncpg>=0.29.0
Requires-Dist: celery[redis]>=5.4.0
Requires-Dist: circuitbreaker>=1.4.0
Requires-Dist: cryptography>=42.0.0
Requires-Dist: ddgs>=9.14.0
Requires-Dist: edge-tts>=7.0.0
Requires-Dist: exa-py>=2.16.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: faster-whisper>=1.1.0
Requires-Dist: fonttools>=4.53.0
Requires-Dist: graphviz>=0.20.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: langchain-anthropic>=0.3.0
Requires-Dist: langchain>=0.3.0
Requires-Dist: langfuse>=2.0.0
Requires-Dist: langgraph-checkpoint-postgres>=1.0.0
Requires-Dist: langgraph>=1.0.0
Requires-Dist: librosa>=0.11.0
Requires-Dist: moviepy>=2.1.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: openai>=1.0.0
Requires-Dist: opentelemetry-api>=1.27.0
Requires-Dist: opentelemetry-exporter-otlp>=1.27.0
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.48.0
Requires-Dist: opentelemetry-instrumentation-langchain>=0.48.0
Requires-Dist: opentelemetry-sdk>=1.27.0
Requires-Dist: prometheus-client>=0.21.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydub>=0.25.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: redis>=5.4.0
Requires-Dist: rich>=13.0.0
Requires-Dist: structlog>=24.0.0
Requires-Dist: tenacity>=8.3.0
Requires-Dist: textual>=0.44.0
Requires-Dist: typer>=0.12.0
Requires-Dist: uvicorn[standard]>=0.30.0
Requires-Dist: yt-dlp
Provides-Extra: dev
Requires-Dist: mypy>=1.13.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Description-Content-Type: text/markdown

<div align="center">

# OpenClip

### AI Creative Studio by Huanime

<p align="center">
  <img src="https://img.shields.io/badge/status-alpha-blue" alt="Status">
  <img src="https://img.shields.io/badge/license-MIT-green" alt="License">
  <img src="https://img.shields.io/badge/python-3.12%2B-blue" alt="Python">
  <img src="https://img.shields.io/badge/platform-Linux%20%7C%20Mac%20%7C%20Windows-lightgrey" alt="Platform">
  <img src="https://img.shields.io/badge/TUI-Textual-blueviolet" alt="TUI">
</p>

<p align="center">
  <b>OpenClip</b> adalah studio produksi video AI yang bekerja seperti creative director profesional.
  Cukup ngobrol dengan <b>OpenHer</b>, dan dia yang mengatur riset, penulisan, visual, audio,
  editing, sampai publish ke YouTube, TikTok, Instagram, dan platform lain.
</p>

<p align="center">
  <a href="https://openclip.huanime.cloud"><b>Website</b></a> ·
  <a href="https://openclip.huanime.cloud/INSTALL.html"><b>Installasi</b></a> ·
  <a href="https://openclip.huanime.cloud/QUICKSTART.html"><b>Quickstart</b></a> ·
  <a href="https://openclip.huanime.cloud/API.html"><b>API</b></a> ·
  <a href="https://github.com/ahmdd4vd/OpenClip"><b>GitHub</b></a> ·
  <a href="https://pypi.org/project/openclip-huanime/"><img src="https://img.shields.io/pypi/v/openclip-huanime?color=blue" alt="PyPI"></a>
</p>

</div>

---

## Mengapa OpenClip?

| Fitur | Deskripsi |
|-------|-----------|
| **Conversational Production** | Bikin video cuma lewat chat. OpenHer menanyakan informasi yang dibutuhkan secara bertahap, tidak overwhelm. |
| **Multi-Agent Pipeline** | Riset, penulisan, visual, audio, editing, dan review berjalan paralel dengan agent terspesialisasi. |
| **Professional Quality** | Font OFL bundled, EDL terstruktur, visual continuity, closed-loop QA, dan quality gate otomatis. |
| **Cross-Platform Publish** | Preflight check per platform, OAuth aman, dan publish langsung dari chat. |
| **Modern TUI** | Antarmuka terminal modern dengan Textual: real-time streaming, slash commands, leader key, dan theme switching. |
| **AI Handle All** | Cukup bilang "connect YouTube" atau "upload ke TikTok", OpenHer yang urus semua. |

---

## Quick Install

### Linux / macOS

```bash
curl -fsSL https://raw.githubusercontent.com/ahmdd4vd/OpenClip/main/scripts/install.sh | bash
```

### Windows (PowerShell)

```powershell
irm https://raw.githubusercontent.com/ahmdd4vd/OpenClip/main/scripts/install.ps1 | iex
```

Setelah instalasi, verifikasi dengan:

```bash
openclip --help
```

---

## Quick Start

### 1. Jalankan OpenClip

```bash
openclip
```

Ini akan launch **TUI (Terminal UI)** modern dengan Textual. Kamu akan melihat:
- Chat interface dengan OpenHer AI
- Sidebar dengan session list dan shortcuts
- Real-time streaming response
- Leader key (`ctrl+space`) untuk commands

### 2. Ngobrol dengan OpenHer

Ketik di chat:

```
Buat video tentang tips belajar Python
```

OpenHer akan menanyakan satu per satu:
- **Durasi**: 30 detik, 1 menit, atau 5 menit?
- **Gaya**: Santai, profesional, atau cinematic?
- **Audience**: Pemula, menengah, atau lanjut?
- **Platform**: YouTube, TikTok, Instagram, atau semua?

### 3. Connect Platform (OAuth)

Ketik di chat:

```
Connect YouTube
```

Atau pakai slash command:

```
/connect youtube
```

OpenHer akan:
1. Buka browser ke YouTube OAuth
2. Kamu login + approve
3. Token tersimpan aman (terenkripsi)
4. Notify: "YouTube connected! ✅"

Setelah itu, kamu bisa:

```
Upload video ke YouTube
```

OpenHer akan upload otomatis ke semua platform yang sudah di-connect.

### 4. Slash Commands

| Command | Deskripsi |
|---------|-----------|
| `/model` | Switch LLM model |
| `/provider` | Manage LLM providers |
| `/session` | Session management |
| `/jobs` | Job history |
| `/approve` | Approval gate |
| `/compact` | Compact session context |
| `/connect` | Connect platform (YouTube, TikTok, dll) |
| `/disconnect` | Disconnect platform |
| `/platforms` | List connected platforms |
| `/theme` | Switch theme (dark/light/high-contrast) |
| `/update` | Update OpenClip to latest version |
| `/check-update` | Check for available updates |
| `/help` | Show help |
| `/exit` | Exit TUI |

### 5. Keyboard Shortcuts

| Shortcut | Deskripsi |
|----------|-----------|
| `ctrl+c` | Exit application |
| `ctrl+p` | Command palette |
| `ctrl+space` | Leader key (show shortcuts) |
| `ctrl+n` | New session |
| `ctrl+l` | List sessions |
| `ctrl+m` | Switch model |
| `ctrl+b` | Toggle sidebar |
| `u` | Check for updates (leader key) |
| `esc` | Interrupt generation |

---

## Contoh Percakapan

```
Kamu: Connect YouTube
OpenHer: Oke, saya siapkan koneksi ke YouTube...
         [Buka browser, kamu login ke Google]
OpenHer: YouTube connected! ✅

Kamu: Buat video tentang tips belajar Python
OpenHer: Oke! Durasi 1 menit, gaya santai, untuk pemula?
        Target platform: YouTube, TikTok, Instagram?
Kamu: Ya, semua platform

OpenHer: [Processing...]
         Video sudah siap!
         1. Script narasi — Sudah dibuat
         2. TTS voice — Menggunakan Edge TTS
         3. Aset video — Diambil dari Unsplash
         4. Render — Sudah selesai

Kamu: Upload ke semua platform
OpenHer: Upload ke YouTube... ✅
         Upload ke TikTok... ✅
         Upload ke Instagram... ✅

         Semua selesai!
         - YouTube: https://youtube.com/watch?v=xxx
         - TikTok: https://tiktok.com/@user/video/xxx
         - Instagram: https://instagram.com/reel/xxx
```

### 6. Update OpenClip

OpenClip akan otomatis cek update saat startup. Jika ada versi baru, kamu akan melihat notifikasi.

Untuk manual check:
```
/check-update
```

Untuk update:
```
/update
```

Atau via CLI:
```bash
openclip --check-update
openclip --update
```

---

## Dokumentasi

| Dokumen | Deskripsi |
|---------|-----------|
| [Installation Guide](https://openclip.huanime.cloud/INSTALL.html) | Panduan instalasi detail per OS (Linux, Mac, Windows) |
| [Setup Guide](https://openclip.huanime.cloud/SETUP.html) | Konfigurasi awal: API keys, OAuth, database, Redis, brand kit |
| [Quickstart Tutorial](https://openclip.huanime.cloud/QUICKSTART.html) | Tutorial 5 menit membuat video pertama |
| [API Reference](https://openclip.huanime.cloud/API.html) | Dokumentasi API untuk integrasi |
| [Changelog](https://openclip.huanime.cloud/CHANGELOG.html) | Riwayat perubahan versi |

---

## Requirements

- **Python** 3.12 atau lebih baru
- **ffmpeg** - untuk processing video/audio
- **libsndfile1** - hanya untuk Linux (audio processing)
- **Redis** (opsional) - untuk production mode dengan Celery workers
- **PostgreSQL** (opsional) - untuk database production

---

## Development

```bash
# Clone repo
git clone https://github.com/ahmdd4vd/OpenClip.git
cd OpenClip

# Install dependencies
make install

# Run tests
make test

# Run linter
make lint

# Format code
make format

# Type check
make typecheck
```

---

## Browser / API

OpenClip juga bisa dijalankan sebagai API server:

```bash
# Start API server
uvicorn openclip.api.main:app --host 0.0.0.0 --port 8000

# Docs interaktif
open http://localhost:8000/docs
```

---

## Tech Stack

- **Language**: Python 3.12+
- **Orchestration**: LangGraph (StateGraph)
- **LLM Framework**: LangChain + Anthropic / OpenAI / OpenRouter / custom
- **API**: FastAPI + Uvicorn
- **Queue**: Celery + Redis (production)
- **Database**: PostgreSQL (production, checkpointing)
- **Video**: MoviePy, FFmpeg
- **TTS**: edge-tts
- **Audio**: librosa, pydub, faster-whisper
- **TUI**: Textual (modern terminal UI)
- **Observability**: OpenTelemetry, Prometheus, Langfuse

---

## Contributing

Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a PR.

1. Fork repo
2. Buat branch baru (`git checkout -b feat/feature-keren`)
3. Commit perubahan (`git commit -m 'feat: tambah feature keren'`)
4. Push ke branch (`git push origin feat/feature-keren`)
5. Buka Pull Request

Pastikan:
- Semua test lolos: `pytest tests/unit -q`
- Lint bersih: `ruff check src tests`
- Type check bersih: `mypy src`

---

## License

MIT License — by Huanime. See [LICENSE](LICENSE) for details.

---

<div align="center">

<b>OpenClip</b> — Made with ❤️ by <a href="https://huanime.cloud">Huanime</a>

</div>
