Cava: trying to make a spectrum analyser look good in a terminal
Cross-platform Audio Visualizer
At a glance
- What is it?
- A C program that reads audio through whichever backend your system has, runs it through FFTW, and draws bars with SDL or ncurses.
- Who is it for?
- Version 1.0.0 was released in June 2026. What you get is a program with ten documented capture methods, an SDL desktop output with a shader set documented in SHADERS.md, a terminal fallback for machines with no graphics stack, and a library other programs can link against.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 14 days ago.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- karlstav/cava6,557 ★ · +92
| Repository | 2026-10-07 | 2026-11-25 |
|---|---|---|
| karlstav/cava | 6.5k | 6.6k |
92 Stars in the last 49 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
A spectrum analyser, and an honest disclaimer about it
The README describes cava as a bar spectrum audio visualizer for terminal or desktop using SDL. The name expands to Cross-platform Audio Visualizer, and the author is Karl Stavestrand.
What it is not is stated just as plainly: this program is not intended for scientific use. It is written to look responsive and aesthetic when visualizing music. That sentence matters more than it first appears, because it sets expectations about accuracy. A tool that prioritises how bars look will make choices an FFT tool used for measurement would not.
The platforms listed are Linux, FreeBSD, macOS and Windows.
There is also a demo video linked from the README, and a link to documentation for dumb terminals, which is the project name for terminals with no graphics capability at all.
The audio backend you get depends on your system
This is the part that makes cava portable, and it is the part that makes building it harder. The README documents capture methods for Pipewire, Pulseaudio, ALSA, MPD, sndio, OSS, JACK, squeezelite, macOS and Windows.
Pipewire is the default input method where supported, with the default source set to `auto`, which will usually be your currently selected output. Under WirePlumber you can use `wpctl` to find the object path or serial of a specific device. The config file is where the method is chosen:
method = pipewireOn macOS, Core Audio is built in and needs no extra capture library, which is why the build requirements section singles that case out.
A useful note in the build docs: only FFTW, iniparser and the build tools are strictly required, but that minimum only gives you the ability to read from fifo files. Capturing audio directly needs development files for whichever backend you actually use.
Build dependencies and distro packages
Required components are FFTW, libtool, automake, pkgconf, build essentials and iniparser. Recommended are the development libraries for one audio framework, and optionally SDL2 dev files for the desktop renderer, autoconf-archive for OpenGL, and ncursesw for the terminal fallback.
Each supported distro gets its own package line in the README, from `pacman -S cava` on Arch to `sudo apt install cava` on Debian 12 and Ubuntu 20.10 or newer, `dnf install cava` on Fedora 26 and later, `zypper in cava` on openSUSE Tumbleweed, `pkg install cava` on FreeBSD, and `brew install cava` on macOS.
Building from source is the usual autotools sequence:
./autogen.sh
./configure
makeIndividual features can be disabled at configure time, which matters if you are cross-compiling. CMake is available, and is the documented path on Windows through vcpkg, but autoconf and automake remain the default supported build system.
Cavacore, raw output and the SDL renderer
The repository separates the visualizer from the visualizer. `cavacore.c` and `cavacore.h` hold the audio processing, documented separately in `CAVACORE.md`, and there is a `cavacore_test.c` alongside `run_all_tests.sh`. `input/` and `output/` are the backend directories. There is also a raw output mode for using cava in other applications.
Output options are more than one. Cava draws in a terminal or on the desktop through SDL, and `SHADERS.md` documents the shader set. ncurses is the alternative when the default output has problems, and `TERMINAL.md` covers the no-graphics case.
Ten years, then a version number
The 1.0.0 release is dated 2026-06-13.
Before it came 0.10.7 in January 2026 and 0.10.6 in September 2025.
The repository was pushed to on 2026-11-01, with 12 open issues and 302 forks. The license is MIT.
Editorial conclusion
Version 1.0.0 was released in June 2026. What you get is a program with ten documented capture methods, an SDL desktop output with a shader set documented in SHADERS.md, a terminal fallback for machines with no graphics stack, and a library other programs can link against. Install it from your distribution package rather than source, because the build requirements are real. Then read the config file, where all capture options are set.
Frequently asked questions
What is cava in Linux?
Cava is a bar spectrum audio visualizer written in C that runs in a terminal or in an SDL window. It runs on Linux, FreeBSD, macOS and Windows, captures audio through whichever backend your system provides such as Pipewire, Pulseaudio or ALSA, and is packaged in most major distributions.
How does Cava work in Linux?
It reads audio from a configured capture backend, runs the samples through an FFT using FFTW, and maps frequency bins onto bars. The capture method is chosen in the config file, with Pipewire as the default where it is supported and a default source of auto, which normally follows your current output device.
Which audio backends does cava support?
The README documents capture methods for Pipewire, Pulseaudio, ALSA, MPD, sndio, OSS, JACK, squeezelite, macOS Core Audio and Windows. Only FFTW, iniparser and build tools are strictly required to compile, but that minimum only reads from fifo files rather than capturing live audio.
Does cava need a graphical environment?
No. Cava runs in a terminal or on the desktop through SDL, and ncurses is available as an alternative output when the default has problems, and the project documents support for dumb terminals with no graphics capability at all. Shaders documented in SHADERS.md apply to the SDL renderer.
Official sources
Was this useful?