Skip to main content

A command-line TUI music player for Plex

Project description

Plexbar

Plexbar is a keyboard-driven terminal music player for Plex. It gives you a simple Textual TUI for browsing and playing your Plex music library without opening a web browser.

PlexBar screenshot

Features

  • First-run Plex connection setup
  • Browse by Artists, Albums, Tracks, and Playlists
  • Search your Plex music library
  • Queue tracks, albums, artists, and playlists
  • Show cover art for the currently playing track or album
  • Play, pause/resume, stop, and skip with keyboard shortcuts
  • Local playback through mpv

Requirements

  • Python 3.12+
  • uv
  • mpv installed and available on PATH
  • A Plex server with at least one music library
  • A Plex token

Installation

Install Plexbar as a standalone command with uv:

uv tool install plexbar

Run Plexbar:

plexbar

Installation for development

Clone the repository and sync dependencies with uv:

git clone git@github.com:feoh/plexbar.git
cd plexbar
uv sync

Run Plexbar from the project checkout:

uv run plexbar

First-run setup

If ~/.config/plexbar/config.toml does not exist, Plexbar opens a setup screen and prompts for:

  1. Plex base URL, for example http://puppy:32400 or http://127.0.0.1:32400
  2. Plex token
  3. Default music library

The config file is written to:

~/.config/plexbar/config.toml

Plexbar writes this file with user-only permissions where supported. Do not commit or share your Plex token.

Finding your Plex token

One common method:

  1. Open Plex Web and sign in.
  2. Open browser developer tools.
  3. Go to the Network tab.
  4. Refresh Plex Web or browse to a media item.
  5. Search requests for X-Plex-Token.
  6. Copy the token value only.

Usage

The top-level browser contains:

  • Artists
  • Albums
  • Tracks
  • Playlists

Press Enter to drill down into artists, albums, and playlists. Press Enter on a track to enqueue it.

Keybindings

Key Action
/ Search Plex music
Enter Select/drill down, or enqueue focused track
p Play focused track/album/artist/playlist immediately and replace queue
a Append focused track/album/artist/playlist to queue
Space Pause/resume
n Next track
s Stop playback
q Quit

Local validation

uv run ruff check .
uv run ruff format --check .
uv run pytest
uv run mypy src/plexbar tests

Current limitations

Plexbar currently launches mpv as a subprocess for each track. Future versions may switch to mpv IPC for richer playback state and automatic end-of-track advancement.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plexbar-0.1.4.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plexbar-0.1.4-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file plexbar-0.1.4.tar.gz.

File metadata

  • Download URL: plexbar-0.1.4.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plexbar-0.1.4.tar.gz
Algorithm Hash digest
SHA256 855839ff043cd538bfc7b4c5724071ca133bda4fb2e71e432dea049fd2fde62b
MD5 238b2b41cec8eea4751cba73e4e1238d
BLAKE2b-256 e552bd4ae93a26bc2712cad4572f91b74aef1e8aee6cea1fde8d37d25f04bb8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for plexbar-0.1.4.tar.gz:

Publisher: publish.yml on feoh/plexbar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plexbar-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: plexbar-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plexbar-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 05def0bc5f840aae4cadb3f39a0bf13f37674ceb9ca0f66c61ae7d0412fc8d78
MD5 7e413ac4eb6e1d410d96ccb925b2ccf2
BLAKE2b-256 1e2b3b9de1dac6099173fcb4bf04bab58ce8aed257b835b735259d3f50e7e608

See more details on using hashes here.

Provenance

The following attestation bundles were made for plexbar-0.1.4-py3-none-any.whl:

Publisher: publish.yml on feoh/plexbar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page