How nawar/kodi-cli works
Main Components
a) Client-Side Components:
• kodi-cli Script (Central Component)
• Configuration Handler (.kodirc)
• Input Processor (CLI Arguments)
• JSON-RPC Client
b) External Services/Dependencies:
• Kodi Media Center
• YouTube (Optional Integration)
• mps-youtube (Optional Component)
User Interface Layer
• Command options (-p, -y, -q, etc.)
Core Processing Layer
• Configuration Management (reading .kodirc)
• Command Processing
• JSON-RPC Request Formation
Communication Layer
• HTTP/JSON-RPC Client
• Authentication Handler
External Systems Layer
• Kodi Media Center
• YouTube API (indirect through URL processing)
Flow Representation
User Input → Command Processing → JSON-RPC Formation → Kodi Server
Configuration → Authentication → JSON-RPC Client
YouTube URLs → URL Processing → Kodi Command Formation
Important Details
a) Configuration Flow:
.kodirc → Config Parser → Authentication Manager
b) Command Flow:
CLI Arguments → Command Validator → Command Processor → JSON-RPC Client
c) Media Control Flow:
YouTube URL → URL Parser → Kodi Player Interface
Technical Details to Note
• JSON-RPC over HTTP as the primary communication protocol
• Configuration file format and structure
• Command processing pipeline
• Authentication mechanism