docs/src/installation.md

84c4617332578aaf4e9ee68a0a2d7d6258e48243
youtube-tui/docs/src/installation.md rendered · source · history · blame · raw

143 lines · 4856 bytes

16 symbols in this file
  1# Installation
  2
  3The YouTube TUI supports both Linux and Windows.
  4
  5## Install from Crates.io (recommended)
  6
  7Crates.io is a repository for programs written in Rust, and the YouTube TUI is available <a href="https://crates.io/crates/youtube-tui" target=_blank>*there*</a>.
  8
  9To install using this method, you will need `rustc` and `cargo` present. <a href="https://www.rust-lang.org/tools/install" target=_blank>*Here*</a>'s a tutorial on how to get them.
 10
 11Now, run the following command:
 12
 13```sh
 14cargo install youtube-tui
 15```
 16
 17> To check and update all programs installed from Crates.io, you can use CLI tools like <a href="https://crates.io/crates/cargo-update" target=_blank>*cargo-update*</a>.
 18
 19## AUR for Arch Linux (recommended)
 20
 21The YouTube TUI is available in the AUR <a href="https://aur.archlinux.org/packages/youtube-tui-git" target=_blank>*here*</a>.
 22
 23Use an <a href="https://aur.archlinux.org" target=_blank>AUR</a> helper like <a href="https://aur.archlinux.org/packages/yay" target=_blank>`yay`</a> to install.
 24
 25```sh
 26yay -S youtube-tui # lastest crates.io release, recommended
 27yay -S youtube-tui-git # latest git version, potentially untested
 28yay -S youtube-tui-full-bin # default binary (out of date)
 29yay -S youtube-tui-nodefaults-bin # minimal binary (out of date)
 30```
 31## Installation on NixOS  (recommended)
 32
 33Add the following Nix code to your NixOS Configuration
 34
 35```nix 
 36environment.systemPackages = [
 37  pkgs.youtube-tui
 38];
 39```
 40
 41##  Installation on NixOS **with flakes** (recommended)
 42
 43```nix
 44{
 45    inputs.youtube-tui.url = "github:Siriusmart/youtube-tui";
 46
 47    ...
 48}
 49```
 50
 51## Build from source
 52
 53Use the `cargo` command:
 54
 55```sh
 56cargo install --git https://github.com/siriusmart/youtube-tui
 57```
 58
 59### Confirm YouTube TUI has been installed
 60
 61Run the following command in terminal:
 62
 63```sh
 64youtube-tui
 65```
 66
 67If installed correctly, a TUI should be launched. Press `q` to close the TUI.
 68
 69## Installation on Windows
 70
 71Install using `cargo` exactly as you would on Linux:
 72
 73```sh
 74cargo install youtube-tui
 75```
 76
 77All default features work on Windows. On the first build, the `mpv` feature will automatically download the required `libmpv` dev library (~30MB) and place `libmpv-2.dll` next to the installed binary — no manual steps needed.
 78
 79Prerequisites:
 80- [Rust / cargo](https://www.rust-lang.org/tools/install)
 81- [MSVC build tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) ("Desktop development with C++" workload) — required to compile Rust on Windows
 82- Internet access on the first build (to download `libmpv`)
 83
 84To build without the embedded mpv audio player (skips the download):
 85
 86```sh
 87cargo install youtube-tui --no-default-features -F sixel -F halfblock -F clipboard -F rustypipe
 88```
 89
 90### Windows configuration
 91
 92The default config directory on Windows is `%APPDATA%\youtube-tui\`. Data files (history, thumbnails, etc.) are stored in `%LOCALAPPDATA%\youtube-tui\`.
 93
 94Default tools on Windows:
 95- **Browser**: `explorer` (opens URLs in default browser)
 96- **Terminal emulator**: `cmd /c start cmd /k`
 97- **Shell**: `cmd`
 98
 99These can be changed in `main.yml`.
100
101## Features
102
103The TUI has features that can be enabled/disabled when compiling.
104
105```sh
106cargo install youtube-tui # install with all default features
107cargo install youtube-tui --no-default-features -F feature1 -F feature2 # install with only the specified features
108cargo install youtube-tui --all-features # install with all features (even if not included in default)
109```
110
111### `halfblock` (default)
112
113Display images through HalfBlocks, work best in terminals with TrueColour support.
114
115### `sixel` (default)
116
117Display images with Sixels, allows the display of images at full definition.
118
119On Linux, this uses the C `libsixel` library for best performance (requires <a href="https://github.com/saitoha/libsixel" target=_blank>`libsixel`</a>). On Windows, a pure Rust encoder is used automatically (no native dependencies).
120
121### `clipboard` (default)
122
123Allows clipboard pasting in commands and search bar.
124
125On Linux, requires <a href="https://xcb.freedesktop.org/" target=_blank>`libxcb`</a>. On Windows, uses native clipboard APIs (no extra dependencies).
126
127### `mpv` (default)
128
129Embedded audio player.
130
131On Linux, requires <a href="https://mpv.io/" target=_blank>`libmpv`</a> to be installed (`libmpv-dev` on Debian/Ubuntu, `mpv` on Arch).
132
133On Windows, the build system downloads `libmpv` automatically on first build and copies `libmpv-2.dll` next to the installed binary. No manual steps are required.
134
135### rustypipe (default)
136
137Rustypipe backend for fetching video information, Rustypipe runs on your local machine, it's a bit like yt-dlp.
138
139### invidious
140
141invidious backend for fetching video information, requires a working Invidious instance with API enabled set in [`main.yml`](./config/main.md).
142
143> You *must* enable at least one of the two backends.