How rigellute/spotify-tui works
Spotify TUI is a terminal client for browsing Spotify’s catalog and library, searching, and controlling playback. Its main interactive workflow is terminal input through routed handlers into application state and network actions, followed by UI rendering; a separate CLI supports search, listing, playback, and formatting. Authentication and user configuration prepare both modes. Several handler and CLI relationships are documented only at module level in the source index, so the graph omits uncertain internal calls rather than inferring a detailed pipeline.
Main entry points: main.rs Program entry · handlers View handlers · network.rs Network event dispatch · mod.rs Terminal rendering
Components 23
Application runtime
- Program entry
src/main.rs - App state
src/app.rs - Input events
src/event/events.rs
Terminal views
- View handlers
src/handlers - Search results
src/handlers/search_results.rs - Track and album views
src/handlers/track_table.rs - Artist views
src/handlers/artist.rs - Library views
src/handlers/library.rs - Podcast views
src/handlers/episode_table.rs - Recommendations
src/handlers/made_for_you.rs - Terminal rendering
src/ui/mod.rs - Audio analysis view
src/ui/audio_analysis.rs - Help view
src/ui/help.rs
Spotify access
- Network event dispatch
src/network.rs - Spotify API
Command line
- CLI arguments
src/cli/clap.rs - CLI operations
src/cli/cli_app.rs - CLI formatting
src/cli/util.rs
Authentication and settings
- Client configuration
src/config.rs - User preferences
src/user_config.rs - OAuth redirect
src/redirect_uri.rs - Spotify OAuth
Other components
- Terminal user
Connections 29
- Terminal user → Program entry: starts
README.md - Program entry → App state: starts UI
src/main.rs - Program entry → CLI arguments: parses options
src/main.rs - Program entry → Client configuration: loads credentials
src/main.rs - Program entry → User preferences: loads preferences
src/main.rs - Program entry → Network event dispatch: starts network
src/main.rs - Program entry → Input events: reads input
src/main.rs - Program entry → Terminal rendering: renders UI
src/main.rs - Program entry → OAuth redirect: uses OAuth redirect
src/main.rs - Terminal user → Input events: provides keys
README.md - Input events → View handlers: routes input
src/handlers/mod.rs - View handlers → Search results: dispatches to
src/handlers/mod.rs - View handlers → Track and album views: dispatches to
src/handlers/mod.rs - View handlers → Artist views: dispatches to
src/handlers/mod.rs - View handlers → Library views: dispatches to
src/handlers/mod.rs - View handlers → Podcast views: dispatches to
src/handlers/mod.rs - View handlers → Recommendations: dispatches to
src/handlers/mod.rs - App state → Network event dispatch: sends actions
src/app.rs - Network event dispatch → App state: updates state
src/network.rs - Network event dispatch → Spotify API: calls API
src/network.rs - Terminal rendering → App state: reads state
src/ui/mod.rs - Terminal rendering → Audio analysis view: renders analysis
src/ui/mod.rs - Terminal rendering → Help view: renders help
src/ui/mod.rs - CLI arguments → CLI operations: configures commands
src/cli/mod.rs - CLI operations → Network event dispatch: uses network
src/cli/cli_app.rs - CLI operations → CLI formatting: formats output
src/cli/cli_app.rs - Program entry → Spotify OAuth: obtains token
src/main.rs - Spotify OAuth → OAuth redirect: redirects for consent
README.md - Program entry → Terminal user: displays terminal UI
README.md