This guide orients you to the scrobbledb command-line interface and links to dedicated pages for each command group. Use these pages for option-by-option references and examples generated directly from the CLI help text.
- Install dependencies with uv:
uv sync uv run scrobbledb --help
- Data is stored under the XDG data directory using the app name
dev.pirateninja.scrobbledb(for example~/.local/share/dev.pirateninja.scrobbledb). The default database isscrobbledb.dband default credentials file isauth.jsonin that directory. - The CLI supports a global
--log-configoption for custom Loguru settings and-V/--versionfor version output.
| Command | Purpose | Reference |
|---|---|---|
albums |
Search albums and view album details | Albums |
artists |
Browse artists, view top artists, and artist details | Artists |
auth |
Save Last.fm/Libre.fm credentials | Auth |
browse |
Launch the Textual TUI to browse tracks | Browse |
config |
Initialize or reset the database and show paths | Config |
export |
Export data via presets or custom SQL | Export |
import |
Import plays from files or stdin | Import |
index |
Create or rebuild the FTS5 search index | Index |
ingest |
Fetch recent plays from Last.fm/Libre.fm | Ingest |
plays |
View play history with filtering | Plays |
search |
Full-text search across the library | Search |
sql |
sqlite-utils passthrough commands | SQL |
stats |
Overview, monthly, and yearly listening stats | Stats |
tracks |
Search tracks, view top tracks, and track details | Tracks |
version |
Print the installed package version | Version |
The command pages embed --help output using cog. After changing CLI options run:
PYTHONPATH=src uv run cog -r docs/commands/*.mdYou can also use the poe task configured in pyproject.toml:
poe docs:cliThis keeps the documented usage in sync with the current CLI.