Note
Before creating an issue, make sure to update luffy
paru -S luffy-binbrew tap gamedevCloudy/tools
brew install --cask iina
brew install luffyMake sure you have scoop.sh installed on your system.
scoop bucket add demon-apps https://github.com/DemonKingSwarn/flix-cli-bucket.git
scoop bucket add extras
scoop install luffyImportant
On windows if you want to use the --show-image, you need to use the wezterm terminal emulator. It is installed as a dependency on windows.
If you have Go installed, you can easily install Luffy:
go install github.com/demonkingswarn/luffy@latest-
Clone the repository:
git clone https://github.com/demonkingswarn/luffy.git cd luffy -
Build and install:
go install .Ensure your
$GOPATH/binis in your system'sPATH.
Install termux (Guide)
pkg up -y
pkg in fzf python-yt-dlp
curl -sL "https://github.com/DemonKingSwarn/luffy/releases/download/v1.1.0/luffy-android-arm64" -o $PREFIX/bin/luffy
chmod +x $PREFIX/bin/luffympv- Video Player for Linux and Windowsvlc- Alternate video player for Linux and Windowsiina- Video Player for MacOSvlc-android- Video Player for Androidyt-dlp- Download managerfzf- For selection menuschafa&libsixel- For poster previews (--show-image)
luffy [query] [flags][query] is the title you want to search for (e.g., "breaking bad", "dune", "one piece"). The query is optional when using --history or --recommend.
| Flag | Alias | Description |
|---|---|---|
--action |
-a |
Action to perform: play (default) or download. |
--season |
-s |
(Series only) Specify the season number. |
--episodes |
-e |
(Series only) Specify a single episode (5) or a range (1-5). |
--best |
-b |
Auto-select the best available quality (skips fzf quality prompt). |
--provider |
-p |
Select provider (e.g. sflix, braflix). Overrides config. |
--history |
-H |
Browse watch history and resume a previous title. |
--recommend |
-r |
Get personalised recommendations based on watch history. |
--show-image |
NA | Show poster previews in fzf (requires chafa and a supported terminal). |
--debug |
-d |
Print debug information (URLs, decryption steps, etc.). |
--help |
-h |
Show help message and exit. |
When watching a TV series, an fzf menu appears alongside the player with four options:
| Action | Description |
|---|---|
| Next | Kill the player and move to the next episode. |
| Previous | Kill the player and move to the previous episode. |
| Replay | Restart the current episode from the beginning. |
| Quit | Kill the player and exit. |
Search & Play a Movie
luffy "dune"Download a Movie
luffy "dune" --action downloadPlay a TV Episode
luffy "breaking bad" -s 1 -e 1Download a Range of Episodes
luffy "stranger things" -s 2 -e 1-5 -a downloadAuto-select Best Quality
luffy "dune" --bestUse a Different Provider
luffy "breaking bad" --provider sflixResume from Watch History
luffy --historyGet Personalised Recommendations
luffy --recommendRecommendations with Poster Previews
luffy --recommend --show-imageThe config file lives at ~/.config/luffy/config.yaml. All fields are optional; defaults are shown below.
# Path to the fzf binary. Set to an absolute path if fzf is not on PATH.
fzf_path: fzf
# Video player: "mpv" (default) or "vlc". IINA is used automatically on macOS.
player: mpv
# chafa rendering backend for poster previews.
# Options: sixel (default), kitty, iterm, symbols
image_backend: sixel
# Default search provider.
provider: flixhq
# Directory where downloaded files are saved. Defaults to home directory.
dl_path: ""
# Quality selection: leave empty to show an fzf prompt, or set to "best"
# to always auto-select the highest available quality.
quality: ""
# Extra arguments appended to every mpv invocation (ignored on VLC/IINA/Android).
# mpv_args:
# - "--hwdec=auto"
# - "--volume=80"
# Lifecycle hooks — shell commands run at key playback events.
# LUFFY_TITLE, LUFFY_URL, LUFFY_SEASON, LUFFY_EPISODE, LUFFY_EP_NAME,
# LUFFY_PROVIDER, LUFFY_ACTION, LUFFY_STREAM_URL, and LUFFY_POSITION
# are set in the environment for every hook.
# hooks:
# on_play: 'notify-send "Now playing" "$LUFFY_TITLE"'
# on_exit: 'echo "$LUFFY_TITLE stopped at ${LUFFY_POSITION}s" >> ~/luffy.log'
# on_download: 'notify-send "Downloading" "$LUFFY_TITLE"'Important
To see poster images, your terminal emulator must support a graphics protocol. Supported terminals include kitty, ghostty, WezTerm, and foot (sixel).
If you use kitty or ghostty, set image_backend: kitty in your config.
Shell commands can be run at three lifecycle points, and extra mpv flags can be injected via config. See docs/hooks.md for the full reference.
Extra arguments appended verbatim to every mpv invocation (ignored on VLC / IINA / Android):
mpv_args:
- "--hwdec=auto"
- "--volume=80"hooks:
on_play: 'notify-send "Now playing" "$LUFFY_TITLE"'
on_exit: 'echo "$LUFFY_TITLE stopped at ${LUFFY_POSITION}s" >> ~/luffy.log'
on_download: 'notify-send "Downloading" "$LUFFY_TITLE"'Every hook receives LUFFY_TITLE, LUFFY_URL, LUFFY_SEASON, LUFFY_EPISODE, LUFFY_EP_NAME, LUFFY_PROVIDER, LUFFY_ACTION, LUFFY_STREAM_URL, and LUFFY_POSITION as environment variables.
You can set the default provider in the config file (~/.config/luffy/config.yaml) or override it per-run with --provider.
| Provider | provider: value |
Notes |
|---|---|---|
| FlixHQ | flixhq |
Default |
| Sflix | sflix |
|
| Braflix | braflix |
|
| Movies4u | movies4u |
Bollywood only |
| YouTube | youtube |
Streams/downloads via yt-dlp |
| Allanime | allanime |
For anime |
| HDRezka | hdrezka |
Experimental — may not always work |
Example config:
provider: sflix