โญโโฎ
โฑ โฒ
โ โโโ โ
โ โ
โ โ
โKEFIRโ
โฐโโโโโโฏ
A rich, full-featured command-line interface for controlling KEF wireless speakers with an interactive TUI mode and speaker profile management.
Note: Kefir offers the same features in the form of a beautiful macOS menu bar app.
Disclaimer: This project is not affiliated with, authorized by, endorsed by, or in any way officially connected with KEF Audio or its subsidiaries. All product names, trademarks and registered trademarks are property of their respective owners.
- Speaker Profiles: Save and manage multiple speaker configurations
- Interactive Mode: Real-time control with keyboard shortcuts and live status updates
- Rich CLI UI: Color-coded output, progress bars, and formatted tables
- Smart Defaults: Automatically use your default speaker without specifying IP
- Configuration Management: Settings saved to
~/.config/kefir/
- Power Management: Turn speakers on/off
- Volume Control: Set levels, mute/unmute with visual progress bars
- Source Selection: Switch between WiFi, Bluetooth, Optical, etc.
- Playback Control: Play/pause, skip tracks, view now playing info
- Status Dashboard: View comprehensive speaker status at a glance
brew tap melonamin/formulae
brew install kefirDownload the latest release from the releases page:
cd KefirCLI
swift build -c release
sudo cp .build/release/kefir /usr/local/bin/# Add a speaker profile
kefir speaker add "Living Room" 192.168.1.100 --default
# List configured speakers
kefir speaker list# Use default speaker (no IP needed!)
kefir volume set 50
kefir source set bluetooth
kefir play pause
# Or specify a speaker by name
kefir volume set 30 "Bedroom"
# Or use IP directly for one-off commands
kefir power on 192.168.1.101# Enter interactive control mode
kefir interactive
# Or for a specific speaker
kefir interactive "Living Room"The interactive mode provides a real-time control interface with auto-refresh every 5 seconds:
๐ต KefirCLI - Living Room
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 52%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโStatusโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Power: ON โญโโฎ โ
โ Source: Bluetooth โฑ โฒ โ
โ โ โโโ โ โ
โ Now Playing: โ โ โ
โ Title: Dangerous โ โ โ
โ Artist: Sleep Token โKEFIRโ โ
โ Album: Even In Arcadia โฐโโโโโโฏ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ/โ volume โข space play/pause โข โ/โ tracks โข h help
- โ/โ or +/-: Adjust volume (5% steps)
- Shift+โ/โ: Fine volume control (1% steps)
- m: Toggle mute
- SPACE: Play/pause
- โ/โ: Next/previous track
- s: Change input source
- p: Toggle power
- r: Manual refresh
- h or ?: Show help
- q or Ctrl+C: Quit
# Add a new speaker
kefir speaker add <name> <host> [--default]
# List all speakers
kefir speaker list
# Remove a speaker
kefir speaker remove <name>
# Set default speaker
kefir speaker set-default <name># Set volume (0-100)
kefir volume set <level> [speaker]
# Get current volume
kefir volume get [speaker]
# Mute/unmute
kefir volume mute [speaker]
kefir volume unmute [speaker]# Power on/off
kefir power on [speaker]
kefir power off [speaker]# Set input source
kefir source set <source> [speaker]
# Get current source
kefir source get [speaker]
# List available sources
kefir source listAvailable sources: wifi, bluetooth, tv, optic, coaxial, analog, usb
# Play/pause toggle
kefir play pause [speaker]
# Skip tracks
kefir play next [speaker]
kefir play previous [speaker]
# Get track info
kefir play info [speaker]# Get speaker information
kefir info [speaker]
# Get current status (default command)
kefir status [speaker]
kefir [speaker] # Same as status# Configure theme
kefir config theme --enable-colors --enable-emojis
kefir config theme --disable-colors --disable-emojis
# Show config location
kefir config showKefirCLI stores its configuration in ~/.config/kefir/config.json:
{
"speakers": [
{
"id": "UUID",
"name": "Living Room",
"host": "192.168.1.100",
"isDefault": true,
"lastSeen": "2024-01-15T10:30:00Z"
}
],
"theme": {
"useColors": true,
"useEmojis": true
}
}#!/bin/bash
# morning-music.sh
# Turn on living room speakers
kefir power on "Living Room"
# Set comfortable morning volume
kefir volume set 25 "Living Room"
# Switch to Bluetooth for phone
kefir source set bluetooth "Living Room"# Check all speakers
for speaker in $(kefir speaker list | grep -E '^\s+\w+' | awk '{print $1}'); do
echo "=== $speaker ==="
kefir status "$speaker"
done- macOS 10.15+
- Swift 6.1+
- KEF wireless speaker on the same network
- KEF LSX II
- KEF LS50 Wireless II
- KEF LS60
# Debug build
swift build
# Release build
swift build -c release
# Run directly
swift run kefir speaker listContributions are welcome! Please feel free to submit pull requests.
MIT License - see LICENSE file for details.