SkillAgentSearch skills...

Lastly

Last.fm stats/widgets for your GitHub Profile readme

Install / Use

/learn @ni5arga/Lastly
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Lastly

Lastly is a Next.js project that generates dynamic SVG images showcasing your Last.fm listening statistics. These SVGs are designed to be embedded directly into GitHub READMEs, profiles, or any markdown-supported platform.

It supports multiple endpoints to visualize artists, tracks, albums, and recent activity for any Last.fm user - all rendered server-side as SVGs.

API Endpoints

The project provides the following API endpoints:

| Endpoint | Description | | --------------------- | ------------------------------------------ | | /api/overall | Fetches and visualizes overall statistics | | /api/top-artists | Fetches and visualizes top artists | | /api/top-tracks | Fetches and visualizes top tracks | | /api/top-albums | Fetches and visualizes top albums | | /api/recent | Fetches and visualizes recent tracks |

Embedding in README

To embed these images in your GitHub README (or other markdown content):

  1. Use the following markdown syntax to display the overall statistics for a user.
![Overall Statistics](https://lastly.nisarga.me/api/overall?username=USERNAME&period=overall)

Replace USERNAME with your Last.fm username and PERIOD with the desired period (see options below).

  1. Alternatively, you can use HTML for more control over formatting (e.g., centering the image):
<img src="https://lastly.nisarga.me/api/overall?username=USERNAME&period=overall" alt="Overall Statistics" align="center">

Options

  • username: Your Last.fm username.
  • period: Can be set to:
    • overall: All-time statistics (default)
    • 7day: Last 7 days
    • 1month: Last month
    • 3month: Last 3 months
    • 6month: Last 6 months
    • 12month: Last year

If period is not specified, the default is overall.

Self-Hosting Guide

Follow the steps below to set up and run the project on your local machine:

  1. Clone the repository:

    git clone https://github.com/ni5arga/lastly.git
    cd lastly
    
  2. Install dependencies:

    npm install
    # or
    yarn install
    
  3. Configure environment:

    Create a .env.local file in the root directory and add your Last.fm API key.

    LASTFM_API_KEY=your_lastfm_api_key
    
  4. Run the development server:

    npm run dev
    # or
    yarn dev
    

    Open http://localhost:3000 with your browser to view the project.

Deploy with Vercel

Deploy the project to Vercel using the button below. Make sure to set up your environment variable (LASTFM_API_KEY) during the process.

Deploy with Vercel

License

This project is licensed under the MIT License - see the LICENSE file for details.

View on GitHub
GitHub Stars18
CategoryDevelopment
Updated1mo ago
Forks0

Languages

TypeScript

Security Score

95/100

Audited on Feb 27, 2026

No findings