πΆ Gurbani Live is a bash script that fetches live Gurbani channels from Sikhnet.com and allows you to play them using VLC. It also provides options to check the online status of channels and stop any ongoing playback.
This project combines the gists I have written together with fzf
If you find this project helpful, please consider giving it a βοΈ on GitHub! It helps others discover the project and motivates me to keep improving it. Thank you!
- Fetch and display live Gurbani channels from Sikhnet.com
- Play selected channels using VLC
- Check the online status of available channels
- Stop VLC playback directly from the command line
- Switch channels between online via CLI
- Favorites System: Mark channels as favorites for quick access
- Quick Play: Instantly resume your last played channel
- Interactive Controls: Stop, background, switch, favorite, and refresh options while playing
The script requires the following tools to be installed:
vlc- VLC Media Player for audio playbackfzf- Fuzzy finder for interactive selectionjq- JSON processor for parsing API responses
macOS (with Homebrew):
brew install vlc fzf jqUbuntu/Debian:
sudo apt-get update && sudo apt-get install -y vlc fzf jqFedora:
sudo dnf install -y vlc fzf jqThe script will automatically check for these dependencies and attempt to install them if they are missing.
- macOS (via Homebrew)
- Fedora (via
dnf) - Ubuntu (via
apt-get)
gurbani-live [options]-
-h, --helpShow the help message and exit -
-s, --stopStop the current VLC playback -
-t, --statusShow the online status of available channels without playing them -
-i, --installInstalls the script to writeable$PATHavailable -
-u, --updateUpdate the insalled script if version mismatch -
-v, --versionShows the version of the installed script -
-q, --quickQuick play the last played channel
completion [bash|zsh]Generate shell completion function
The script includes built-in shell completion for bash and zsh that provides tab completion for all available options.
One-time use:
# For bash
source <(gurbani-live completion bash)
# For zsh
source <(gurbani-live completion zsh)Permanent setup: Add to your shell config file:
# For bash - add to ~/.bashrc
echo 'source <(gurbani-live completion bash)' >> ~/.bashrc
# For zsh - add to ~/.zshrc
echo 'source <(gurbani-live completion zsh)' >> ~/.zshrcAfter enabling completion, you can use <TAB> to complete options:
gurbani-live --<TAB>
# Shows: --help --install --quick --status --stop --update --versionOne-line install (Latest stable release):
curl -sL https://github.com/savitojs/Gurbani-Live/releases/latest/download/gurbani-live | bash -s -- --installOr install development version:
curl -sL https://raw.githubusercontent.com/savitojs/Gurbani-Live/main/gurbani-live | bash -s -- --installThis will:
- β Download and install the latest version
- β Interactive mode: Let you choose installation directory
- β
Non-interactive mode: Auto-install to
~/.local/binor~/bin(when piped from curl) - β Clean up old script names automatically
Note: When using the one-liner method, the script automatically detects it's running non-interactively and will install to a default location (preferring ~/.local/bin, then ~/bin, then the first writable directory in your PATH).
If you prefer to download first and then install:
curl -O https://raw.githubusercontent.com/savitojs/gurbani-live/main/gurbani-live
chmod +x gurbani-live
./gurbani-live --install-
Fetch and Play To fetch and play a channel:
gurbani-live
-
Stop Playback To stop the current playback:
gurbani-live --stop
-
Show Status To show the online status of channels:
gurbani-live --status
-
Quick Play To instantly play your last listened channel:
gurbani-live --quick
When playing a channel, you have access to these interactive controls:
- π Stop (s) - Stop the current playback
- π€ Background (b) - Continue playing in background
- π Switch (c) - Switch to another channel
- β Favorite (f) - Add/remove current channel from favorites
- π» Refresh (r) - Refresh the channel list
The script includes a built-in favorites system:
- Mark Favorites: Press
fwhile playing any channel to add/remove it from favorites - Visual Indication: Favorite channels are marked with β in the channel list
- Persistent Storage: Your favorites are remembered between sessions
The script creates and maintains these files in your home directory:
~/.gurbani_favorites- Stores your favorite channels (one per line)~/.gurbani_last_played- Remembers your last played channel for quick access
These files are automatically created when needed and can be safely deleted to reset preferences.
If you have the old script named gurbani-fetch-n-play, the update process will automatically:
- β
Migrate to the new name
gurbani-live - β Remove the old script file
- β Preserve all functionality
Simply run:
gurbani-fetch-n-play --updateThe script will guide you through the migration process.
- Testing Guide - Comprehensive guide for testing GitHub Actions locally with act and Podman
- Contributing Guidelines - How to contribute to the project
βββ docs/ # Documentation
β βββ TESTING.md # Testing guide
βββ test/ # Test scripts
β βββ test-with-act.sh # GitHub Actions local testing with act
βββ .github/ # GitHub workflows
β βββ workflows/
β βββ release.yml # Release automation
βββ gurbani-live # Main script
βββ gurbani-live-completion.sh # Shell completion
This project is licensed under the MIT License.
Gratitude to Sikhnet for their Gurbani Radio Service
