LFM is a command-line tool for accessing your Last.fm music statistics. This guide will help you install it on your computer.
-
Open PowerShell
- Press
Windows + X - Select "Windows PowerShell" or "Terminal"
- Press
-
Copy and paste this command:
iwr -useb https://raw.githubusercontent.com/Steven-Marshall/lfm/master/install.ps1 | iex
-
Wait for installation (about 30 seconds)
-
Verify installation:
lfm --versionYou should see:
1.5.0(or later)
-
Download the Windows version
- Go to Latest Release
- Download
lfm-windows-x64.exe
-
Create a folder for LFM
mkdir C:\Users\$env:USERNAME\lfm -
Move the downloaded file
- Move
lfm-windows-x64.exetoC:\Users\YourUsername\lfm\ - Rename it to
lfm.exe
- Move
-
Add to PATH
- Press
Windows + R - Type:
sysdm.cpland press Enter - Click "Environment Variables"
- Under "User variables", select "Path"
- Click "Edit" → "New"
- Add:
C:\Users\YourUsername\lfm - Click "OK" on all windows
- Press
-
Restart PowerShell and verify:
lfm --version
- Operating System: Windows 10 or later
- No additional software needed - the self-contained version includes everything
-
Open Terminal
- Press
Cmd + Space - Type "Terminal" and press Enter
- Press
-
Copy and paste this command:
curl -fsSL https://raw.githubusercontent.com/Steven-Marshall/lfm/master/install.sh | bash -
Wait for installation (about 30 seconds)
-
Verify installation:
lfm --version
You should see:
1.5.0(or later)
-
Download the correct version for your Mac
- Go to Latest Release
- Intel Mac: Download
lfm-macos-intel.zip - Apple Silicon (M1/M2/M3): Download
lfm-macos-apple-silicon.zip
Not sure which you have? Open Terminal and type:
uname -m
- If it says
x86_64→ Intel Mac - If it says
arm64→ Apple Silicon
-
Extract the download
- Double-click the downloaded
.zipfile - This creates a file called
lfm(no extension)
- Double-click the downloaded
-
Move to local bin
mkdir -p ~/.local/bin mv ~/Downloads/lfm ~/.local/bin/ chmod +x ~/.local/bin/lfm
-
Add to PATH (if not already there)
For bash (older macOS):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profile
For zsh (macOS Catalina and later):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
-
Verify installation:
lfm --version
- Operating System: macOS 10.15 (Catalina) or later
- No additional software needed - the self-contained version includes everything
-
Open Terminal
- Press
Ctrl + Alt + T(on most distributions)
- Press
-
Copy and paste this command:
curl -fsSL https://raw.githubusercontent.com/Steven-Marshall/lfm/master/install.sh | bash -
Wait for installation (about 30 seconds)
-
Verify installation:
lfm --version
You should see:
1.5.0(or later)
-
Download the Linux version
- Go to Latest Release
- Download
lfm-linux-x64
-
Move to local bin
mkdir -p ~/.local/bin mv ~/Downloads/lfm-linux-x64 ~/.local/bin/lfm chmod +x ~/.local/bin/lfm
-
Add to PATH (if not already there)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
Note: If you use a different shell (zsh, fish, etc.), update the appropriate config file
-
Verify installation:
lfm --version
- Operating System: Most modern Linux distributions (Ubuntu 18.04+, Debian 10+, Fedora 30+, etc.)
- No additional software needed - the self-contained version includes everything
The LFM tool gives you access to:
- Your Last.fm music statistics (top artists, tracks, albums)
- Music recommendations based on your listening
- Spotify playback control (optional)
- Sonos playback control (optional)
- Natural language music queries via Claude (optional MCP integration)
Now that LFM is installed:
- Configure LFM → Quick Start Guide
- (Optional) Setup MCP Server → MCP Setup Guide
On macOS/Linux:
- Make sure
~/.local/binis in your PATH - Try closing and reopening your terminal
- Run the PATH export command from the installation steps
On Windows:
- Make sure you restarted PowerShell after installation
- Check that the folder is in your PATH (see Manual Install step 4)
On macOS/Linux:
chmod +x ~/.local/bin/lfmSee the Troubleshooting Guide for common issues and solutions.
Remove-Item -Recurse C:\Users\$env:USERNAME\lfm
# Then remove from PATH via Environment Variablesrm ~/.local/bin/lfmConfiguration and cache files are stored separately and can be removed with:
# Windows
Remove-Item -Recurse $env:APPDATA\lfm
# macOS/Linux
rm -rf ~/.config/lfm ~/.cache/lfm