cava
Visualize audio in terminal
TLDR
Start the visualizer
Use the specified configuration file
Increase/Decrease sensitivity
Increase/Decrease the number of bars
Reload the configuration file (this resets the number of bars and sensitivity)
Reload colors from the configuration file
Cycle the foreground/background color
Quit
SYNOPSIS
cava [options]
PARAMETERS
-p, --config FILE
Path to config file (default: $XDG_CONFIG_HOME/cava/config)
--client-id ID
PulseAudio client identifier (default: cava)
--color FG,BG
Foreground and background colors (default: white,black)
--colors N c1 … cN
N bar colors from c1 to cN
--gradient COUNT r1 g1 b1 …
Smooth gradient from specified RGB colors
--wave COUNT r1 g1 b1 …
Smooth wave gradient colors
--fps-limit FPS
Framerate cap (default: 60)
--framerate N
Average updates per second (default: 60)
--samplerate RATE
Audio sample rate (default: 44100)
--bits BITS
Bits per sample (default: 16)
--raw
Read raw PCM from stdin
--audio-system {alsa,pulse,null,file,fifo}
Backend (default: pulse)
--driver DRIVER
Specific driver (e.g., hw:0 for ALSA)
--mixer {none,MIXER}
Mixer to control (default: none)
--alsa-dev DEVICE
ALSA device (default: default)
--pulse-host HOST
PulseAudio host (default: unix:nofail)
--fifo FILE
FIFO/pipe path for output
--fifo-format FORMAT
FIFO data format (default: 32bit float LE)
--input-file FILE
Path to input audio file
--lows FREQ
Low frequency border (default: 0)
--highs FREQ
High frequency border (default: 20000)
--height LINES
Display height in lines (default: 10)
--scale {linear,sqrt,log,cuberoot}
Frequency scaling (default: sqrt)
--smoothing S
Smoothing coefficient (0-1, default: 0.8)
DESCRIPTION
CAVA (Console-based Audio Visualizer for ALSA and PulseAudio) displays audio spectrum as colored vertical bars in the terminal. It captures live audio via ALSA, PulseAudio, PipeWire, or FIFO input, supporting features like smoothing, logarithmic scaling, gradients, waves, and energy modes (e.g., Monstercat). Highly customizable through a config file or command-line options for bar dimensions, colors, framerate, frequency ranges, and more. Ideal for music players like ncmcpp, MPD, or tiling window managers with status bars. Cross-platform (Linux, BSD, macOS, Windows via MSYS2), lightweight, and dependency-minimal. Outputs to stdout for embedding or FIFO for external use like polybar/i3blocks. No GUI required, runs in any terminal emulator supporting 256/truecolor.
CAVEATS
Requires terminal height >= --height and width for bars; audio group membership for capture; truecolor support for full gradients; high CPU on low-end hardware at max FPS.
CONFIGURATION
Edit ~/.config/cava/config for [general], [smoothing], [colors], [bar], [gradient] sections. Supports %gradient, %wave presets.
Example: bar_width = 5
FIFO USAGE
Enable output_fifo = /tmp/cava in config; read floats from FIFO for external bars (e.g., polybar script).
Format: 32-bit float LE per frequency bin.
HISTORY
Created in 2015 by Karl Jørgensen as a modern successor to conky's audio visualizer. Actively maintained on GitHub; v0.9+ added PipeWire, truecolor, energy modes. Widely used in ricing communities.


