Skip to content

n-anselm/ytui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

██╗   ██╗████████╗██╗   ██╗██╗
╚██╗ ██╔╝╚══██╔══╝██║   ██║██║
 ╚████╔╝    ██║   ██║   ██║██║
  ╚██╔╝     ██║   ██║   ██║██║
   ██║      ██║   ╚██████╔╝██║
   ╚═╝      ╚═╝    ╚═════╝ ╚═╝

A terminal UI for downloading videos and audio using yt-dlp.

Disclaimer: This application was developed with the assistance of AI using OpenCode. It is provided “as is” without any warranty, express or implied, including but not limited to accuracy, reliability, or fitness for a particular purpose. The developer assumes no responsibility for any consequences resulting from its use. Users should independently verify any information and use the application at their own risk.

Features

  • Clipboard integration - automatically detects URLs in clipboard
  • Interactive TUI built with Bubble Tea and huh
  • Video/Audio download selection
  • Resolution selection: 720p, 1080p, 1440p, 4K
  • Format selection: MP4, MKV, WebM (video) / MP3, M4A, FLAC, WAV (audio)
  • Custom download folder
  • Desktop notifications on completion/error
  • Automatic fallback if requested resolution unavailable
  • Embeds thumbnail and metadata

Requirements

  • yt-dlp installed
  • FFmpeg for merging video+audio and audio conversion
  • notify-send for desktop notifications (usually comes with libnotify)
  • Clipboard tools: wl-paste, xclip, or xsel (for clipboard detection)

Arch Linux Installation

pacman -S yt-dlp ffmpeg libnotify
# For clipboard support (choose one):
pacman -S wl-clipboard      # Wayland
pacman -S xclip             # X11
pacman -S xsel              # X11 alternative

Installation

Build from Source

# Clone and build
git clone https://github.com/yourusername/ytui.git
cd ytui
go build -o ytui

# Or install globally
go install

Build Flags

For a smaller binary:

go build -ldflags="-s -w" -o ytui

For a static binary (requires musl-gcc):

CGO_ENABLED=1 CC=musl-gcc go build -ldflags="-linkmode external -extldflags -static" -o ytui

Usage

  1. Copy a video URL to your clipboard
  2. Run ytui
  3. If URL is detected in clipboard, it will be pre-filled
  4. Follow the prompts:
    • Confirm URL (or enter manually if not detected)
    • Choose Video or Audio
    • Select resolution (for video)
    • Select format
    • Choose download folder (default: ~/Downloads)
    • Press Enter to confirm and download

Keyboard Shortcuts

  • Enter - Confirm selection / Start download
  • ↑/↓ or j/k - Navigate options
  • Ctrl+C - Cancel/Quit
  • R - Retry after error (in error state)

Default Values

Prompt Default
Type Video
Resolution 1080p
Video Format MP4
Audio Format MP3
Download Folder ~/Downloads

Configuration

yt-dlp config file (optional): ~/.config/yt-dlp/config

Example:

--format bv*+ba
--merge-output-format mp4
--embed-thumbnail
--add-metadata

Troubleshooting

"yt-dlp is not installed"

Make sure yt-dlp is in your PATH:

which yt-dlp

No clipboard detection

Install one of: wl-clipboard, xclip, or xsel

No notifications

Make sure notify-send works:

notify-send "Test" "Hello"

About

Interactive TUI for yt-dlp

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages