Skip to content

Repository files navigation

go-http-client

lfm-cli

Show your fellow gamers and friends what you're listening to on Last.FM without touching a single API Key!

GitHub all releases

Sample Images


Getting Started

lfm-cli works right out of the box - no configuration needed.

Installation

Homebrew (macOS):

brew install twangodev/tap/lfm-cli

Scoop (Windows):

scoop bucket add twangodev https://github.com/twangodev/scoop-bucket
scoop install lfm-cli

Install script (macOS / Linux / FreeBSD):

curl -fsSL https://twango.dev/install/lfm-cli | sh

Linux packages: download the .deb, .rpm, or .apk from the latest release.

Manual: download the archive for your platform from the releases page. Releases include SBOMs and cosign-signed checksums generated on GitHub Actions.

Usage

With Discord open, run the following binary in your console

foo@bar:~$ lfm-cli -u MYUSERNAME

For full reference on flags, run the binary with the -h or --help flag.

Fetch fallback

If the Last.fm website fails, lfm-cli uses https://listening.twango.dev as a fallback, sending it your Last.fm username. You do not need an API key. After two consecutive website failures, a circuit breaker pauses scraping for one minute, then probes for recovery. Healthy requests return to the normal refresh interval.

The fallback caches results for 30–60 seconds, so track changes can take that long to appear. Listening data expires after two minutes without a fresh observation; the CLI clears expired Discord presence. The service may limit requests when its regional Last.fm API budget is exhausted.

Use --fallback-url https://your-service.example for a compatible self-hosted service, or --fallback-url "" to disable fallback. Fallback responses must include observed_at freshness metadata. Loved-track status is unavailable through the fallback; elapsed time starts at the first observation when the actual start time is unknown.

About

Show your Discord friends what your scrobbling on Last.FM with this simple command line program.

Topics

Resources

Code of conduct

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages