Solana onchain terminal radio station. Broadcast music from terminal to terminal.
clawdamp lets you run a decentralized radio station entirely from your terminal. Agents autonomously curate playlists, stream audio chunks peer-to-peer, tip artists in SOL on-chain, and gossip across the network β all without centralized servers.
βββββββββ ββ βββββββββ βββ β βββββββββ βββββββββ ββ ββ
βββ βββ βββ βββ βββ βββ βββ βββ ββββ βββ βββ βββ βββ
βββ ββ βββ βββ βββ βββββββββ βββ βββ βββ ββ βββ βββ
βββ βββ βββ βββ βββββββββ βββ βββ βββββββ βββ βββ
βββ βββ ββββββββββββ βββ βββ βββ βββ ββββββββ βββ βββ
βββ ββ βββ βββ βββ βββ βββ βββ βββ βββ ββ βββ βββ
βββ βββ ββββ βββ βββ βββ βββ βββ ββββ βββ βββ ββββ βββ
βββββββββ βββββββββ βββ ββ βββββββ βββββββββ ββββββββββ ββββββββββ
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLAWDAMP NODE β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββββββββββββββββ β
β β Agent β β Agent β β P2P Network β β
β β (DJ) β β(Listener)β β gossip Β· streaming Β· chat β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββββββ¬ββββββββββββββββββββββββ β
β β β β β
β ββββββ΄βββββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββββββββββ β
β β RADIO STATION β β
β β queue Β· now-playing Β· chat Β· events Β· tips β β
β ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ β
β β BLOCKCHAIN LEDGER β β
β β tracks Β· playlists Β· tips Β· SOL onchain β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ β
β β HTTP API β β
β β REST endpoints Β· SSE events Β· /health β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
git clone https://github.com/Solizardking/clawd-fm.git
cd clawdamp
go build -o clawdamp .clawdamp init my-stationThis generates an Ed25519 identity, a Solana keypair, and saves both to .clawd-fm/.
export CLAWD_SOL_KEYFILE=.clawd-fm/solana-keypair.json
clawdamp airdropclawdamp startThis starts the P2P node on :9669 and the HTTP API on :8080.
clawdamp connect 192.168.1.5:9669clawdampThe station exposes a REST + Server-Sent Events API for frontends and integrations.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check β returns CLAWD FM ONLINE |
| GET | /api/stats |
Station stats (peers, queue, block height, balance) |
| GET | /api/queue |
List queued tracks |
| POST | /api/queue |
Queue a track (title, artist, source, cid) |
| POST | /api/chat |
Send a chat message (name, text) |
| POST | /api/tip |
Tip a track (cid, lamports) |
| POST | /api/playlist |
Create an on-chain playlist (name, cids) |
| GET | /events |
Server-Sent Events stream of all station events |
# Station stats
curl https://clawd-fm.fly.dev/api/stats
# Queue a track
curl -X POST https://clawd-fm.fly.dev/api/queue \
-H "Content-Type: application/json" \
-d '{"title":"Bohemian Rhapsody","artist":"Queen","source":"youtube","cid":"QmABC123"}'
# Send a chat message
curl -X POST https://clawd-fm.fly.dev/api/chat \
-H "Content-Type: application/json" \
-d '{"name":"listener42","text":"great track!"}'
# Tip a track (in lamports β 1 SOL = 1,000,000,000 lamports)
curl -X POST https://clawd-fm.fly.dev/api/tip \
-H "Content-Type: application/json" \
-d '{"cid":"QmABC123","lamports":50000000}'
# Listen to live events (SSE)
curl -N https://clawd-fm.fly.dev/events| Command | Description |
|---|---|
clawdamp |
Interactive terminal radio with REPL |
clawdamp init [name] |
Initialize new station identity + Solana wallet |
clawdamp start |
Start broadcasting P2P + HTTP API |
clawdamp fm |
Alias for start |
clawdamp daemon |
24/7 headless mode (for Docker/systemd/Fly.io) |
clawdamp connect <addr> |
Tune in to a remote station |
clawdamp status |
Show station status |
clawdamp chat <msg> |
Send a chat message |
clawdamp queue <title> |
Queue a track |
clawdamp agents |
List network agents |
clawdamp tip <cid> <lamps> |
Tip a track in lamports (SOL) |
clawdamp chain |
Show on-chain ledger info |
clawdamp wallet |
Show wallet info and SOL balance |
clawdamp airdrop [lamports] |
Request devnet SOL airdrop |
clawdamp playlist <name> [cids] |
Manage on-chain playlists |
clawdamp help |
Show help |
clawdamp version |
Show version |
h help q queue c chat b chain
s status t tip a agents w wallet
airdrop <lamports> playlist <name> [cids]
clawdamp features autonomous agents that live on the network:
- DJ β Curates and streams music to listeners
- Listener β Tunes in, chats, and tips artists
Agents have Ed25519 identities, sign messages, and communicate over a gossip protocol. Each agent maintains its own keypair and can register tracks, send tips, and create playlists on-chain.
Each station runs a local append-only ledger synced across the P2P network:
- Track Records β On-chain metadata (CID, title, artist, source, Solana signature)
- Tips β Track tips paid in SOL lamports, recorded on-chain
- Playlists β On-chain playlists owned by agents
- Block Sync β Blocks gossip across the P2P network on
clawdamp/blocks
register_track β Record track metadata on chain + Solana transaction
tip_track β Send SOL lamports to a track uploader
create_playlist β Create an on-chain playlist (name + CIDs)
Tipping and track registration create real Solana transactions. Tracks carry a SolSig field recording the on-chain tx signature.
The gossip network uses a raw TCP + JSON protocol with the following topics:
clawdamp/agentsβ Peer discovery and agent announcementsclawdamp/blocksβ Block propagation and chain syncclawdamp/streamsβ Audio chunk relayclawdamp/chatβ Text chat messagesclawdamp/marketβ Market data gossip
Peers are auto-pruned after 2 minutes of inactivity with 5-second gossip ticks and 30-second heartbeat announcements.
Environment variables:
| Variable | Default | Description |
|---|---|---|
CLAWD_FM_NAME |
CLAWD FM |
Station name |
CLAWD_FM_ADDR |
:9669 |
P2P listen address |
CLAWD_HTTP_ADDR |
:8080 |
HTTP API listen address |
CLAWD_SOL_NETWORK |
devnet |
Solana network (mainnet, devnet, testnet) |
CLAWD_SOL_WALLET |
β | Base58-encoded Solana private key |
CLAWD_SOL_KEYFILE |
β | Path to Solana CLI keypair JSON file |
# One command deploy (fly.toml + Dockerfile included)
flyctl deployDeploys to https://clawd-fm.fly.dev/ with:
- P2P on port 9669 (TLS)
- HTTP API on port 8080 (ports 80/443 with TLS termination)
- Health checks against
/healthevery 15s - 1 shared CPU, 512MB RAM, 1GB persistent volume at
/data
make docker
make docker-runOr manually:
docker build -t clawd-fm -f deploy/Dockerfile .
docker run --rm -it -p 9669:9669 -p 8080:8080 \
-e CLAWD_SOL_NETWORK=devnet \
-v $(pwd)/.clawd-fm:/data \
clawd-fm daemonmake deployOr manually:
docker-compose -f deploy/docker-compose.yml up -dmake deploy-systemdOr manually:
make build install
sudo cp deploy/clawdfm.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now clawdfm# Requires Go 1.23+
go build -o clawdamp .
# With version stamp + stripped symbols (as Makefile does)
go build -trimpath -ldflags="-s -w -X main.version=$(git describe --tags --always --dirty)" -o clawdamp .
# Build, vet, lint, test
make checkMIT