{"id":19348792,"url":"https://github.com/raitonoberu/sptlrx","last_synced_at":"2025-04-05T13:09:44.492Z","repository":{"id":43583857,"uuid":"453977491","full_name":"raitonoberu/sptlrx","owner":"raitonoberu","description":"Synchronized lyrics in your terminal","archived":false,"fork":false,"pushed_at":"2024-07-23T12:35:51.000Z","size":399,"stargazers_count":355,"open_issues_count":11,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-23T14:47:37.667Z","etag":null,"topics":["lyrics","mopidy","mpd","spotify","spotifyd","synced-lyrics","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raitonoberu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-31T11:21:00.000Z","updated_at":"2024-07-23T12:35:55.000Z","dependencies_parsed_at":"2023-02-19T10:31:06.841Z","dependency_job_id":"8b0db5fa-5f96-4cbc-a464-ad6f8c5b0475","html_url":"https://github.com/raitonoberu/sptlrx","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raitonoberu%2Fsptlrx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raitonoberu%2Fsptlrx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raitonoberu%2Fsptlrx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raitonoberu%2Fsptlrx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raitonoberu","download_url":"https://codeload.github.com/raitonoberu/sptlrx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339158,"owners_count":20923014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lyrics","mopidy","mpd","spotify","spotifyd","synced-lyrics","terminal"],"created_at":"2024-11-10T04:23:06.484Z","updated_at":"2025-04-05T13:09:44.264Z","avatar_url":"https://github.com/raitonoberu.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\r\n\r\n\u003ch1\u003e\u003ca href=\"https://github.com/raitonoberu/sptlrx\"\u003esptlrx\u003c/a\u003e\u003c/h1\u003e\r\n\u003ch4\u003eSynchronized lyrics in your terminal\u003c/h4\u003e\r\n\r\n\u003ca href=\"https://www.youtube.com/watch?v=qR2QIJdtgiU\"\u003e\r\n  \u003cimg title=\"Crystal Castles — Kerosene\" src=\"./demo.gif\" width=\"450\"/\u003e\r\n\u003c/a\u003e\r\n\r\n\u003c/div\u003e\r\n\r\n## Features\r\n\r\n- Compatible with Spotify, MPD, Mopidy, MPRIS and browsers.\r\n- Works well with long lines \u0026 Unicode characters.\r\n- Easy to customize.\r\n- Allows piping to stdout.\r\n- Single binary \u0026 cross-plaftorm.\r\n\r\n## Installation\r\n\r\n**Linux**\r\n\r\n- Arch Linux ([@BachoSeven](https://github.com/BachoSeven))\r\n\r\n```\r\nyay -S sptlrx-bin\r\n```\r\n\r\n- NixOS ([@MoritzBoehme](https://github.com/MoritzBoehme))\r\n\r\n```\r\nnix-env -iA nixos.sptlrx\r\n```\r\n\r\nor if using nixpkgs\r\n\r\n```\r\nnix-env -iA nixpkgs.sptlrx\r\n```\r\n\r\n- Other\r\n\r\n```\r\ncurl -sSL instl.sh/raitonoberu/sptlrx/linux | bash\r\n```\r\n\r\n**Windows**\r\n\r\n```\r\niwr instl.sh/raitonoberu/sptlrx/windows | iex\r\n```\r\n\r\n**macOS**\r\n\r\n```\r\ncurl -sSL instl.sh/raitonoberu/sptlrx/macos | bash\r\n```\r\n\r\nYou can also download the binary from the [Releases](https://github.com/raitonoberu/sptlrx/releases/latest) page or [build it yourself](./building.md).\r\n\r\n## Configuration\r\n\r\nConfig file will be created at the first launch. On Linux it's located in `~/.config/sptlrx/config.yaml`. Run `sptlrx -h` to see the full path.\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eShow config contents (with descriptions)\u003c/summary\u003e\r\n\r\n```yaml\r\n### Global settings ###\r\n# Your Spotify cookie. Only needed if you are going to use Spotify as a player.\r\ncookie: \"\"\r\n# Player that will be used. Possible values: spotify, mpd, mopidy, mpris.\r\nplayer: spotify\r\n# Host of lyrics API to be used in case the cookie is not provided.\r\nhost: lyricsapi.vercel.app\r\n# Whether to ignore errors instead of showing them.\r\nignoreErrors: true\r\n# Interval of the internal timer. Determines how often the terminal will be updated.\r\ntimerInterval: 200\r\n# Interval for checking the position. Doesn't really affect the precision.\r\nupdateInterval: 2000\r\n\r\n### Style settings ###\r\nstyle:\r\n  # Horizontal alignment of lines. Possible values: left, center, right.\r\n  hAlignment: center\r\n  # Style of the lines before the current one.\r\n  before:\r\n    # The colors can be either in HEX format, or ANSI 0-255.\r\n    background: \"\"\r\n    foreground: \"\"\r\n    bold: true\r\n    italic: false\r\n    underline: false\r\n    strikethrough: false\r\n    blink: false\r\n    faint: false\r\n  # Style of the current line.\r\n  current:\r\n    # The colors can be either in HEX format, or ANSI 0-255.\r\n    background: \"\"\r\n    foreground: \"\"\r\n    bold: true\r\n    italic: false\r\n    underline: false\r\n    strikethrough: false\r\n    blink: false\r\n    faint: false\r\n  # Style of the lines after the current one.\r\n  after:\r\n    # The colors can be either in HEX format, or ANSI 0-255.\r\n    background: \"\"\r\n    foreground: \"\"\r\n    bold: false\r\n    italic: false\r\n    underline: false\r\n    strikethrough: false\r\n    blink: false\r\n    faint: true\r\n\r\n### Pipe settings ###\r\npipe:\r\n  # Maximum line length. 0 - unlimited.\r\n  length: 0\r\n  # How to handle overflowing strings. Possible values: word, none, ellipsis.\r\n  overflow: word\r\n\r\n### MPD settings ###\r\nmpd:\r\n  # MPD server address with port.\r\n  address: 127.0.0.1:6600\r\n  # MPD server password (if any).\r\n  password: \"\"\r\n\r\n### Mopidy settings ###\r\nmopidy:\r\n  # Mopidy server address with port.\r\n  address: 127.0.0.1:6680\r\n\r\n### MPRIS settings ###\r\nmpris:\r\n  # Whitelist of MPRIS players. First available is used if empty.\r\n  players: []\r\n\r\n### Browser extension settings ###\r\nbrowser:\r\n  # Port on which the server will be started.\r\n  port: 8974\r\n\r\n### Local lyrics source ###\r\nlocal:\r\n  # Folder for scanning .lrc files. Example: \"~/Music\".\r\n  folder: \"\"\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n### Spotify\r\n\r\n```yaml\r\n# config.yaml\r\ncookie: \u003cyour cookie\u003e\r\nplayer: spotify\r\n```\r\n\r\nIf you want to use Spotify as your player or lyrics source, you need to specify your cookie.\r\n\r\n1. Open your browser.\r\n2. Press F12, open the `Network` tab and go to [open.spotify.com](https://open.spotify.com/).\r\n3. Click on the first request to `open.spotify.com`.\r\n4. Scroll down to the `Request Headers`, right click the `cookie` field and select `Copy value`.\r\n5. Paste it to your config.\r\n\r\nYou can also set the `SPOTIFY_COOKIE` environment variable or pass the `--cookie` flag.\r\n\r\n**TREAT YOUR COOKIE LIKE A PASSWORD AND NEVER SHARE IT**\r\n\r\n### MPD\r\n\r\n```yaml\r\n# config.yaml\r\nplayer: mpd\r\nmpd:\r\n  address: 127.0.0.1:6600\r\n  password: \"\"\r\n```\r\n\r\nMPD server will be used as a player.\r\n\r\n### Mopidy\r\n\r\n```yaml\r\n# config.yaml\r\nplayer: mopidy\r\nmopidy:\r\n  address: 127.0.0.1:6680\r\n```\r\n\r\nMopidy server will be used as a player.\r\n\r\n### MPRIS\r\n\r\n```yaml\r\n# config.yaml\r\nplayer: mpris\r\nmpris:\r\n  players: []\r\n```\r\n\r\nLinux only. System player that supports MPRIS protocol will be used. You can also specify a whitelist of players to use, example: `players: [rhythmbox, spotifyd, ncspot]`. Run `playerctl -l` to get the names.\r\n\r\n### Browser\r\n\r\n```yaml\r\n# config.yaml\r\nplayer: browser\r\nbrowser:\r\n  port: 8974\r\n```\r\n\r\nYou need to install a [browser extension](https://wnp.keifufu.dev/extension/getting-started). If you don't change the default port, no further configuration is required. Otherwise, create a custom adapter in the extension settings. **You can only run one instance on one port.**\r\n\r\n### Local\r\n\r\n```yaml\r\n# config.yaml\r\nlocal:\r\n  folder: \"\"\r\n```\r\n\r\nIf you want to use your local collection of `.lrc` files to display lyrics, specify the folder to scan. The application will use files with the most similar name. All other lyrics sources will be disabled.\r\n\r\n## Information\r\n\r\n### Source\r\n\r\nIf you specify your Spotify cookie, the lyrics will be fetched using your account. Otherwise, the API [hosted by me](https://github.com/raitonoberu/lyricsapi) will be used. It is also possible to host your own API or use local `.lrc` files.\r\n\r\n### Piping\r\n\r\nRun `sptlrx pipe` to start printing the current lines to stdout. This can be used in various status bars and other applications.\r\n\r\n### Flags\r\n\r\nYou can pass flags to override the style parameters defined in the config. Example:\r\n\r\n```sh\r\nsptlrx --current \"bold,#FFDFD3,#957DAD\" --before \"104,faint,italic\" --after \"104,faint\"\r\n```\r\n\r\nList of allowed styles: `bold`, `italic`, `underline`, `strikethrough`, `blink`, `faint`. The colors can be either in HEX format, or ANSI 0-255. The first color represents the foreground, the second represents the background.\r\n\r\nRun `sptlrx --help` to see all the flags.\r\n\r\n## License\r\n\r\n**MIT License**, see [LICENSE](./LICENSE) for additional information.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraitonoberu%2Fsptlrx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraitonoberu%2Fsptlrx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraitonoberu%2Fsptlrx/lists"}