Spotify-tracker/quick-start.sh
RTSDA bcfa2ba1c2 Initial Spotify Tracker with PhantomBot integration
- Rock-solid Rust implementation replacing unreliable custom API
- OAuth2 authentication with automatic token refresh
- HTTP server with multiple endpoints (/current, /phantombot, /health)
- Comprehensive error handling and retry logic
- PhantomBot integration examples and documentation
- CLI tool with monitoring and configuration management
2025-08-18 17:56:58 -04:00

64 lines
2 KiB
Bash
Executable file

#!/bin/bash
# Spotify Tracker Quick Start Script
echo "🎵 Spotify Tracker Setup"
echo "========================"
echo
# Check if cargo is installed
if ! command -v cargo &> /dev/null; then
echo "❌ Cargo not found. Please install Rust from https://rustup.rs/"
exit 1
fi
# Build the project
echo "🔨 Building Spotify Tracker..."
cargo build --release
if [ $? -ne 0 ]; then
echo "❌ Build failed. Please check the errors above."
exit 1
fi
echo "✅ Build successful!"
echo
# Check if we need to set up authentication
if [ ! -f ~/.config/spotify-tracker/token.json ] && [ ! -f ~/Library/Application\ Support/spotify-tracker/token.json ]; then
echo "🔑 Authentication Setup Required"
echo "================================="
echo
echo "Before using Spotify Tracker, you need to:"
echo "1. Create a Spotify App at https://developer.spotify.com/dashboard/"
echo "2. Add 'http://localhost:8888/callback' to your app's Redirect URIs"
echo "3. Note your Client ID and Client Secret"
echo
echo "Then run: cargo run -- auth"
echo
else
echo "✅ Authentication already configured"
echo
fi
echo "🚀 Quick Commands:"
echo "=================="
echo "Get current track: cargo run -- current"
echo "Monitor continuously: cargo run -- monitor"
echo "Start server: cargo run -- server"
echo "Show config: cargo run -- config"
echo "Get help: cargo run -- --help"
echo
echo "🎮 PhantomBot Integration:"
echo "========================="
echo "1. Start the server: cargo run -- server"
echo "2. Use in PhantomBot: http://localhost:8888/phantombot"
echo "3. Check phantombot-example.js for command examples"
echo
echo "🎯 Alternative: Use the release binary:"
echo "======================================="
echo "Current track: ./target/release/spotify-tracker current"
echo "Monitor: ./target/release/spotify-tracker monitor"
echo "Server: ./target/release/spotify-tracker server"