cliamp README

The project's README from github.com/bjarneo/cliamp. As one markdown file: README.md.

Docs on contextowl.co

A retro terminal music player inspired by Winamp. Play local files, streams, podcasts, YouTube, YouTube Music, SoundCloud, Mixcloud, Bilibili, Spotify, NetEase Cloud Music, Yandex Music, Xiaoyuzhou (小宇宙), Navidrome, Lyrion, Plex, Jellyfin, and Audiobookshelf. Use the spectrum visualizer, parametric EQ, and playlist manager.

cliamp.stream | docs

cliamp uses Bubbletea, Lip Gloss, Beep, and go-librespot.

https://github.com/user-attachments/assets/fbc33d20-e3ac-4a62-a991-8a2f0243c8ea

Proudly sponsored by contextowl.co

Install

curl -fsSL https://cliamp.stream/install.sh | sh

Homebrew

brew install bjarneo/cliamp/cliamp

The formula installs all required runtime libraries.

Arch Linux (AUR)

yay -S cliamp

Nix

nix run github:bjarneo/cliamp

For a declarative NixOS configuration, add github:bjarneo/cliamp as a flake input. Install its default package:

inputs.cliamp.url = "github:bjarneo/cliamp";

environment.systemPackages = [
  inputs.cliamp.packages.${pkgs.stdenv.hostPlatform.system}.default
];

Go

go install github.com/bjarneo/cliamp@latest

Install ALSA development headers before you build on Linux. See Building from source.

Pre-built binaries

Download from GitHub Releases.

macOS: Pre-built binaries link dynamically to FLAC, Vorbis, Ogg, and mpg123 from Homebrew. If you download from Releases or use install.sh, install these libraries first. Otherwise, you can see errors such as Library not loaded: /opt/homebrew/opt/libvorbis/lib/libvorbisenc.2.dylib:

brew install flac libvorbis libogg mpg123

brew install bjarneo/cliamp/cliamp installs these libraries.

Linux: Pre-built binaries link FLAC, Vorbis, Ogg, and mpg123 statically. No extra codec packages are required. You can still need an ALSA bridge for your sound server. See Troubleshooting.

Windows: Download and extract cliamp-windows-amd64.zip from Releases. It includes the codec DLLs that Spotify requires. If HOME is not set, cliamp stores its config under %APPDATA%\cliamp.

Optional runtime dependencies for all platforms and install methods:

On macOS, run brew install ffmpeg yt-dlp. On Linux, use your distribution package manager.

On Windows, install ffmpeg and yt-dlp with your package manager. Keep both on PATH.

Build from source

git clone https://github.com/bjarneo/cliamp.git && cd cliamp && go build -o cliamp .

Quick Start

cliamp ~/Music                     # play a directory
cliamp *.mp3 *.flac               # play files
cliamp https://example.com/stream  # play a URL

Press Ctrl+K to see all keybindings.

Configure remote providers such as Navidrome, Lyrion, Plex, Jellyfin, Audiobookshelf, Spotify, Mixcloud, YouTube Music, and NetEase Cloud Music with the interactive wizard:

cliamp setup

The wizard guides you through each provider. It writes the required block to your config file (~/.config/cliamp/config.toml, or %APPDATA%\cliamp\config.toml on Windows when HOME is unset). It validates supported server connections during setup. It checks optional Mixcloud browser-session or OAuth credentials when you use them. See docs/cli.md for details.

See the Mixcloud provider guide for discovery, account, creator/show, genre search, local genre favorites, authentication, signed-in playback, resume, seeking, and limitations.

For podcast discovery and subscriptions, run cliamp --provider podcast. Browse Apple's top 100 shows and 19 categories, search with / then Enter, and subscribe with f. No account or API key is needed. See the Podcasts guide.

Radio

Press R in the player to browse about 58,000 online radio stations in the Radio Browser directory.

Cut that down by location or genre: N browses by country, Browse genres & tags opens the directory's complete tag index, and / filters either list. f pins the countries you listen to, and Enter on a country or tag loads its stations as a playlist. cliamp does not work out where you are unless you pick "Use my location" and accept; it then reads your country from the system timezone, never from a geo-IP service. See docs/radio.md.

Add your own stations to ~/.config/cliamp/radios.toml (or %APPDATA%\cliamp\radios.toml on Windows when HOME is unset). See docs/configuration.md.

To host a radio station, use cliamp-server.

Building from source

Prerequisites:

Linux (Debian/Ubuntu):

sudo apt install libasound2-dev libflac-dev libvorbis-dev libogg-dev libmpg123-dev

Linux (Fedora):

sudo dnf install alsa-lib-devel flac-devel libvorbis-devel libogg-devel mpg123-devel

Linux (Arch):

sudo pacman -S alsa-lib flac libvorbis libogg mpg123

macOS: brew install flac libvorbis libogg mpg123 pkg-config

Windows: The core player needs no extra SDKs. It uses pure-Go audio decoding. ffmpeg.exe and yt-dlp.exe remain optional runtime dependencies for the same formats and providers as other platforms.

Spotify support uses go-librespot. It needs CGO and a MinGW toolchain:

  1. Install MSYS2.
  2. Open the MSYS2 MinGW64 terminal, not the standard MSYS2 terminal. Install the toolchain and codec libraries:
    pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config \
      mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis \
      mingw-w64-x86_64-flac mingw-w64-x86_64-mpg123
    
  3. In that MinGW64 terminal, build with CGO enabled. This keeps gcc and pkg-config on PATH:
    CGO_ENABLED=1 go build -o cliamp.exe .
    
    Some MSYS2 libogg builds provide libogg-0.dll without ogg_stream_iovecin in its export table. The static libogg.a has this symbol. If linking fails with undefined reference to 'ogg_stream_iovecin', use static linking for this library only:
    CGO_LDFLAGS="-Wl,-Bstatic -logg -Wl,-Bdynamic" CGO_ENABLED=1 go build -o cliamp.exe .
    
  4. cliamp.exe links dynamically to codec and MinGW runtime DLLs. Keep C:\msys64\mingw64\bin on PATH at runtime, or copy each /mingw64/bin/*.dll that ldd cliamp.exe shows next to cliamp.exe.

Clone and build:

git clone https://github.com/bjarneo/cliamp.git
cd cliamp
make && make install

Or without Make: go build -o cliamp .

make install places the binary in ~/.local/bin/.

Optional runtime dependencies:

Docs

Full documentation is hosted at whiterose.org.contextowl.co/docs/cliamp.

Troubleshooting

No audio output

cliamp reports audio output unavailable when it cannot open an output device. On Linux systems that use PipeWire or PulseAudio, the cliamp ALSA backend needs a bridge package to route audio through the sound server:

Install the package for your system:

# PipeWire (Arch)
sudo pacman -S pipewire-alsa

# PulseAudio (Arch)
sudo pacman -S pulseaudio-alsa

# Debian/Ubuntu (PipeWire)
sudo apt install pipewire-alsa

# Debian/Ubuntu (PulseAudio, including WSL2)
sudo apt install libasound2-plugins

On WSL2 see WSL2 setup for the extra ALSA routing step.

Author

x.com/iamdothash

Disclaimer

Use this software at your own risk. The authors are not responsible for damage or issues that result from its use.

cliamp (bjarneo/cliamp)

Searching Database…

4.5K ·GitHub
这是什么?cliamp 是一款受 Winamp 启发的复古终端音乐播放器。它既能播放本地文件,也能播放来自 YouTube、Spotify、SoundCloud、Navidrome、Jellyfin、Plex 等服务的流媒体和网络电台,全部在终端界面里完成。
这是图形界面应用,还是在终端里运行?它是在 shell 里运行的终端(TUI)应用,而不是带窗口的图形界面;界面用 Bubbletea 和 Lip Gloss 构建,音频播放则用 Beep 加 go-librespot。
怎么安装 cliamp?可以通过 Homebrew(brew install bjarneo/cliamp/cliamp)、Arch 的 AUR、Nix flake、go install 或 GitHub Releases 上的预编译二进制安装,也可以用 go build -o cliamp . 从源码构建。
除了 cliamp 本身还需要安装什么?在 Linux 上,编译需要 ALSA 开发头文件,要真正听到声音还需要一个 ALSA 桥接(pipewire-alsa 或 pulseaudio-alsa)。可选的 ffmpeg 负责处理 AAC/ALAC/Opus/WMA,yt-dlp 则可从 YouTube、SoundCloud、Bilibili 等平台拉取音频。
安装上有什么需要留意的坑吗?预编译的 macOS 二进制动态链接了 Homebrew 提供的 FLAC、Vorbis、Ogg 和 mpg123,所以必须先安装这些库,否则播放会报 'Library not loaded' 错误。在 Windows 上构建 Spotify 支持需要 CGO 和完整的 MSYS2 MinGW 工具链。
cliamp 的电台功能会追踪我的位置吗?cliamp 只会从系统时区推断你所在的国家,而且只有当你为按国家浏览电台而明确勾选“使用我的位置”时才会这样做。
cliamp 支持播客吗?支持——运行 cliamp --provider podcast 即可浏览 Apple 在 19 个分类下的前 100 档节目,还能搜索和订阅,无需账号或 API key。
我能浏览多少个电台?在播放器里按 R 可以打开 Radio Browser 目录中约 58,000 个在线电台,可按国家或流派筛选,也支持搜索。
播放器本身有哪些播放功能?除了常规的播放控制,播放器还带频谱可视化、参数均衡器和播放列表管理器。
怎么连接 Navidrome 或 Spotify 这类服务?交互式设置向导会带你逐一配置各个远程服务(Navidrome、Plex、Jellyfin、Spotify、Mixcloud 等),写入配置块,并在设置过程中验证连接。
Creator
bjarneo
Size
10.4 MB
Stars
4.5K
Age
7mo
Commits · 90 Days