Skip to content

Add PowerShell Last.fm OAuth setup script for Windows - #1

Open
demoded wants to merge 3 commits into
aloglu:mainfrom
demoded:feature/windows-powershell-auth-script
Open

Add PowerShell Last.fm OAuth setup script for Windows#1
demoded wants to merge 3 commits into
aloglu:mainfrom
demoded:feature/windows-powershell-auth-script

Conversation

@demoded

@demoded demoded commented Sep 6, 2026

Copy link
Copy Markdown

PR Description

Summary

Adds a native Windows PowerShell script (setup-lastfm.ps1) mirroring the functionality of setup-lastfm.sh. This allows Windows users to complete the Last.fm OAuth authorization flow and configure credentials without needing Bash, curl, jq, or WSL.

Changes & Features

  • Zero External Dependencies: Implements API signing and requests using built-in .NET cryptography (MD5) and Invoke-RestMethod — no external CLI utilities required.
  • Windows Path & Config Detection: Automatically detects the Windows configuration path (%APPDATA%\cliamp\config.toml) while falling back to $HOME\.config\cliamp\config.toml. Also supports a -ConfigFile parameter for custom locations.
  • Safe TOML Handling: Adds or updates credentials specifically within the [plugins.cliamp-lastfm] section without disturbing other plugin configs or file formatting.
  • Enforced HTTPS: Uses HTTPS endpoints for all Last.fm API requests and authentication redirects.
  • Browser Automation: Automatically opens the user's default browser to create API credentials and authorize the application session.

Verification

  • Tested the step-by-step interactive flow on Windows.
  • Verified token retrieval, browser authorization callback, session key exchange, and writing to config.toml.
  • Confirmed successful scrobble

@demoded demoded changed the title Add PowerShell Last.fm OAuth setup script for WindowsFeature/windows powershell auth script Add PowerShell Last.fm OAuth setup script for Windows Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant