Metadata-Version: 2.4
Name: 5mghost-yonder
Version: 0.9.2
Summary: Standalone Yonder CLI and bundled agent skill
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: curl_cffi<1.0,>=0.7.0

# 5mghost-yonder

Minimal-dependency Python CLI (`yonder`, `yonder-setup`, `yonder-update`; `curl_cffi` + Python standard library) and bundled AI Agent Skills for **Yonder** — unified creator data across **YouTube, Twitch, X, TikTok, Instagram, and Reddit**.

## Supported Platforms

| Platform | Execution | Capabilities |
| --- | --- | --- |
| **YouTube** | Cloud API + Local | Channel & video stats, search, Shorts classification, comment threads, bulk exports, plus local subtitle/media download and clip extraction |
| **Twitch** | Cloud API | Real-time live stream status, historical channel & game analytics, channel/game leaderboards, and 24/7 live viewer curves with read-only IRC chat capture |
| **X** | Cloud API | Creator profiles, user search, long-form posts, keyword search, timelines, and nested reply threads |
| **TikTok** | Cloud API + Local | Batch video retrieval, comment trees, creator info, plus local passwordless avatar downloads |
| **Instagram** | Cloud API | Public creator profile stats, bio, verification, and link-in-bio metadata |
| **Creator Discovery** | Cloud API | Cross-platform creator matrix discovery and public business email evidence (`yonder discover`) |
| **Reddit** | Local Isolated | Isolated local browser-profile collection (`yonder reddit`) with 12-hour cache and zero cookie uploads |

## Closed Beta Access

Yonder is currently in **Closed Beta**. Signing in with Google OAuth requires a valid one-time beta invite code (`yonder redeem --code <INVITE_CODE>`) unless your account has already been pre-authorized.

## Quick Start

Requires Python **3.10+**.

```sh
# 1. Install globally in an isolated environment
uv tool install 5mghost-yonder  # or: pipx install 5mghost-yonder (never use global/user pip)

# 2. Sign in (auto-detects desktop Google OAuth vs. SSH device code)
yonder login

# 3. Activate your Closed Beta invite code (if not yet activated)
yonder redeem --code <INVITE_CODE>

# 4. Install the bundled Agent Skill and verify readiness (Yonder is only ready to use after yonder setup --apply succeeds)
yonder setup --apply
```

Headless / SSH environments automatically fall back to device-code login, or you can request it explicitly:

```sh
yonder login --mode device
```

## Common Commands

- `yonder login [--mode auto|browser|device]` — Sign in via browser PKCE OAuth or device code
- `yonder redeem --code <INVITE_CODE>` — Redeem a Closed Beta invite code
- `yonder whoami` / `yonder auth-status` — Inspect active user, email, and beta grant status
- `yonder quota [--json]` — Inspect your plan tier, monthly/daily Credits remaining, Twitch watch slots, and read/write rate limits
- `yonder query --platform <p> --action <a> ...` — Run cloud creator data queries with automatic long-polling, pagination, and 12-hour local cache
- `yonder watch start|list|status|ccv|chat|stop` — Manage persistent 24/7 Twitch viewer & read-only chat monitors
- `yonder discover "<url_or_handle>"` — Cross-platform creator discovery & public business contacts
- `yonder media subtitles|download|clip|avatar` — Local passwordless YouTube media & TikTok avatar tools
- `yonder reddit login|posts|info|search|post|status|logout` — Local isolated Reddit collection
- `yonder logout` — Clear local `~/.yonder/auth/` credentials and attempt server key revocation
- `yonder install-skill` — Scan existing local AI client skill directories (`--scan`, `--dir <PATH>`, `--list`, `--sync-registered`)
- `yonder update [--check] [--force]` (or `yonder-update`) — Check for and install CLI + registered skill updates
- `yonder --version` — Print installed CLI version

## Credits, Quotas & Rate-Limit Recovery

- **Unified Credits (Monthly Allowance + Daily Safety Cap)**: Cloud queries share one unified Credits balance with both a monthly allowance and a daily safety cap (resets daily at 00:00 Asia/Shanghai) according to your account tier (`trial` / `standard` / `pro`). Batch queries reserve Credits upfront, settle based on the **actual items retrieved**, and **automatically refund the difference** (including failed or cancelled jobs).
- **Dedicated Twitch 24/7 Watch Slots (0 Credits)**: `yonder watch` uses its own independent active job, channel, and duration slots (0 Credits) and never consumes heavy batch concurrency slots.
- **8 Local Capabilities Always 0 Credits**: All 4 `yonder media` local tools (YouTube `subtitles`/`download`/`clip`, TikTok `avatar`) and all 4 `yonder reddit` local commands (`posts`/`info`/`search`/`post`), plus local 12-hour cache hits, permanently cost **0 Credits**.
- **Separate Read/Write Rate Limits & HTTP `429` Recovery**: Creating operations uses your write RPM bucket, while read/control calls (`poll`, `items`, `cancel`, `quota`) use a separate high-frequency read RPM bucket at 0 Credits so polling never blocks new jobs. If a request returns HTTP `429`, follow the `Retry-After` response header (or the wait seconds shown by the CLI) before retrying, and run `yonder quota` to inspect your remaining monthly/daily Credits and concurrency slots.

## Local Privacy & Security Guarantee

- **Zero ambient browser or Keychain access**: Yonder never reads your everyday browser cookies or macOS Keychain.
- **Scoped local storage**: Credentials and local state are stored strictly under `~/.yonder/` (`0700` directories, `0600` files, symlink-checked).
- **No manual API key flags**: `yonder` never accepts `--api-key` flags or reads `YONDER_API_KEY` from your shell environment.
- **Opt-out diagnostics**: CLI diagnostic telemetry scrubs paths and credentials client-side and server-side, and can be disabled anytime with `export YONDER_TELEMETRY=0`.
