go-prapi

command module
v0.9.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 9 Imported by: 0

README

pulse-remote

test Pipewire test PulseAudio audit tidy

Pulse Remote Backend

A simple and powerful PulseAudio Remote API for Linux systems.

What is this?

go-prapi is a backend implementation for pulse-remote written in Go. It provides a WebSocket-based API to control and gather information from PulseAudio devices and sinks.

Features

  • Works with Linux PulseAudio and PipeWire
  • WebSocket communication for real-time updates
  • Control volume, mute status, and audio outputs
  • Retrieve information about audio cards and sinks

Quick Start

  1. Clone the repository
  2. Run the server:
  3. The server will start on ws://localhost:8448/api/v1/ws

Frontend

An actively developed frontend for this API is available at pulse-remote-web.

To use the frontend:

  1. Build the pulse-remote-web project
  2. Copy or symlink the build output to the frontend folder in this project

Example (if pulse-remote-web is in a sibling directory):

ln -s ../pulse-remote-web/dist frontend

API

For detailed API documentation, connect to the WebSocket endpoint and send a GetSchema action.

Development

Check the Makefile for available commands:

  • make help: list all scripts
  • make test: Run tests
  • make build: Build full application
  • make build/be: Build only backend server
  • make build/web: Pull from another repo and build web interface
  • make build/desktop: Pull from another repo and build desktop app
  • make run/watch: Run with auto-reload on file changes

Debugging

Use build it logger. You can set environmental variable DEBUG to filter out or show more logs.

By default it's set to "INFO" or "1".

All available options:

  • "TRACE" or "3"
  • "DEBUG" or "2"
  • "INFO" or "1"
  • "WARN" or "0"
  • "ERR" or "-1"

Example of logger in the code.

logger.Trace().Msg("from logger.Trace") logger.Debug().Msg("from logger.Debug") logger.Info().Msg("from logger.Info") logger.Warn().Msg("from logger.Warn") logger.Error().Msg("from logger.Error") logger.Fatal().Msg("from logger.Fatal") logger.Panic().Msg("from logger.Panic")

CLI snippets

Few useful commands

@TODO (undg) 2025-02-17: clean doc

make install

make uninstall

systemctl --user start pulse-remote.service

systemctl --user set-environment DEBUG=trace # see available options in Debugging section

systemctl --user restart pulse-remote.service

systemctl --user unset-environment DEBUG

journalctl --user -u pulse-remote.service -f --output cat

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
ws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL