A command-line interface to check what's playing on NTS Radio.
- Display currently playing shows on both NTS channels
- Show upcoming broadcasts
- View full schedule for both channels
- Optional ASCII art display of show artwork with customizable dimensions
- Access raw JSON data from the NTS API
- View stream URLs and general NTS Radio information
- Option to disable colored output
- Python 3.8 or higher
From PyPI:
pip install nts-radio-cliOr if using uv:
uv pip install nts-radio-cliFor local development with uv:
# Install in editable mode
uv pip install -e .
# Run the CLI
uv run nts-radio now
# or
uv run nts-radio scheduleOnce installed from PyPI, you can use these commands:
nts-radio nowTo include show artwork (displayed in ASCII art):
nts-radio now --artYou can customize the size of the artwork using the --art-width and --art-height options:
# Default size (80x40)
nts-radio now --art
# Custom size (100x50)
nts-radio now --art --art-width 100 --art-height 50
# Smaller size (40x20)
nts-radio now --art --art-width 40 --art-height 20nts-radio schedulents-radio jsonThis command outputs the raw JSON data from the NTS API, which can be useful for debugging or piping to other tools.
nts-radio infoThis command displays general information about NTS, including stream URLs for both channels.
nts-radio stream-url <channel>Get just the stream URL for a specific channel (1 or 2). Useful for piping to other applications.
Examples:
# Get channel 1 stream URL
nts-radio stream-url 1
# Get channel 2 stream URL
nts-radio stream-url 2
# Example: Play channel 1 in mpv
nts-radio stream-url 1 | xargs mpv
# Example: Play channel 2 in VLC
nts-radio stream-url 2 | xargs vlcnts-radio play <channel> [--player <path>]Play the NTS radio stream for a specific channel (1 or 2). Uses mpv by default, but you can specify a different media player using the --player option.
Examples:
# Play channel 1 with default player (mpv)
nts-radio play 1
# Play channel 2 with default player (mpv)
nts-radio play 2
# Play channel 1 with VLC
nts-radio play 1 --player vlc
# Play channel 2 with a custom media player
nts-radio play 2 --player /path/to/media/player# List all available infinite mixtapes
nts-radio infinite
# List mixtapes with their stream URLs (simplified view)
nts-radio infinite --url
# Play a specific mixtape (using mpv)
nts-radio infinite --play poolside
# or
nts-radio infinite --play "Low Key"The infinite command lets you interact with NTS's infinite mixtapes - curated, endless streams of themed music. Each mixtape has a unique alias (like 'poolside' or 'slow-focus') that can be used with the --play option. You can use either the mixtape's alias or its full title when playing.
Available options:
- No options: Lists all available mixtapes with their descriptions
--url: Shows a simplified table with titles, aliases, and stream URLs--play <name>: Plays the specified mixtape--player <path>: Use an alternative media player (default: mpv)--random: Play random mixtapes continuously
Examples:
# Play a specific mixtape with default player (mpv)
nts-radio infinite --play poolside
# Play a specific mixtape with VLC
nts-radio infinite --play poolside --player vlc
# Play random mixtapes with default player (mpv)
nts-radio infinite --random
# Play random mixtapes with VLC
nts-radio infinite --random --player vlcYou can disable colored output using the --no-color option:
nts-radio --no-color jsonTo run the tests:
# Install test dependencies
uv sync --group dev
# Run tests
uv run pytest