Skip to main content

Musix — Terminal Music Player

Built for developers who live in the terminal.

Music Apps has ads, skip limits, and pulls you out of your flow. Browser players eat RAM. Musix lets you search and stream any song without leaving the terminal — no account, no browser, no interruptions.


Why Musix

  • Zero context switching — stay in the terminal, stay in flow
  • Low RAM — mpv + a small Python process, no Electron overhead
  • No constraints — no skip limits, no ads, no subscription
  • No account needed — just install and play

Prerequisites

mpv must be installed on your system:

Platform Command
Linux sudo apt install mpv
Mac brew install mpv
Windows scoop install mpv

Installation

pip install musix-player

Commands

Playback

musix play "song name"                        # Stream a song instantly
musix search "song name"                      # Search and pick from top 5 results
musix play-playlist "playlist name"           # Play all songs in a playlist

Download

musix download "song name"                    # Search and download as audio file
                                              # Saves to ~/Music/musix/

Playlists

musix playlist "My Playlist"                  # Create a playlist
musix add-song "song name" "My Playlist"      # Add a song to a playlist
musix delete-playlist "My Playlist"           # Delete a playlist and its songs
musix list-playlists                          # List all playlists

History

musix history                                 # Show last 20 played songs with links

Playback Controls

While a song is playing:

Key Action
p or Space Play / Pause
q Skip to next / Quit
9 / 0 Volume down / up

How It Works

  1. Search — yt-dlp queries YouTube and returns results
  2. Stream — yt-dlp extracts a direct audio URL (no download)
  3. Play — mpv streams the audio URL in the terminal
  4. Store — playlists and history are saved locally in SQLite

No audio is stored unless you explicitly use musix download.


Architecture

graph TD
    CLI["CLI — cli.py<br/>(Typer commands)"]

    CLI --> Player["Player — player.py<br/>(yt-dlp + mpv)"]
    CLI --> DB["Database — db.py<br/>(SQLite)"]

    Player --> YTDLP["yt-dlp<br/>Fetches audio URL from YouTube"]
    Player --> MPV["mpv<br/>Streams audio in terminal"]

    DB --> SQLite["musix.db<br/>Playlists · Songs · History"]

Database Design

erDiagram
    playlist {
        INTEGER PlayID PK
        VARCHAR PlaylistName
    }

    songs {
        VARCHAR SongID PK
        VARCHAR SongName
        INT SongPlayTime
        VARCHAR SongArtist
        INT SongOrder
        INT PlayID FK
    }

    history {
        INTEGER id PK
        TEXT song_name
        TEXT youtube_id
        TIMESTAMP played_at
    }

    playlist ||--o{ songs : "has"

Play Flow

sequenceDiagram
    actor User
    participant CLI
    participant yt-dlp
    participant YouTube
    participant mpv

    User->>CLI: musix play "song name"
    CLI->>yt-dlp: search + extract audio URL
    yt-dlp->>YouTube: API request
    YouTube-->>yt-dlp: stream metadata
    yt-dlp-->>CLI: audio URL + title
    CLI->>mpv: stream URL
    mpv->>YouTube: fetch audio stream
    YouTube-->>mpv: audio chunks
    mpv-->>User: plays in terminal

Metadata

Release files for musix-player 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for musix-player 0.2.1
File Size Uploaded Provenance Actions
musix_player-0.2.1.tar.gz 8.0 kB Without provenance Details for musix_player-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for musix-player 0.2.1
File Interpreter ABI Platform Actions
musix_player-0.2.1-py3-none-any.whl Python 3 none any Details for musix_player-0.2.1-py3-none-any.whl

Total release size: 15.6 kB

Release files / musix_player-0.2.1.tar.gz

Download URL musix_player-0.2.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2051825238c20478202ea662ca8503613fd8400c7f18a574841f9f780b056db8
BLAKE2b-256 checksum
How to use checksums
79aa3b1781fc13c6a61a59f8527a0b752ed9c93c8835bea2ea3a520ef3904098
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / musix_player-0.2.1-py3-none-any.whl

Download URL musix_player-0.2.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e0c8957f1355026e3cd21a852578ff7f57cde3d886decde1613831d1b438f1d
BLAKE2b-256 checksum
How to use checksums
ea40298b8882a97e5e2a220595a397e2b5fcaf9bbe68af889b0ebb01c7db5371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for musix-player 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page