Skip to content
magmacrunchmedia edited this page Aug 9, 2026 · 6 revisions

magmascript

Scripting toolkit with domain-first subcommands for managing magmacrunch.com infrastructure.

Quick Start

Install

Via Homebrew (recommended):

brew install magmacrunchmedia/tap/magmascript

Via pip:

pip install magmascript

From source:

git clone https://github.com/magmacrunchmedia/magmascript.git
cd magmascript
pip install -e ".[all]"

Configure

export MAGMA_API_KEY="your-mcp-key"        # for mcp domain
export GITHUB_TOKEN=$(gh auth token)        # for gh domain
# pi domain works with no config (SSH key auth)

Use

magmascript mcp scoreboards      # game leaderboards
magmascript pi status            # Pi service statuses
magmascript gh workflows         # GitHub Actions status
magmascript rights search "Farewell"  # look up ISRC/ISWC

Domains

Domain Transport What it does
MCP Domain JSON-RPC MusicBrainz cache, scores, Discogs, jukebox/themes/TV
Pi Domain SSH Service management, logs, backups
GitHub Domain HTTPS Workflows, issues, sync
Rights Domain JSON-RPC ISRC, ISWC, ASCAP lookup
Scores Domain SSH Game high scores, reset
Media Domain HTTPS Multi-provider search
Cache Domain Local Cache management

Features

  • Caching — File-based cache with TTL (24h media, 1h scores, 5min GitHub)
  • Error handling — Typed exceptions (SSHError, APIError, etc.)
  • Write operations — Edit jukebox, themes, TV channels + deploy to GitHub
  • Score management — Reset scores with automatic timestamped backups
  • GitHub sync — Diff local data vs remote, commit all changes atomically
  • CI/CD — Tests run on every push to Python 3.11, 3.12, 3.13

Further Reading

Clone this wiki locally