television
A blazing fast fuzzy finder TUI built around the concept of 'channels' — search files, git history, environment variables, and any custom data source from one interface.
television (or tv) is a fast, extensible fuzzy finder for the terminal built
around the concept of channels. A channel is any source of items to search —
files, git branches, git log, environment variables, processes, Docker images,
and more. You switch between channels on the fly, each with its own preview,
keybindings, and behaviour.
It is built in Rust on top of Tokio for async I/O and uses a custom fuzzy matching engine for near-instant results even on very large datasets.
Features
- Channel-based — each data source (files, git log, env vars, etc.) is a first-class channel with its own preview and behaviour; switch between them with a keystroke
- Fast — asynchronous backend means results stream in without blocking the UI, even for slow sources
- Rich previews — syntax-highlighted file previews via the same engine as
bat; contextual previews for git commits, env vars, and more - Shell integration — integrates with bash, zsh, and fish for
ctrl+rhistory search andctrl+tfile picking, replacingfzfin those keybindings - Remote control — a cable system allows other programs to drive
televisionas a selection backend - Extensible — custom channels can be defined in the config file using arbitrary shell commands as data sources
- Keyboard-driven — vim-style navigation, configurable keybindings throughout
Installation
cargo install television
Or via your system package manager:
# macOS
brew install television
# Arch Linux
pacman -S television
# Nix
nix-env -iA nixpkgs.television
Pre-built binaries are available on the releases page.
# Debian / Fedora
# Pre-built Linux binaries (.deb and .rpm) are available on the
# [releases page](https://github.com/alexpasmantier/television/releases).Usage
# Open the file channel (default)
tv
# Open a specific channel
tv files
tv git-log
tv git-branches
tv env
# Pipe input into television for arbitrary fuzzy selection
cat /etc/hosts | tv stdin
# Use as a selection backend in a script
selected=$(ls /usr/bin | tv stdin)
echo "You selected: $selected"Shell integration
Add television to your shell for ctrl+r history and ctrl+t file picking:
# bash (~/.bashrc)
eval "$(tv init bash)"
# zsh (~/.zshrc)
eval "$(tv init zsh)"
# fish (~/.config/fish/config.fish)
tv init fish | source
Once set up:
Ctrl+ropens the shell history channelCtrl+topens the file channel
Built-in Channels
| Channel | Description |
|---|---|
files | Fuzzy search files under the current directory |
text | Search file contents (like a fuzzy ripgrep) |
git-log | Browse and search git commit history |
git-branches | Switch git branches interactively |
git-diff | Browse changed files in the working tree |
env | Search environment variables and their values |
stdin | Accept arbitrary piped input |
alias | Search shell aliases |
Custom Channels
Define your own channels in ~/.config/television/config.toml:
[[channel]]
name = "docker-images"
source_command = "docker images --format '{{.Repository}}:{{.Tag}}'"
preview_command = "docker inspect {}"
[[channel]]
name = "brew-packages"
source_command = "brew list"
preview_command = "brew info {}"
[[channel]]
name = "todos"
source_command = "rg --line-number 'TODO|FIXME' --color never"
preview_command = "bat --highlight-line {2} {1}"Keybindings
| Key | Action |
|---|---|
| Type | Filter results |
↑ / ↓ or Ctrl+k / Ctrl+j | Navigate results |
Enter | Select item |
Tab | Multi-select |
Ctrl+p | Toggle preview pane |
Ctrl+s | Switch channel |
Esc | Quit |
television vs fzf
fzf is a general-purpose fuzzy filter that accepts any piped input.
television is higher-level: each channel is a self-contained unit with its own
data sourcing, preview rendering, and contextual behaviour built in. You get a
richer out-of-the-box experience for common tasks (files, git, history) without
writing shell pipelines, while still being able to define arbitrary custom
channels when you need to.