Skip to content

Dawn-Fighter/tra-cli

Repository files navigation

tra-cli

A unified CLI wrapper for streaming movies, TV shows, and anime — powered by luffy and ani-cli.

GitHub stars GitHub forks GitHub issues Go License Platform PRs Welcome


Overview

tra-cli is a powerful terminal-based streaming CLI tool that unifies your movie, TV show, and anime watching experience. Built in Go, this command-line interface eliminates context switching by wrapping luffy and ani-cli into a single, seamless tool with unified watch history tracking.

Stream your favorite content directly from the terminal with zero browser overhead, multiple streaming provider support, and full control over your viewing experience.


Why tra-cli?

The Problem

  • Switching between multiple CLI streaming tools (luffy for movies/TV, ani-cli for anime) breaks your workflow
  • Separate watch histories make it hard to track what you've watched
  • Different command syntaxes increase cognitive load
  • No unified interface for all streaming content types

The Solution

tra-cli provides:

  • Single command for all content types — movies, TV shows, and anime
  • 📜 Unified watch history — track everything you've watched in one place
  • 🎯 Zero context switching — consistent CLI interface across all providers
  • 🚀 Blazing fast — written in Go with minimal overhead
  • 🎬 Multiple providers — automatic fallback when content isn't available
  • 🔧 Terminal-native — works perfectly over SSH, in tmux, or any terminal emulator
  • 🌐 Cross-platform — Linux, macOS, and Windows (WSL2) support

Perfect for developers, sysadmins, and power users who live in the terminal and want a frictionless streaming experience.


📺 Demo

See tra-cli in action:

Anime Streaming

Stream your favorite anime with interactive episode selection and playback controls.

Anime Streaming Watching One Piece with tra-cli - Interactive menu with next/previous/replay options

CLI Interface

Simple, intuitive command-line interface that works beautifully in any terminal.

CLI Interface Searching for anime using tra-cli -a "one piece" - Clean terminal UI with fzf integration

Movie & TV Streaming

Stream movies and TV shows with the same unified interface.

Movie Streaming Streaming movies/TV shows with playback controls - Seamless mpv integration


Table of Contents


Features

Feature Description
🎬 Movies & TV Shows Stream via luffy with multiple provider support (braflix, flixhq, vidsrc, and more)
🎌 Anime Streaming Stream via ani-cli with dub/sub selection and quality options
📜 Unified Watch History Single, consolidated watch history across both tools — track everything in one place
Single CLI Interface One binary, one command syntax — no mental overhead or context switching
🔍 Interactive Search Built-in fuzzy finder (fzf) for browsing and selecting content interactively
🎯 Provider Fallback Automatic provider switching when content isn't available on your primary source
💻 Terminal Native Works flawlessly in SSH sessions, tmux, screen, or any terminal emulator
🌍 Cross-Platform Full support for Linux, macOS, and Windows (via WSL2)
🛠️ Easy Installation Automated install script handles all dependencies and setup
🔧 Highly Configurable Choose providers, quality settings, and playback options via CLI flags

Dependencies

Before installing tra-cli, ensure the following are available on your system:

  • Go 1.21+
  • mpv — media player
  • fzf — fuzzy finder
  • curl
  • luffy — movies/TV backend (auto-installed)
  • ani-cli — anime backend (auto-installed)

Installation

Quick Install (Recommended)

Linux / macOS:

git clone https://github.com/Dawn-Fighter/tra-cli
cd tra-cli
go build -o tra-cli .
./tra-cli install

Windows (PowerShell):

git clone https://github.com/Dawn-Fighter/tra-cli
cd tra-cli
go build -o tra-cli.exe .
.\tra-cli.exe install

The installer automatically:

  • Detects your OS (Linux, macOS, Windows)
  • Installs luffy via Scoop (Windows), Homebrew (macOS), or go install (Linux)
  • Installs ani-cli via Scoop (Windows), source (Linux/macOS)
  • Checks for required dependencies (mpv, fzf, etc.)
  • Copies tra-cli to your PATH

Important

ani-cli on Windows requires running in Git Bash (via Windows Terminal), not PowerShell/CMD. For the best experience and to avoid "mpv not found" issues, refer to the ani-cli Windows guide. The installer will print setup guidance for this.

On macOS, both luffy and ani-cli work best with the IINA media player (brew install --cask iina).

Note: On Windows, ani-cli must be run from Git Bash (via Windows Terminal). See the ani-cli Windows guide for setup.

For platform-specific setup details and the most up-to-date dependency requirements, check the upstream READMEs:

Manual Installation

1. Install system dependencies

# Debian / Ubuntu
sudo apt install mpv fzf curl yt-dlp

# Arch Linux
sudo pacman -S mpv fzf curl yt-dlp

# macOS
brew install fzf curl yt-dlp && brew install --cask iina

# Windows (Scoop)
scoop install mpv fzf curl yt-dlp

2. Install luffy

# All platforms (requires Go)
go install github.com/demonkingswarn/luffy@latest

# Windows alternative
scoop bucket add demon-apps https://github.com/DemonKingSwarn/flix-cli-bucket.git
scoop install luffy

# macOS alternative
brew tap gamedevCloudy/tools && brew install luffy

3. Install ani-cli

# Linux / macOS
curl -sL https://github.com/pystardust/ani-cli/raw/master/ani-cli -o ~/.local/bin/ani-cli
chmod +x ~/.local/bin/ani-cli

# Windows
scoop bucket add extras && scoop install ani-cli

4. Build and install tra-cli

go build -o tra-cli .
cp tra-cli ~/.local/bin/           # Linux / macOS
# Or on Windows: copy tra-cli.exe to a directory in your PATH

Windows Note for Anime

Important

To watch anime with this tool on Windows, you must run it inside a Git Bash environment (included with Git for Windows). For detailed steps on setting up the best terminal environment for anime on Windows, please read the official ani-cli Windows section.

macOS Note

Tip

On macOS, the installer recommends IINA as the preferred media player for both movies and anime. You can install it via Homebrew: brew install --cask iina.

Usage

Quick Start

Stream a movie or TV show:

tra-cli "breaking bad"

Stream anime:

tra-cli -a "one piece"

View your watch history:

tra-cli -H

Movies & TV Shows (via luffy)

The default mode uses luffy to stream movies and TV shows from multiple providers.

# Search and stream movies or TV shows
tra-cli "breaking bad"
tra-cli "inception"
tra-cli "the office"

# Interactive mode (browse without a query)
tra-cli

# Use a specific streaming provider
tra-cli -p braflix "inception"
tra-cli -p flixhq "stranger things"

# Search with provider fallback
tra-cli "obscure indie film"  # Tries default provider, falls back if needed

Supported Providers: braflix, flixhq, sflix, vidsrc, vidsrcto, showbox, and more.


Anime Streaming (via ani-cli)

Use the -a or --anime flag to switch to anime mode.

# Search and stream anime
tra-cli -a "one piece"
tra-cli -a "attack on titan"

# Interactive anime mode
tra-cli -a

# Watch with English dub
tra-cli -a "naruto" --dub
tra-cli -a "demon slayer" --dub

# Continue watching from history
tra-cli -a  # Select from your recent anime

Watch History

Track everything you've watched across both movies/TV and anime.

# View unified watch history (movies, TV, and anime)
tra-cli -H

# Continue watching from where you left off
tra-cli -H  # Select a title to resume

The unified history feature automatically merges watch records from:

  • luffy — SQLite database (~/.local/share/luffy/history.db)
  • ani-cli — Text-based history (~/.local/share/ani-cli/watch_history.txt)

Command-Line Options

tra-cli [OPTIONS] [QUERY]

Options:
  -a, --anime              Switch to anime mode (uses ani-cli)
  -p, --provider string    Select streaming provider (luffy mode only)
      --dub                Use dubbed audio (anime mode only)
  -H, --history            View unified watch history
  -h, --help               Show help information
      --version            Show version information

Examples

Search for a movie with a specific provider:

tra-cli -p braflix "the matrix"

Watch anime in dubbed format:

tra-cli -a "my hero academia" --dub

Browse your watch history and continue watching:

tra-cli -H

Interactive mode for discovering new content:

# Movies/TV
tra-cli

# Anime
tra-cli -a

Provider Notes

Available luffy providers: braflix, flixhq, sflix, vidsrc, vidsrcto, showbox, and more.

Content not found? Try a different provider with -p <provider>. Not all providers carry every title.

ISP blocking? Some providers may be blocked by your ISP. Switch to Cloudflare WARP or change your DNS resolver.


Project Structure

tra-cli/
├── main.go
├── cmd/
│   └── root.go              # CLI commands & flags
├── internal/
│   ├── wrapper/
│   │   ├── luffy.go         # Luffy integration
│   │   └── anicli.go        # Ani-cli integration
│   ├── history/
│   │   ├── luffy.go         # Luffy history parser
│   │   ├── anicli.go        # Ani-cli history parser
│   │   └── unified.go       # Merged history view
│   └── config/
│       └── config.go        # Configuration management
├── install.sh               # One-shot install script
├── Makefile
└── go.mod

Development

# Build
go build -o tra-cli .

# Install to $GOPATH/bin
go install

# Run tests
go test ./...

Contributing

We welcome contributions! Whether you're fixing bugs, adding features, improving documentation, or suggesting ideas, your input makes tra-cli better for everyone.

How to contribute:

If tra-cli saves you time or makes your terminal streaming experience better, please consider giving the repo a ⭐ — it helps others discover the project!


License

MIT © Dawn-Fighter

See LICENSE for full details.


Acknowledgments

tra-cli is built on the shoulders of giants:

  • luffy — Powerful CLI for movies and TV shows
  • ani-cli — Legendary anime streaming CLI
  • Cobra — Modern CLI framework for Go
  • fzf — Blazing fast fuzzy finder
  • mpv — The best terminal media player

Keywords

clistreamingmoviestv-showsanimeterminalgolangmpvluffyani-clicommand-lineunified-historycross-platformlinuxmacoswindowswsl2terminal-appstreaming-clianime-streamingmovie-streaming


Made with ❤️ by terminal enthusiasts, for terminal enthusiasts

⭐ Star this repo🐛 Report Bug💡 Request Feature