> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira.party/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting Last.fm

> Link your account, sync your library, and understand what mira does with it.

Last.fm records what you listen to — scrobbles — from Spotify, Apple Music, YouTube Music and most other players. Once connected, mira can show what you're playing, build charts, and rank listeners across your whole server.

## Connecting

```javascript theme={null}
!lastfm connect yourusername
```

`!connect yourusername` works as a shortcut. Aliases: `login`, `set`, `link`, `setup`.

You need a [Last.fm account](https://www.last.fm) with scrobbling set up in whatever you listen with. Spotify has a built-in setting; other players usually need an app.

## Syncing your library

```javascript theme={null}
!lastfm sync
```

Pulls your full scrobble history into mira's own database. This is what makes the interesting commands work:

* [`whoknows`](/lastfm/whoknows) rankings
* [Crowns](/lastfm/whoknows#crowns)
* `lastfm artisttopalbums` and `artisttoptracks`
* Genre analysis, discovery, affinity and taste comparison

Without a sync, the basic commands still work — they hit Last.fm's API directly — but anything that ranks or aggregates needs the local copy.

Aliases: `update`, `refresh`.

<Tip>
  Re-sync every few months to pick up new listening. The first sync on a large library takes a while; later ones are incremental and quick.
</Tip>

### Syncing the whole server

```javascript theme={null}
!lastfm sync server
```

Refreshes the member cache so newly-connected members show up in whoknows rankings. Run it after several people connect at once. Aliases: `guild`, `sv`, `members`.

## First commands to try

<CodeGroup>
  ```javascript What you're playing theme={null}
  !nowplaying
  ```

  ```javascript Your top artists theme={null}
  !lastfm topartists
  ```

  ```javascript Who else listens to this theme={null}
  !whoknows
  ```

  ```javascript A collage of your top albums theme={null}
  !lastfm collage
  ```

  ```javascript Your profile theme={null}
  !lastfm whois
  ```
</CodeGroup>

`nowplaying` aliases: `now`, `np`, `fm` — `!fm` is what most people end up typing.

## Where to go next

<CardGroup cols={2}>
  <Card title="Now playing" icon="play" href="/lastfm/now-playing">
    Custom embeds, vote reactions, live updating, reskin integration.
  </Card>

  <Card title="Charts & collages" icon="chart-simple" href="/lastfm/charts">
    Top artists, albums and tracks, plus image grids.
  </Card>

  <Card title="Who knows" icon="crown" href="/lastfm/whoknows">
    Server and global listener rankings, and crowns.
  </Card>

  <Card title="Social" icon="users" href="/lastfm/social">
    Taste comparison, affinity, hidden gems, recommendations.
  </Card>
</CardGroup>

## Command reference

| Command                     | Aliases                   | Description              |
| --------------------------- | ------------------------- | ------------------------ |
| `lastfm connect <username>` | `login`, `set`, `link`    | Link your account        |
| `connect <username>`        | —                         | Shortcut                 |
| `lastfm sync`               | `update`, `refresh`       | Sync your library        |
| `lastfm sync server`        | `guild`, `sv`, `members`  | Refresh the server cache |
| `nowplaying [member]`       | `now`, `np`, `fm`         | What's playing           |
| `lastfm whois [search]`     | `info`, `profile`, `view` | Profile information      |
| `lastfm scrobbles`          | `scrobble`, `count`       | Total scrobbles          |

Group aliases: `lfm`, `lf`.
