Packages

Multi-surface application runtime for Elixir. One TEA module renders to terminal, browser (LiveView), SSH, and MCP (agents). 30+ widgets, flexbox + CSS grid, AI agent runtime, distributed swarm with CRDTs, time-travel debugging, session recording, sandboxed REPL, and agentic commerce.

Current section

Files

Jump to
raxol examples plugins spotify 02_playlist_browser.exs
Raw

examples/plugins/spotify/02_playlist_browser.exs

#!/usr/bin/env elixir
# Spotify Playlist Browser
#
# This example demonstrates browsing and playing playlists.
# Shows how to navigate the plugin's playlist mode.
#
# Prerequisites:
# - Authentication setup (see 01_simple_playback.exs)
# - At least one playlist in your Spotify account
Mix.install([
{:raxol, path: Path.expand("../../..", __DIR__)},
{:req, "~> 0.5"},
{:oauth2, "~> 2.1"}
])
alias Raxol.Plugins.Spotify
# Run the plugin
# 1. Authenticate if needed (press 'a')
# 2. Press 'l' to enter playlist mode
# 3. Use arrow keys to select a playlist
# 4. Press ENTER to start playing
# 5. Press ESC to go back to main view
IO.puts("""
Playlist Browser Controls:
- 'l' : View playlists
- UP/DOWN : Navigate playlists
- ENTER : Play selected playlist
- ESC : Back to main view
- 'q' : Quit
""")
Raxol.Plugin.run(Spotify)