Skip to content

dangerouslaser/now-playing-cli

Repository files navigation

Now Playing CLI

PyPI version Python 3.9+

A modern CLI tool to monitor Plex activity via the Tautulli API.

now-playing

Quick Start

pipx install now-playing-cli
now-playing config
now-playing

Features

  • Real-time monitoring - Watch active streams with live progress updates
  • Library statistics - View item counts across all Plex libraries
  • Secure configuration - API keys stored in system keychain (or config file with restricted permissions)
  • Beautiful output - Rich terminal formatting with colors and tables
  • Safe reboot - Check for active streams before rebooting your server

Installation

Using pipx (recommended)

pipx install now-playing-cli

Using pip

pip install now-playing-cli

From source

git clone https://github.com/dangerouslaser/now-playing-cli.git
cd now-playing-cli
pip install .

Optional: Secure credential storage

For storing your API key in the system keychain instead of a config file:

pip install now-playing-cli[keyring]

Configuration

Run the interactive setup to configure your Tautulli connection:

now-playing config

You'll be prompted for:

  • Tautulli URL - e.g., http://localhost:8181 or https://tautulli.example.com
  • API Key - Found in Tautulli: Settings > Web Interface > API Key

The configuration is stored in ~/.config/now-playing/config.json with restricted permissions (readable only by you). If the keyring package is installed, your API key is stored in the system keychain instead.

Configuration commands

# View current configuration
now-playing config --show

# Remove all configuration
now-playing config --clear

Usage

Show current activity

now-playing

Displays all active Plex streams with user, title, progress, player info, and transcode status.

Monitor in real-time

now-playing watch

watch mode

Live-updating display that shows stream progress in real-time. Press Ctrl+C to exit.

Options:

  • --interval, -i - Refresh interval in seconds (default: 10)

Library statistics

now-playing library

library stats

Shows a table of all Plex libraries with item counts.

Reboot with safety check

now-playing reboot

reboot check

Checks for active streams and warns before rebooting. Useful for server maintenance.

Requirements

  • Python 3.9+
  • A running Tautulli instance connected to your Plex server

Upgrading from v1 (bash script)

The Python version is a complete rewrite with several improvements:

Feature v1 (bash) v2 (Python)
Configuration Edit script directly Interactive setup with now-playing config
Credential storage Plaintext in script System keychain or config file with restricted permissions
Error handling Limited Comprehensive with helpful messages
Dependencies curl, jq Self-contained Python package
Installation Manual copy to /usr/local/bin pip/pipx install

To upgrade:

  1. Remove the old script: sudo rm /usr/local/bin/now-playing
  2. Install the new version: pipx install now-playing-cli
  3. Run setup: now-playing config

License

MIT

About

Script to pull currently playing plex data via tautulli api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages