Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

luffy

> 开发工具
Open source

Spiritual successor of flix-cli and mov-cli

199 stars0 likes3 views
WebsiteGitHub

About

Spiritual successor of flix-cli and mov-cli

LUFFY

Spiritual successor of flix-cli and mov-cli.


Overview

  • Installation
    • Arch Linux
    • NixOS / Nix / MacOS
    • Debian-based or Ubuntu-based
    • Fedora
    • MacOS
    • Windows
    • Go Install
    • Build from Source
    • Android Installation
  • Dependencies
  • Usage
    • Flags
    • Playback Controls
    • Examples
  • Configuration
  • Hooks & MpvArgs
    • MpvArgs
    • Hooks
  • Providers

[!NOTE] Before creating an issue, make sure to update luffy

Installation

1. Arch Linux

bash
paru -S luffy-bin

2. NixOS / Nix / MacOS

Run without installing

bash
nix run github:DemonKingSwarn/luffy

Install into profile

bash
nix profile install github:DemonKingSwarn/luffy

NixOS flake input

nix
inputs.luffy.url = "github:DemonKingSwarn/luffy";

environment.systemPackages = [ inputs.luffy.packages.${system}.luffy ];

3. Debian-based or Ubuntu-based

bash
curl -fsSL https://demonkingswarn.is-a.dev/debmon-repo/pubkey.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/debmon-repo.gpg

echo "deb [arch=amd64] https://demonkingswarn.is-a.dev/debmon-repo stable main" | sudo tee /etc/apt/sources.list.d/debmon-repo.list

sudo apt update

sudo apt install -y luffy

4. Fedora

bash
echo '[fedmon-repo]
name=fedmon-repo
baseurl=https://demonkingswarn.is-a.dev/fedmon-repo/rpms
enabled=1
gpgcheck=1
gpgkey=https://demonkingswarn.is-a.dev/fedmon-repo/pubkey.gpg' | sudo tee /etc/yum.repos.d/fedmon-repo.repo

sudo dnf update

sudo dnf install -y luffy

5. MacOS

bash
brew tap gamedevCloudy/tools
brew install --cask iina
brew install luffy

6. Windows

Make sure you have scoop.sh installed on your system.

bash
scoop bucket add demon-apps https://github.com/DemonKingSwarn/flix-cli-bucket.git
scoop bucket add extras
scoop install luffy

[!IMPORTANT] 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.

7. Go Install

If you have Go installed, you can easily install Luffy:

bash
go install github.com/demonkingswarn/luffy@latest

8. Build from Source

  1. Clone the repository:

    bash
    git clone https://github.com/demonkingswarn/luffy.git
    cd luffy
  2. Build and install:

    bash
    go install .

    Ensure your $GOPATH/bin is in your system's PATH.

9. Android Installation

Install termux (Guide)

bash
pkg up -y
pkg in fzf python-yt-dlp
curl -sL "https://github.com/DemonKingSwarn/luffy/releases/download/v1.2.1/luffy-android-arm64" -o $PREFIX/bin/luffy
chmod +x $PREFIX/bin/luffy

Dependencies

  • mpv - Video Player for Linux and Windows
  • vlc - Alternate video player for Linux and Windows
  • iina - Video Player for MacOS
  • mpv-android - Video Player for Android
  • yt-dlp - Download manager
  • fzf - For selection menus
  • chafa & libsixel - For poster previews (--show-image)

Usage

bash
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.

Flags

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.

Playback Controls

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.

Examples

Search & Play a Movie

bash
luffy "dune"

Download a Movie

bash
luffy "dune" --action download

Play a TV Episode

bash
luffy "breaking bad" -s 1 -e 1

Download a Range of Episodes

bash
luffy "stranger things" -s 2 -e 1-5 -a download

Auto-select Best Quality

bash
luffy "dune" --best

Use a Different Provider

bash
luffy "breaking bad" --provider sflix

Resume from Watch History

bash
luffy --history

Get Personalised Recommendations

bash
luffy --recommend

Recommendations with Poster Previews

bash
luffy --recommend --show-image

Configuration

The config file lives at ~/.config/luffy/config.yaml. All fields are optional; defaults are shown below.

…

[!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.

Hooks & MpvArgs

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.

MpvArgs

Extra arguments appended verbatim to every mpv invocation (ignored on VLC / IINA / Android):

yaml
mpv_args:
  - "--hwdec=auto"
  - "--volume=80"

Hooks

yaml
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.

Providers

You can set the default provider in the config file (~/.config/luffy/config.yaml) or override it per-run with --provider.

Provider provider: value Content Notes
Cinejoy cinejoy Movies & TV Default. Browser-free sealed resolver; auto-races Lisbon/Nebula/Solara.
Anime (sub) anime or allanime Anime Subtitled. Uses AllAnime.
Anime (dub) anime-dub or allanime-dub Anime Dubbed. Uses AllAnime.

Legacy cineby/vidking/videasy configs keep working and resolve via Cinejoy; the Videasy backend is being discontinued. Example config:

yaml
provider: cinejoy

Debugging

Run any command with --debug (-d) to print detailed information:

bash
luffy "breaking bad" -s 1 -e 1 --debug

Debug output includes:

  • The embed URL being resolved
  • The master m3u8 URL
  • The referer header used
  • Number of subtitle tracks found
  • The exact mpv command being run

If playback fails, the debug output is almost always enough to diagnose the problem.


Before Opening an Issue

Please try these steps first:

  1. Update luffy — most issues are already fixed in the latest version.

    bash
    go install github.com/demonkingswarn/luffy@latest
  2. Run with --debug and read the output — it usually tells you exactly what failed.

  3. Try a different title — the content may be unavailable on the provider.

  4. Check the Discord — someone may have already reported the same issue.

If none of the above helps, open an issue and include:

  • The exact command you ran
  • The full --debug output
  • Your OS and luffy version (luffy --version if available, or git log -1 --oneline)
  • Whether the issue is with a movie or TV show, and the title

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Cclicommandlinedownloadflix-cli

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具