Skip to main content

A terminal music player with online and offline modes

Project description

Flow

A terminal-based music player with online streaming and offline library modes.

Features

  • Dual-mode operation — Automatically detects internet and switches between online streaming and offline playback
  • Online mode — Search and stream audio from YouTube via yt-dlp and python-vlc
  • Offline mode — Play local audio files with album support, search, and a liked-songs collection
  • Download — Save tracks from YouTube to your local library with the -d flag
  • Repeat & shuffle — Loop tracks or play in random order
  • Like/unlike — Save favorites to a dedicated playlist
  • Tab completion — Auto-complete commands and song names in offline mode
  • Colored TUI — Cyan theme for online, magenta for offline, with borders and banners

Requirements

  • Python 3
  • VLC media player (for python-vlc bindings)

Installation

git clone https://github.com/yourusername/flow.git
cd flow
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt

Or use the installer script:

bash install.sh

Usage

python main.py [-r] [-s] [-d]

Or direct if you have used install.sh

flow <command> <flag>
Flag Description
-r Repeat mode (loop current track)
-s Shuffle mode (random order)
-d Download mode (save streamed audio to library)

Commands

Command Description
play <name or #> Play a song by name or search result number
search <query> Search YouTube (online) or library (offline)
list Show all songs, albums, or liked tracks
like <name or #> Add a song to your liked collection
download <name or #> Save a streamed song to the local library
switch Toggle between online and offline mode
help Show available commands

Configuration

  • Downloads and library are stored in ~/.flow/downloads/
  • Liked songs (online) are saved to ~/.flow/liked.txt
  • Liked songs (offline) are copied to ~/.flow/downloads/liked songs/

Project Structure

Flow/
├── config.py          # Configuration and theme settings
├── main.py            # Entry point and REPL loop
├── ping.py            # Internet connectivity check
├── tui.py             # Terminal UI helpers
├── requirements.txt   # Python dependencies
├── install.sh         # Installer script
├── Online/
│   ├── commands.py    # Online mode commands
│   ├── player.py      # VLC streaming player
│   └── youtube.py     # YouTube search and download
└── Offline/
    ├── commands.py    # Offline mode commands
    ├── file.py        # Library scanner and search
    └── player.py      # Local file player

License

MIT

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

flow_twinx-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

flow_twinx-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file flow_twinx-0.1.0.tar.gz.

File metadata

  • Download URL: flow_twinx-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for flow_twinx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 199bfa1732558d4ad3ab8e9a99cdc7d5719df857c6690cbae05af23e808ea5a4
MD5 d4cd08339485068d90cf0c06a36c2ae7
BLAKE2b-256 578c91d7cefebcd1436acff6b6443befac540be7b39a0dfd2458bc9bd1117a6f

See more details on using hashes here.

File details

Details for the file flow_twinx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flow_twinx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for flow_twinx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65bf7d8a463213b02410d01a571d8db8e5236c632388ea8938c2fedfba7ed4cb
MD5 61420f04d7de9ecee9b0de5fd1e42852
BLAKE2b-256 0bbc2b2fab19cbf0a063dd63575d55119d6e89ff9d09e0880aaa81e6e23fc207

See more details on using hashes here.

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