osu-play 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,21 @@
1
- # osu-play
1
+ <h1 align="center">
2
+ <br>
3
+ osu!play
4
+ <br>
2
5
 
3
- Play music from your osu!lazer beatmaps from the terminal.
6
+ [![NPM version](https://img.shields.io/npm/v/osu-play.svg?style=flat)](https://npmjs.org/package/osu-play)
7
+ [![Downloads](https://badgen.net/npm/dt/osu-play)](https://www.npmjs.com/package/osu-play)
8
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
9
+
10
+ </h1>
11
+
12
+ > Listen to your favourite [osu!lazer](https://lazer.ppy.sh) beatmaps as a
13
+ > spotify playlist from the terminal
4
14
 
5
15
  ## Requirements
6
16
 
7
17
  - Node.js `20+`
18
+ - `mpv` available on your `PATH`
8
19
  - An osu!lazer install with beatmaps available locally
9
20
 
10
21
  If you're developing locally, Realm's native bindings are still the one awkward part of this stack. Use the repo's `setup` script so Bun install and the Realm repair step happen in the right order.
@@ -27,7 +38,7 @@ npx osu-play
27
38
  ### CLI
28
39
 
29
40
  ```bash
30
- # Play music interactively
41
+ # Launch the TUI player
31
42
  osu-play
32
43
 
33
44
  # Export a playlist file
@@ -37,6 +48,23 @@ osu-play --exportPlaylist playlist.txt
37
48
  osu-play --loop
38
49
  ```
39
50
 
51
+ ### TUI Controls
52
+
53
+ - `Up/Down` or `j/k`: Move through the playlist
54
+ - `Left/Right` or `h/l`: Seek backward or forward by 5 seconds
55
+ - `Enter`: Play the selected track
56
+ - `Space`: Pause or resume playback
57
+ - `n` / `p`: Next or previous track
58
+ - `PageUp` / `PageDown`: Jump faster through the playlist
59
+ - `r`: Toggle looping
60
+ - `s`: Stop playback
61
+ - `q`: Quit
62
+ - `/`: Enter search mode
63
+ - Type in search mode: Jump the selection by track title
64
+ - `Backspace`: Edit the search query
65
+ - `Enter`: Leave search mode and keep the current query
66
+ - `Esc`: Leave search mode, or clear the current query outside search mode
67
+
40
68
  ### API
41
69
 
42
70
  ```ts
@@ -49,10 +77,10 @@ const db = await getLazerDB(realmPath);
49
77
  ## Options
50
78
 
51
79
  - `--reload, -r`: Deprecated and ignored
52
- - `--exportPlaylist`: Export the discovered track paths to a file
80
+ - `--exportPlaylist`: Export the discovered track paths to a file instead of launching the TUI
53
81
  - `--osuDataDir, -d`: Override the osu!lazer data directory
54
82
  - `--configDir, -c`: Deprecated and ignored
55
- - `--loop, -l`: Restart from the beginning when the playlist ends
83
+ - `--loop, -l`: Restart from the beginning when playback reaches the end
56
84
  - `--help, -h`: Show help
57
85
 
58
86
  ## Development
@@ -61,14 +89,16 @@ Bun `1.3+` is required only for development and contributing; it is not needed t
61
89
 
62
90
  ```bash
63
91
  bun run setup
64
- bun run dev -- --help
92
+ bun run dev
65
93
  bun run check
66
94
  ```
67
95
 
68
96
  Useful day-to-day commands:
69
97
 
70
98
  ```bash
71
- bun run dev -- --help
99
+ bun run dev
100
+ bun run dev -- --loop
101
+ bun run dev -- --exportPlaylist playlist.txt
72
102
  bun run test
73
103
  bun run package
74
104
  ```
@@ -80,6 +110,8 @@ bun install
80
110
  bun run repair:realm
81
111
  ```
82
112
 
113
+ If `osu-play` fails with an `mpv` startup or IPC error, make sure `mpv` is installed and available on your shell `PATH`.
114
+
83
115
  `bun run package` builds the distributable files and creates a local npm tarball with `bun pm pack`.
84
116
 
85
117
  osu-play now reads osu!lazer's live `client.realm` directly in read-only mode instead of copying it into a separate app directory.