-
Notifications
You must be signed in to change notification settings - Fork 0
Interactive CLI Specification
Language / שפה: English | עברית
This document details the architectural design principles, workflow, and system requirements for a future Interactive CLI Wizard (TUI / Terminal Dialog) for RightSub. The goal of the wizard is to empower end users to execute the full suite of RightSub mastering and translation capabilities without memorizing commands, arguments, or CLI flags.
-
Zero Flag Memorization: Running
./rightsubwith no arguments automatically launches an interactive step-by-step interview with simple prompts, arrow keys, or number choices. - Native Drag & Drop Support: Prompts accept direct drag-and-drop of video files, subtitle files, or folders directly from file managers (macOS Finder, Windows File Explorer).
-
Seed-Safe by Default: Torrent seeding integrity is protected by default, offering non-destructive duplication into
.he.srtwithout modifying original files. -
Zero Mandatory Dependencies: Built on Python standard libraries (
sys,os,pathlib,shlex,getpass), guaranteeing immediate execution without complex GUI or heavy curses requirements.
The wizard detects the operating system at runtime via platform.system() and adapts features and input sanitization accordingly:
| Component / Capability | macOS | Windows | Linux / NAS |
|---|---|---|---|
| Speech-to-Text Engine |
Apple SpeechAnalyzer (via quicksubs -e apple), utilizing Apple Silicon Neural Engine. |
Whisper engine (or informational message if Whisper binary is missing). |
Whisper engine (or manual reference). |
| Path Drag & Drop | Finder adds escape slashes to spaces (\ ) or quotes. Normalized via shlex and os.path.expanduser. |
Paths copied with backslashes (\) or surrounding double quotes. Normalized via pathlib.Path. |
Standard POSIX path resolution. |
| Terminal Charset | UTF-8 by default. | Enforces UTF-8 active code page (chcp 65001) to prevent mojibake in Hebrew terminal prompts. |
UTF-8 by default. |
One of the common failure modes of Hebrew terminal interfaces is broken ASCII box boundaries due to mismatched Unicode double-width characters across terminal emulators (macOS Terminal.app vs. iTerm2 vs. Windows Terminal).
RightSub Wizard Principles:
-
Linear Line-by-Line Dialog (Linear Wizard):
- Clean vertical text prompts instead of rigid multi-column ASCII tables and window splits.
- Continuous scroll stream compatible with 100% of terminal environments, including SSH and tmux sessions.
-
Clean Bilingual Mixed Labels:
- Technical actions and keys displayed in crisp English or clear bilingual terminology to prevent flipped punctuation and brackets in terminal streams.
The wizard does not require re-entering API credentials on each run, nor does it require manual file editing:
-
Local Configuration File:
- Stored at:
~/.config/rightsub/config.json. - Secured with restrictive file permissions:
chmod 600(readable and writable only by the active user).
- Stored at:
-
Precedence Hierarchy:
- Terminal Environment Variable (
export TMDB_API_KEY="...") -> Local config file -> Keyless offline fallback.
- Terminal Environment Variable (
-
Masked Input & Live Ping Verification:
- When entering API keys, input is masked via
getpassto prevent exposure in shell histories. - Upon entry, the wizard fires a live ping to the upstream API (TMDb / Gemini) to verify validity before persisting.
- When entering API keys, input is masked via
-
Offline-First Functionality:
- All core operations (Plex BiDi repair, RLM injection, CP1255 recovery, SDH/ad sanitization, local STT) operate completely keyless.
==================================================================
RightSub — Interactive Mastering Wizard
==================================================================
[?] What would you like to do today?
> 1. Full Autonomous Ingest (Zero-Config Auto)
2. Fix Subtitles for Plex (BiDi, RLM, CP1255 & Ad Sanitizing)
3. AI Subtitle Translation
4. Extract Embedded Subtitles from Video (FFmpeg)
5. On-Device Speech-to-Text Transcription
6. Configuration & API Keys (TMDb / AI Keys)
7. Exit
[?] Drag & drop a video file, subtitle, or folder here and press Enter:
> /Volumes/Media/Gladiator (2000)/Gladiator.mkv
[?] Video file detected without an external Hebrew subtitle.
How would you like to proceed?
> [1] Extract embedded English subtitle and prepare translation (Recommended)
[2] Transcribe audio track locally using AI Speech-to-Text
[3] Cancel
[?] Preserve active torrent seeding (Seed-Safe)?
> [Y] Yes, duplicate into clean .he.srt and keep source intact (Recommended)
[N] No, replace and rename source file in place
-
Standard Library Mode (Zero External Dependencies):
- Built exclusively with
sys,os,pathlib,shlex,getpass. - Guaranteed out-of-the-box availability without
pip installoverhead.
- Built exclusively with
-
Enhanced Terminal Experience (Optional):
- Graceful elevation to
questionaryorInquirerPyif installed in the environment for arrow-key navigation and interactive checkboxes.
- Graceful elevation to
RightSub Wiki — Subtitles Done Right. Powered by the SubRefine Algorithmic Engine & SubSwarm Multi-Agent AI.
- Home
- 📦 Global Installation Guide
- 🔰 Quickstart for Beginners
- BiDi & Plex Guide
- Pipeline Workflow
- On-Device STT & Sync (quicksubs)
- TMDb Metadata & Entity Resolution
- AI Assistants & Integration
- ⚖️ RightSub vs. Bazarr Comparison
- 🔄 Home Media & Download Integrations
- 🔮 Interactive CLI Specification
- 🔮 Setup & Health Wizard Specification
- 🔌 MCP Server Specification
- 💎 Semantic AI Polish & QC Specification
- 🐳 Docker Webhook Server Specification
- 🗺️ Product Roadmap
- 🚀 What's New & Release Notes
- Boston Legal Case Study
- CLI Reference
- דף הבית (Home HE)
- 📦 מדריך התקנה גלובלית והפצה
- 🔰 מדריך פשוט למתחילים
- מדריך BiDi ו-Plex
- תהליך עבודה מלא
- תמלול וסנכרון מקומי (quicksubs)
- אינטגרציית TMDb (עלילה ומגדר)
- חיבור לכלי בינה מלאכותית (AI)
- ⚖️ השוואה טכנית מול Bazarr
- 🔄 מדריך אינטגרציות ואוטומציה לשרתי מדיה
- 🔮 מפרט אשף פקודה אינטראקטיבי
- 🔮 מפרט אשף התקנה ואבחון
- 🔌 מפרט שרת MCP
- 💎 מפרט מנוע ליטוש סמנטי ו-QC
- 🐳 מפרט שרת Webhook וקונטיינר
- 🗺️ מפת דרכים ומעקב אבני-דרך
- 🚀 מה חדש ועדכוני גרסאות
- מקרה בוחן - בוסטון ליגל
- מדריך פקודות CLI