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 through pip:

pip install flow-twinx

Note: Make sure you have python installed

Usage

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

Or direct if you have used pypi

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/
├── flow_twinx/                 # Main application package
│   ├── __init__.py
│   ├── config.py               # Configuration, themes, paths
│   ├── imports.py              # Central import hub
│   ├── main.py                 # Entry point / CLI
│   ├── ping.py                 # Connection checker
│   ├── tui.py                  # Terminal UI helpers (colors, banner, input)
│   ├── Online/                 # Online streaming mode
│   │   ├── __init__.py
│   │   ├── commands.py         # Online command handlers
│   │   ├── player.py           # VLC-based stream player
│   │   └── youtube.py          # YouTube search & download via yt-dlp
│   └── Offline/                # Offline local library mode
│       ├── __init__.py
│       ├── commands.py         # Offline command handlers
│       ├── file.py             # Local file & library management
│       ├── player.py           # VLC-based local file player
│       └── youtube.py          # Placeholder
├── pyproject.toml              # Package metadata & build config
├── requirements.txt            # Dependencies (python-vlc, yt_dlp)
└── README.md

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.3.0.tar.gz (14.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.3.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flow_twinx-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f18ff6e4a54bbaa86426c0d058bbaa8676a93eacf9d376fed8262d477aecfc99
MD5 a0ec20685405cda7bcd54950a4b4a123
BLAKE2b-256 e8860979d40dc23ab93af00bfa563552e292a9ab0d55da800d8bd4afc75c7c21

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for flow_twinx-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acfb63cce160c1e1345b67c2bcf62223e117d984edcef1643f37e05aa6568e83
MD5 c042d5a19affd4c4d80405637deaa6cb
BLAKE2b-256 03bbdfeb9e73826c73330edfb448d44090b464fd392049e322fa7b7e55187b22

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