booktui is a Linux-first terminal audiobook player built with Rust, ratatui, crossterm, and rodio.
It is designed around local audiobook playback in the terminal: track directories inside the app, browse files quickly, resume reliably, and control playback with both keyboard and mouse without leaving the terminal.
- Add and untrack library directories from inside the TUI
- File-based audiobook library for
mp3andm4b - Native audio playback with pause, resume, seek, speed, and volume control
- Resume persistence with periodic checkpoints and normal-shutdown saves
- Idle auto-pause plus an explicit sleep timer
- Manual bookmarks with timeline markers
m4bchapter detection with chapter ticks and chapter navigation- Filtered browsing, grouped library display, and multiple sort modes
- Small-window-friendly layout and mouse support for timeline and volume
- Linux
- A working audio output device supported by
rodio/cpal ffprobeinPATHif you wantm4bchapter detection and reliable scanned duration metadata
For development from source:
- Rust toolchain
mp3m4b
Run from source with cached dependencies:
cargo run --offlineRun from source with network access if dependencies are not cached:
cargo runRun a prebuilt release binary:
./booktuiIf you publish GitHub releases, attaching the built Linux binary lets users run booktui without installing Rust.
cargo build --release
cp target/release/booktui ./booktui
chmod +x ./booktuia: add a library directoryd: untrack the selected file's library directoryr: rescan tracked directories/: filter the librarys: cycle sort modeUp/Downorj/k: move selectionPageUp/PageDown: move faster through the listEnter: play selected fileSpace: pause or resume playbackq: quit
Left/Rightorh/l: seek backward or forwarde: open the "seek by" promptu: undo the most recent committed seeko/p: slower or faster playback speed-/=: lower or raise volume
Seek input supports:
1m: absolute seek to one minute-30s: relative backward seek+1h2m3s: relative forward seek
t: open the sleep timer prompt
Sleep timer input uses the same duration format as seek input, such as 15m, 1h, or 1h30m.
The sleep timer only counts down while playback is actively running. It freezes while paused or stopped.
b: add a bookmark at the current playback positionB: open bookmarks for the current file
Bookmark popup:
Enter: jump to bookmarkd: delete bookmarkUp/Downorj/k: move through bookmarksEsc: close
If the bookmark label is left empty, booktui uses the current timestamp as the label.
c: jump to the previous chapterv: jump to the next chapterC: open the chapter picker for the current file
For m4b files, chapter ticks are shown on the timeline when chapter metadata can be read through ffprobe.
Chapter popup:
Enter: jump to chapterUp/Downorj/k: move through chaptersEsc: close
- Left click or drag on the timeline to seek
- Left click or drag on the volume bar to change volume
Timeline dragging is preview-based and commits on mouse release. Drag lock keeps timeline and volume drags from switching accidentally if the pointer drifts vertically.
Tab: complete directory pathsLeft/Right: move cursorHome/End: jump to start or endBackspace/Delete: delete charactersCtrl-A/Ctrl-E: move to start or endCtrl-U: clear to the start of the lineCtrl-W: delete the previous wordEnter: confirmEsc: cancel
Configuration lives at:
~/.config/booktui/config.toml
Example:
library_dirs = ["/home/you/Audiobooks"]
default_volume = 70
idle_timeout = "30m"
memory_on_move = truelibrary_dirs: directories scanned for supported audio filesdefault_volume: startup volume, from0to100idle_timeout: pause after this much time without keyboard interactionmemory_on_move: iftrue, resume and similar state follow a file byfilename + size; iffalse, state is strict path-based
idle_timeout uses the same duration format as seek and sleep timer input, for example 30m or 1h.
State is stored under XDG state paths when available:
~/.local/state/booktui/state.toml: UI state such as selected item and sort mode~/.local/state/booktui/resume.toml: resume positions and last-played timestamps~/.local/state/booktui/bookmarks.toml: per-file bookmarks~/.local/state/booktui/library-cache.toml: cached metadata used to speed rescans
- Resume checkpoints are saved every minute during active playback
- Resume is also saved on normal shutdown and on several playback transitions
- Unexpected termination is best-effort, with roughly one minute of worst-case progress loss
When memory_on_move = true:
- resume positions
- last-played ordering
- selected-item memory
- bookmarks
follow files using filename + size instead of full path.
This makes moves inside the library friendlier, but it can merge state for files that share the same filename and byte size. If you want strict path identity instead, set memory_on_move = false.
- The library is file-based, not folder-as-book based
- Files are grouped by parent directory in the library view
- Sort modes are alphabetical, file date, and last played
- Embedded title metadata is used when available, with filename fallback
- Metadata scanning is cached for faster subsequent rescans
- Idle auto-pause triggers only from lack of keyboard interaction
- Any keypress counts as interaction for the idle timer
- The sleep timer is separate from idle auto-pause
- Broken or unsupported files should fail with an in-app error instead of crashing the TUI
m4bchapter detection and scanned duration metadata are best-effort and depend on whatffprobecan read from the file
booktui is already usable as a practical local audiobook player on Linux. The current codebase covers playback, persistence, library management, bookmarks, chapters, and terminal-first controls, and is in a reasonable state for packaging and release distribution.