Skip to main content

Flow

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

Features

  • Dual-mode operation — It will automatically detect internet and switch 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 n times or play in random order
  • Like/unlike — Toggle favorites on/off, stored in ~/.flow/liked.json
  • Playlist play — Create playlists and play them with playlist play <name>
  • Tab completion — Auto-complete commands and song names in offline mode
  • Colored TUI — Cyan theme for online, magenta for offline, with borders and banners
  • Background play — Play music in background and return to your shell
  • Audio-reactive bars — Real-time spectrum analyzer with configurable width, height, and spacing
  • Synced lyrics — Display color-coded lyrics that scroll with the song
  • Gui for GUI lovers - Get a gui in web using flask for you to enjoy

Requirements

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

Installation

git clone https://github.com/Philast-015/Flow.git
cd flow
uv run flow_twinx/main.py

Or through pip:

pip install flow-twinx
flow

Note: Make sure vlc is installed it can break on some PC but mostly work without vlc.

Usage

flow

OR if you cloned the repo:

cd flow_twinx
uv run main.py

Flags

Flag Description
-bg Play in background and exit to shell
-kill Kill all background VLC processes
-i Use it in help command to show detailed help
-s Use it shuffle or play random songs
-r Use it to repeat songs no of time [ -r n ] [ -r ] ( n = no of times )
-d Use it to download songs

Shell Mode

Run commands directly from your shell without entering interactive mode. Play-like commands (-pl, -rd) automatically run in background.

flow -pl never gonna give you up    # play (auto-bg)
flow -rd daft punk                  # radio (auto-bg)
flow -sh daft punk                  # search (show results, exit)
flow -kill                          # kill VLC

Also works with positional commands:

flow play never gonna give you up
flow radio daft punk
flow search daft punk

Shell shortcuts use your user-defined shortcuts with - prefix:

flow -svn hello                     # svn → savan
flow -dl never gonna give you up    # dl → download

Gui Mode:

To launch gui mode just type :

flow --web

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 Like/unlike the currently playing song
download <name or #> Save a streamed song to the local library
delete <name or #> Delete a downloaded song (alias: dl-d)
radio <name> [#] Radio mix (online) or shuffle-loop library (offline)
playlist <sub> Manage playlists (create/add/remove/play)
export Backup ~/.flow config to ~/Downloads
switch Toggle between online and offline mode
help Show available commands
help -i Show available commands with detailed explanation

Config Options

Target Description Range
primary Color for online songs Any color
secondary Color for offline songs Any color
tertiary Color for labels Any color
display Playback display mode none, bars, lyrics
barwidth Number of bars in visualizer 4-80
barheight Height of bars 2-16
barspacing Space between bars 0-4

Usage: config <target> <value>

Configuration

  • Downloads and library are stored in ~/.flow/downloads/
  • Liked songs (online) are saved to ~/.flow/liked.json
  • Liked songs (offline) are copied to ~/.flow/downloads/liked songs/
  • User shortcuts are stored in ~/.flow/shortcuts.json
  • Config file: ~/.flow/config.json

Project Structure

flow/
├── flow_twinx/
│   ├── __init__.py
│   ├── config.py
│   ├── imports.py
│   ├── main.py
│   ├── ping.py
│   ├── tui.py
│   ├── lyrics.py               # Synced lyrics fetching
│   ├── visualizer.py           # Audio-reactive bars
│   ├── Online/
│   │   ├── __init__.py
│   │   ├── commands.py
│   │   ├── player.py
│   │   └── youtube.py
│   └── Offline/
│       ├── __init__.py
│       ├── commands.py
│       ├── file.py
│       ├── player.py
│       └── youtube.py
├── pyproject.toml
└── README.md

License

Use however you want just mention me for inspiration.

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.5.2.tar.gz (85.3 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.5.2-py3-none-any.whl (91.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flow_twinx-0.5.2.tar.gz
Algorithm Hash digest
SHA256 3d8c9bd34e5a1c913efc521eb449d7525165cb8d678b5fc8ad089883657accf0
MD5 72af3c9becf6d8cd46c8f720b956c2c4
BLAKE2b-256 d0b5841b52f46e230ee0b71f9b6477e5356c1d010946d07107cf5e4610d6f5ac

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for flow_twinx-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3d3ce481c68112969ce12b7f61e20554bcf523208fea0e6216e359b8aa2f6fac
MD5 a7b1066ef766bc1c8c8f9c1b9c070eb2
BLAKE2b-256 1c5c363c2532c5bdbc79cf51ce0dac355b015c5e1e7b8058e9619f037412b92e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.1

2 files

0.6.0

2 files

0.5.9

2 files

0.5.8

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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