How user-wurun/pandora works
Pandora offers ChatGPT through a command-line client and an optional Flask server with a bundled browser interface. The main workflow is token selection or login, then conversation requests through either the legacy CLI or HTTP routes, and onward to ChatGPT; the turbo mode instead uses the completion-style API. The README also describes token acquisition and multi-device use. The graph follows documented capabilities and sampled call sites; some implementation details, including unsampled route and frontend wiring, are intentionally left unspecified.
Main entry points: launcher.py CLI launcher · api.py ChatGPT client · chat.py Turbo client · auth.py Login flow
Components 13
Entry points
- CLI launcher
src/pandora/launcher.py
User interfaces
- Terminal chat
src/pandora/bots/legacy.py - Flask server
src/pandora/bots/server.py - Browser UI
src/pandora/flask/static/_next/static/chunks/pages/chat/[[...chatId]]-76751174916fa3f7.js
Chat clients
- ChatGPT client
src/pandora/openai/api.py - Turbo client
src/pandora/turbo/chat.py - Conversation state
src/pandora/turbo/base.py - Async transport
src/pandora/openai/api.py
Authentication
- Login flow
src/pandora/openai/auth.py - Token validation
src/pandora/exts/token.py
Other components
- User
- OpenAI services
- Auth0
Connections 18
- User → CLI launcher: starts
- CLI launcher → Login flow: requests login
- Login flow → Auth0: authenticates with
- Login flow → OpenAI services: gets access token
- CLI launcher → Token validation: validates token
- CLI launcher → ChatGPT client: creates client
- CLI launcher → Turbo client: selects turbo mode
- CLI launcher → Terminal chat: starts terminal UI
- CLI launcher → Flask server: starts server
- User → Terminal chat: chats
- Terminal chat → ChatGPT client: requests conversations
- User → Browser UI: chats
- Browser UI → Flask server: sends API requests
- Flask server → ChatGPT client: dispatches chat operations
- ChatGPT client → Async transport: uses request transport
- Async transport → OpenAI services: sends API requests
- Turbo client → Conversation state: manages conversation state
- Turbo client → OpenAI services: requests completions