lrxed

June 21, 2025 · View on GitHub

Build crates.io

/ˈlɪrɪksd/
A tui application for synchronising lyrics

a showcase of the application

Installation

Building from source

Dependencies:

git clone https://github.com/LunaPresent/lrxed.git
cargo install --path ./lrxed --locked

Cargo

cargo install lrxed

AUR/Arch Linux

yay -S lrxed-bin

Or install lrxed-bin from the AUR using your preferred method of installation.

Nix/NixOS

First add this repo as an input to your flake.

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";

    lrxed = {
      url = "github:LunaPresent/lrxed";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
}

Using the packages

{ inputs, pkgs, ... }:
{
  environment.systemPackages = [ inputs.lrxed.packages.${pkgs.stdenv.system.hostPlatform}.default ];
}

Using the overlays

{ inputs, ... }:
{
  nixpkgs.overlays = [ inputs.lrxed.overlays.default ];
  environment.systemPackages = [ pkgs.lrxed ];
}

Using the home-manager module

{ inputs, ... }:
{
  imports = [ inputs.lrxed.homeModules.default ];

  programs.lrxed = {
    enable = true;

    settings.keys.global.quit = [
      { key = "q"; }
      { key = "z"; }
    ];
  };
}

Requirements

  • A nerd font, for displaying certain icons. This font must be set in your terminal emulator config.
  • Set a default text editor, e.g. in the $VISUAL envvar on Linux, for the open-in-editor feature.
  • A local music library. This may clash with your setup if you use a media server such as jellyfin. I suggest trying sshfs to mount the remote media, as running lrxed remotely will not give you good audio playback.

Basic usage

  1. Place your audio and lyrics files in the same directory, with matching filenames so that the file name stem is the same, but the extension for the lyrics file is replaced with .lrc, like so:
    > ls
    jamie_paige_ft_kasane_teto-machine_love.lrc
    jamie_paige_ft_kasane_teto-machine_love.mp3
    
  2. Open the audio file in lrxed, either directly using `lrxed <path_to_file.mp3> or by navigating to it with the built-in file browser and pressing enter. If a .lrc sidecar file was not found, lrxed will open a new, blank file.
  3. Synchronise the lyrics by pressing <Space> in time with the music, just before the line is sung.
  4. Navigate through the lines with <j> and <k> or the arrow keys. Press <f> on an already synced line to start playback from there and test the synchronisation. Use <s>, <d> and <c> to increment an existing timestamp, or <S>, <D> and <C> to decrement it.
  5. Press <Ctrl-w> to save the changes to the .lrc file, exit back to the file browser using <Esc> or close lrxed using <q>.

Features & goals

  • play audio from .mp3, .flac, .wav and .ogg formats
  • import/export lrc sidecar files
  • sync lyrics to current progress
  • adjust timestamp per line
  • edit lyrics in text editor
  • browse directory
  • user config
  • basic internal text editing
  • media keys / playerctl support
  • mouse controls
  • lrc tags integration
  • lrclib integration
  • enhanced lrc support (karaoke lyrics)
  • match lrc files according to a naming scheme
  • import/export id3 lyrics frames
  • sync with external music player (mpris)

Non-goals:

  • Be a music player: Yes, it plays music, but lrxed does not aim to implement a queue or autoplay feature, or anything aimed specifically towards improving its viability as a music player.
  • Be a text editor: While basic text editing entirely within lrxed is a (planned) feature, this will not stand up to any slightly advanced text editing features of <insert favourite text editor>. For all your advanced text editing needs, you can use the open-in-editor feature (default <I>)

Configuration

You may choose between the toml, json or yaml file format to configure lrxed.

Print the path to the configuration file

lrxed --print-config-path [toml | json | yaml]

lrxed does not create this config file, you will need to create it manually.

To print your current configuration, or the defaults if not configured, use

lrxed --print-config [toml | json | yaml]

You can use this as a reference to make your configuration.
The default value in these commands when file type is omitted is toml.

Alternatively, use the following oneliner to create the config and seed it with the defaults.
Example for toml file type:

lrxed --print-config toml > (lrxed --print-config-path toml)

Controls

keyexplanationconfig identifier
?show list of key bindingsview-keys
q[q]uit lrxedquit
Enteropen/acceptconfirm
Escback/cancelcancel
Spacesync lyrics to current time and select next linesync-timestamp
^wsavesave
j or Downcursor downmove-cursor-y
k or Upcursor upmove-cursor-y
h or Leftcursor leftmove-cursor-x
l or Rightcursor rightmove-cursor-x
g[g]o to first lineset-cursor-y
G[G]o to last lineset-cursor-y
_ or Homecursor to line startset-cursor-x
$ or Endcursor to line endset-cursor-x
Hseek backwardsseek-backwards
Lseek forwardsseek-forwards
[0-9]seek to [0-9]0%seek-relative
r[r]esume/pausetoggle-pause
u[u]ndoundo
^r[^r]edoredo
fplay [f]rom selected word (line for now)seek-to-cursor
Fplay [F]rom selected lineseek-to-cursor-line
tgo [t]o currently playing word (line for now)cursor-to-playing
Tgo [T]o start of currently playing linecursor-to-playing-line
sincrement timestamp by a [s]econdadjust-timestamp
Sdecrement timestamp by a [S]econdadjust-timestamp
dincrement timestamp by a [d]ecisecond (0.10s)adjust-timestamp
Ddecrement timestamp by a [D]ecisecond (0.10s)adjust-timestamp
cincrement timestamp by a [c]entisecond (0.01s)adjust-timestamp
Cdecrement timestamp by a [C]entisecond (0.01s)adjust-timestamp
Iedit file in external editoropen-in-editor
[volume downchange-volume
]volume upchange-volume
{volume down slightlychange-volume
}volume up slightlychange-volume
-speed downchange-speed
+speed upchange-speed
=reset playback speedreset-speed
h or Left or Escleave directoryleave-directory
l or Right or Entergo into directory or edit fileopen-file-or-directory

To be done

keyexplanation
Jappend next line to current
Ksplit line at cursor
wcursor to next [w]ord
ecursor to [e]nd of word
bcursor [b]ackward by a word
^sset timestamp average of [s]urrounding
xdelete timestamp
Xdelete line
y[y]ank timestamp
Y[Y]ank line
p[p]aste timestamp
P[P]aste line
iedit line in [i]nternal editor
oinsert new line after
Oinsert new line before
atoggle [a]utoscroll
Atoggle [A]utoseek (play from newly selected line)

Since you're probably here because you maintain your own media library (with lyrics), I highly recommend you check out the following software if you haven't already:

  • lrcget - Does everything lrxed does and more, but in a gui and with more traditional, text-input-first controls. Definitely use this for obtaining .lrc files from the internet before editing them, at least until lrxed implements lrclib integration :3

  • sptlrx - Simple looking but amazing terminal application to use alongside your favourite music player and get a nice synchronised lyrics viewer.

  • cmus - This is just a really solid music player, I use this alongside sptlrx. Doesn't support lyrics out of the box, but plugins may exist.

  • jellyfin-tui - If you have a jellyfin server, are addicted to your terminal and also you want a nice built-in synchronised lyrics viewer, look no further. Works out of the box with .lrc files as long as the jellyfin server can serve them.

  • harmonoid - Very pretty GUI music player with .lrc compatible scrolling lyrics viewer. Warning: this is freeware but not open source.

  • termusic - Music player built in rust. Has support for synced lyrics but I couldn't get it to recognise .lrc files.


Thank you for checking out my project. Please consider leaving a star if you like it, or if you just feel like giving me a confidence boost.

Making issues and pull requests is very much appreciated. Please be patient with me as this is my first experience maintaining an open source project. Any tips or general feedback are welcome in the discussion tab.