···21212222### Commands
23232424-#### Export
2525-2626-Parse and merge Last.fm/Spotify exports, output as JSON:
2727-2828-```sh
2929-lazuli export --lastfm=history.csv --spotify=streaming_history.json --output=merged.json
3030-```
3131-3232-#### Import
3333-3434-Import listening history to Bluesky with proper rate limiting:
3535-3636-```sh
3737-lazuli import --lastfm=history.csv --spotify=streaming_history.json
3838-```
3939-4040-Resume is automatic - if interrupted, re-running skips already-imported records:
4141-4242-Import modes:
4343-4444-- `lastfm` - Import only Last.fm data
4545-- `spotify` - Import only Spotify data
4646-- `combined` - Merge both sources (default)
4747-4848-#### Sync
4949-5050-Fetch existing records and show statistics:
5151-5252-```sh
5353-lazuli sync
5454-```
5555-5656-#### Dedupe
2424+| Command | Usage |
2525+| :--- | :--- |
2626+| `export` | Parse and merge Last.fm/Spotify exports into a JSON file |
2727+| `import` | Import new records to Bluesky (auto-skips existing) |
2828+| `sync` | Refresh the local cache with records from Bluesky |
2929+| `stats` | Show database status and daily rate limit consumption |
3030+| `failed` | List records that failed to import |
3131+| `retry` | Attempt to re-import failed records |
3232+| `dedupe` | Remove duplicate records from your Bluesky profile |
3333+| `debug` | Dump raw records from Bluesky for troubleshooting |
57345858-Find and remove duplicate records from your Bluesky profile:
3535+### Advanced Options
59366060-```sh
6161-lazuli dedupe --dry-run # Preview without deleting
6262-```
3737+- **Rate Limiting**: Lazuli automatically respects Bluesky/ATProto rate limits (default 9,000 writes/day). Use `lazuli stats` to see your remaining quota.
3838+- **Automatic Resume**: The local cache tracks which records were successfully imported. If a process is interrupted, re-running the same command will skip already-published entries.
3939+- **Output Formats**: Most commands support `--output-format=json` for machine-readable output.
4040+- **Fresh Sync**: Use `--fresh` to bypass the local cache and fetch everything directly from the server.
63416442## Environment Variables
6543···88668967### Spotify
90689191-Download your extended streaming history from Spotify (Privacy settings). Lazuli accepts:
6969+Lazuli is designed to work with your **Extended Streaming History** from Spotify. You can request this from your [Spotify Privacy Settings](https://www.spotify.com/account/privacy/).
92709393-- Single JSON files
7171+The recommended way to use Spotify data is by passing the **ZIP archive** you receive from Spotify directly. Lazuli will automatically find and parse all streaming history files within it.
7272+7373+Lazuli accepts:
7474+- **ZIP archives** containing extended history (Recommended)
9475- Directories containing `Streaming_History_Audio_*.json` files
9595-- ZIP archives of the above
7676+- Single `Streaming_History_Audio_*.json` files
7777+7878+> [!IMPORTANT]
7979+> Make sure to request "Extended streaming history", as the standard "Account data" export does not contain your full listening history.
96809781## Features
9882