| Crates.io | soma-player |
| lib.rs | soma-player |
| version | 0.1.2 |
| created_at | 2025-06-30 09:00:35.604845+00 |
| updated_at | 2025-07-08 09:00:56.654465+00 |
| description | A terminal-based music player for SomaFM internet radio stations with spectrum visualizer |
| homepage | https://github.com/mpuccini/soma-play |
| repository | https://github.com/mpuccini/soma-play |
| max_upload_size | |
| id | 1731573 |
| size | 204,724 |
A terminal-based music player for SomaFM internet radio stations, built with Rust and featuring a beautiful TUI (Terminal User Interface).
This project is currently under active development and should be considered alpha software. While functional, you may encounter bugs, incomplete features, or breaking changes between versions. Use at your own discretion and please report any issues you encounter.
+/- keys (0-100%)P key~/.config/soma-player/Install SomaFM Player with a single command:
curl -sSL https://raw.githubusercontent.com/mpuccini/soma-play/main/install.sh | bash
wget -qO- https://raw.githubusercontent.com/mpuccini/soma-play/main/install.sh | bash
This script will:
~/.local/bin/soma-playerNote: Make sure ~/.local/bin is in your PATH. If not, the installer will show you how to add it.
Install directly from the Rust package registry:
cargo install soma-player
Linux only - Install audio dependencies:
# Ubuntu/Debian
sudo apt-get install libasound2-dev
# Fedora/CentOS/RHEL
sudo dnf install alsa-lib-devel
# Arch Linux
sudo pacman -S alsa-lib
Download the latest release:
soma-player-linux-x64.tar.gz (Linux x86_64)soma-player-macos-arm64.tar.gz (macOS Apple Silicon)Extract and install:
# Extract the archive
tar -xzf soma-player-*.tar.gz
# Move to a directory in your PATH
mv soma-player ~/.local/bin/
# or system-wide (requires sudo)
sudo mv soma-player /usr/local/bin/
# Make executable (if needed)
chmod +x ~/.local/bin/soma-player
Verify installation:
soma-player --version
If you prefer to build from source or need to customize the build:
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install system dependencies (Linux only):
# Ubuntu/Debian
sudo apt-get install libasound2-dev pkg-config
# Fedora/CentOS/RHEL
sudo dnf install alsa-lib-devel pkg-config
# Arch Linux
sudo pacman -S alsa-lib pkg-config
Clone and build:
git clone https://github.com/mpuccini/soma-play.git
cd soma-play
cargo build --release
Install the binary:
# Copy to local bin directory
cp target/release/soma-player ~/.local/bin/
# Or system-wide (requires sudo)
sudo cp target/release/soma-player /usr/local/bin/
The player automatically creates a configuration file at:
~/.config/soma-player/config.toml
Example configuration:
last_channel_id = "groovesalad"
volume = 75
auto_start = false
last_channel_id - ID of the last played channel (auto-saved)volume - Volume level 0-100 (default: 50)auto_start - Skip channel selection and auto-play last channel (default: false)The built-in spectrum visualizer displays a real-time animated frequency analysis of the currently playing audio stream. Features include:
The visualizer simulates realistic audio frequency data and provides an engaging visual representation of the music being played. It's designed to work well in various terminal sizes and automatically scales to fit the available space.
Enhanced logging is written to ~/.config/soma-player/logs/soma-player.log with automatic daily rotation and includes:
Configure log levels with environment variables:
RUST_LOG=debug cargo run # More verbose logging
RUST_LOG=warn cargo run # Less verbose logging
RUST_LOG=info cargo run # Default level
Log files are automatically rotated daily and old logs are cleaned up to maintain disk space.
The project includes comprehensive inline documentation for all modules and functions. You can generate and view the API documentation locally:
# Generate API documentation
cargo doc --no-deps --document-private-items --open
# Or just generate without opening
cargo doc --no-deps --document-private-items
The API documentation includes:
An extended user guide is available that covers:
# Install mdbook (if not already installed)
cargo install mdbook
# Build and serve the documentation locally
cd docs
mdbook serve --open
# Or build all documentation (API + User Guide)
./build-docs.sh
When the project is ready for public release, documentation will be hosted at:
https://yourusername.github.io/soma-player/api/https://yourusername.github.io/soma-player/guide/This project generates a comprehensive Software Bill of Materials (SBOM) for supply chain security and compliance.
# Run the SBOM generation script
./generate-sbom.sh
This generates:
The generated SBOM includes:
SBOM generation is integrated into our CI/CD pipeline:
src/
โโโ main.rs # Application entry point
โโโ lib.rs # Module declarations
โโโ api/ # SomaFM API integration
โโโ audio/ # Audio playback engine
โโโ config/ # Configuration management
โโโ models/ # Data structures
โโโ ui/ # User interface components
# Run all unit tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test module
cargo test config::tests
# Run tests with coverage (requires cargo-tarpaulin)
cargo tarpaulin --out Html
Generate and view documentation:
# Generate docs
cargo doc --open
# Check all doc tests
cargo test --doc
# Check for issues
cargo clippy
# Format code
cargo fmt
# Security audit
cargo audit
This project is in early development. If you'd like to contribute:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)git clone https://github.com/mpuccini/soma-play.git
cd soma-player
cargo build
cargo test
cargo run
This project includes automated workflows for:
Build & Release (.github/workflows/build.yml)
Documentation (.github/workflows/docs.yml)
cargo docSBOM Generation (.github/workflows/sbom.yml)
This project is licensed under the MIT License - see the LICENSE file for details.
This player is an unofficial client. Please consider supporting SomaFM directly - they provide an incredible service and deserve our support!
Enjoy the music! ๐ถ