MCPcopy Index your code
hub / github.com/bjarneo/cliamp-server

github.com/bjarneo/cliamp-server @v1.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.0 ↗ · + Follow
157 symbols 350 edges 26 files 102 documented · 65%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cliamp-server

An internet radio streaming server written in Go. Shoutcast/ICY compatible, multi-station, live metadata, on-the-fly transcoding, ad injection, GeoIP tracking, and listener statistics.

Point it at a directory of audio files and it starts broadcasting.

Looking for the client? See cliamp.

Quick Start

go build
./cliamp-server --music /path/to/your/mp3s

Open http://localhost:8000/radio/stream in VLC or any Shoutcast-compatible player.

Multi-Station

Create ~/.config/cliamp-server/config.toml:

[server]
port = 8000

[stations.pop]
name = "Pop Station"
path = "/music/pop"
shuffle = true

[stations.jazz]
name = "Jazz Station"
path = "/music/jazz"
shuffle = true
./cliamp-server

Each station gets its own stream at /<id>/stream.

Docker

docker build -t cliamp-server .
docker run -d -v /path/to/music:/music:ro -p 8000:8000 cliamp-server --music /music

Documentation

  • Configuration — CLI flags, TOML config, station options
  • API — Stream endpoints, status endpoints, response format
  • Features — Audio format support, ad scheduling, GeoIP, listener statistics
  • Deployment — Docker, nginx reverse proxy

License

See LICENSE file.

Extension points exported contracts — how you extend this code

TrackSource (Interface)
TrackSource is anything that can supply the next track to play. Both *Playlist and scheduler.Scheduler implement this in [4 …
playlist/source.go
DisconnectHook (FuncType)
DisconnectHook is called after a listener is removed from the hub. It receives the station ID and a snapshot of the disc
broadcast/hub.go

Core symbols most depended-on inside this repo

Next
called by 7
playlist/source.go
Close
called by 6
stats/stats.go
readByte
called by 5
mp3frame/reader.go
Done
called by 5
broadcast/listener.go
AddListener
called by 5
broadcast/hub.go
Write
called by 5
icy/writer.go
Listeners
called by 4
broadcast/hub.go
RemoveListener
called by 4
broadcast/hub.go

Shape

Method 64
Struct 58
Function 33
FuncType 1
Interface 1

Languages

Go100%

Modules by API surface

stats/stats.go15 symbols
broadcast/hub.go15 symbols
handler/status.go12 symbols
config/config.go11 symbols
broadcast/listener.go11 symbols
handler/statistics.go10 symbols
server/server.go7 symbols
mp3frame/reader.go7 symbols
playlist/playlist.go6 symbols
handler/playlist_pls.go6 symbols
broadcast/ringbuf.go6 symbols
transcode/transcode.go5 symbols

For agents

$ claude mcp add cliamp-server \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact