osu-play 1.0.7 → 1.1.0
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 +71 -49
- package/dist/cli.cjs +671 -0
- package/dist/cli.cjs.map +22 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +656 -0
- package/dist/cli.js.map +22 -0
- package/dist/core/cli/main.d.ts +20 -0
- package/dist/core/lazer/compat.d.ts +24 -0
- package/dist/core/lazer/mod.d.ts +10 -0
- package/dist/core/lazer/schema/beatmap.d.ts +35 -0
- package/dist/core/lazer/schema/beatmapMetadata.d.ts +16 -0
- package/dist/core/lazer/schema/beatmapSet.d.ts +18 -0
- package/{src/realm/schema/mod.ts → dist/core/lazer/schema/mod.d.ts} +0 -1
- package/dist/core/lazer/schema/realmFile.d.ts +6 -0
- package/dist/core/lazer/schema/realmNamedFileUsage.d.ts +9 -0
- package/dist/core/lazer/schema/realmUser.d.ts +9 -0
- package/dist/core/playlist/mod.d.ts +28 -0
- package/dist/core/utils/mod.d.ts +16 -0
- package/dist/index.cjs +529 -0
- package/dist/index.cjs.map +21 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +512 -0
- package/dist/index.js.map +21 -0
- package/package.json +54 -24
- package/bin/osu-play.js +0 -7
- package/index.ts +0 -1
- package/src/cli/main.ts +0 -156
- package/src/mod.ts +0 -2
- package/src/realm/mod.ts +0 -54
- package/src/realm/schema/beatmap.ts +0 -85
- package/src/realm/schema/beatmapMetadata.ts +0 -33
- package/src/realm/schema/beatmapSet.ts +0 -36
- package/src/realm/schema/realmFile.ts +0 -15
- package/src/realm/schema/realmNamedFileUsage.ts +0 -19
- package/src/realm/schema/realmUser.ts +0 -21
- package/src/utils/mod.ts +0 -77
- package/tsconfig.json +0 -109
package/README.md
CHANGED
|
@@ -1,69 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
<br>
|
|
3
|
-
osu!play
|
|
4
|
-
<br>
|
|
1
|
+
# osu-play
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/osu-play)
|
|
8
|
-
[](LICENSE)
|
|
3
|
+
Play music from your osu!lazer beatmaps from the terminal.
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
## Requirements
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
- Node.js `20+`
|
|
8
|
+
- An osu!lazer install with beatmaps available locally
|
|
9
|
+
|
|
10
|
+
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.
|
|
14
11
|
|
|
15
12
|
## Installation
|
|
16
13
|
|
|
17
|
-
### Requirements
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
- That's it!
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g osu-play
|
|
17
|
+
```
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
Or run it without a global install:
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
```bash
|
|
22
|
+
npx osu-play
|
|
23
|
+
```
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
npx osu-play # using npm
|
|
30
|
-
pnpm dlx osu-play # using pnpm
|
|
31
|
-
```
|
|
25
|
+
## Usage
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
### CLI
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```
|
|
29
|
+
```bash
|
|
30
|
+
# Play music interactively
|
|
31
|
+
osu-play
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
# Export a playlist file
|
|
34
|
+
osu-play --exportPlaylist playlist.txt
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
➜ korigamik git:(main) ✗ osu-play --help
|
|
46
|
-
Play music from your osu!lazer beatmaps from the terminal
|
|
47
|
-
Usage: osu-play [options]
|
|
48
|
-
|
|
49
|
-
Options:
|
|
50
|
-
--help Show help [boolean]
|
|
51
|
-
--version Show version number [boolean]
|
|
52
|
-
-r, --reload Reload lazer database [boolean] [default: false]
|
|
53
|
-
--exportPlaylist Export playlist to a file [string]
|
|
54
|
-
-d, --osuDataDir Osu!lazer data directory
|
|
55
|
-
[string] [default: "/home/origami/.local/share/osu"]
|
|
56
|
-
-c, --configDir Config directory
|
|
57
|
-
[string] [default: "/home/origami/.config/osu-play"]
|
|
58
|
-
-l, --loop Loop the playlist on end [boolean] [default: false]
|
|
36
|
+
# Loop the playlist
|
|
37
|
+
osu-play --loop
|
|
59
38
|
```
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
database interaction in your applicatoins import the `osu-play` package and
|
|
63
|
-
start using it!
|
|
40
|
+
### API
|
|
64
41
|
|
|
65
42
|
```ts
|
|
66
|
-
import {
|
|
43
|
+
import { getLazerDB, getRealmDBPath } from "osu-play";
|
|
44
|
+
|
|
45
|
+
const realmPath = getRealmDBPath({ osuDataDir: "/path/to/osu" });
|
|
46
|
+
const db = await getLazerDB(realmPath);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Options
|
|
50
|
+
|
|
51
|
+
- `--reload, -r`: Deprecated and ignored
|
|
52
|
+
- `--exportPlaylist`: Export the discovered track paths to a file
|
|
53
|
+
- `--osuDataDir, -d`: Override the osu!lazer data directory
|
|
54
|
+
- `--configDir, -c`: Deprecated and ignored
|
|
55
|
+
- `--loop, -l`: Restart from the beginning when the playlist ends
|
|
56
|
+
- `--help, -h`: Show help
|
|
57
|
+
|
|
58
|
+
## Development
|
|
59
|
+
|
|
60
|
+
Bun `1.3+` is required only for development and contributing; it is not needed to run the published CLI via `npm install -g` or `npx osu-play`.
|
|
67
61
|
|
|
68
|
-
|
|
62
|
+
```bash
|
|
63
|
+
bun run setup
|
|
64
|
+
bun run dev -- --help
|
|
65
|
+
bun run check
|
|
69
66
|
```
|
|
67
|
+
|
|
68
|
+
Useful day-to-day commands:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
bun run dev -- --help
|
|
72
|
+
bun run test
|
|
73
|
+
bun run package
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If you hit a Realm native-binding error like `realm.node` missing or Node failing to load Realm:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
bun install
|
|
80
|
+
bun run repair:realm
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`bun run package` builds the distributable files and creates a local npm tarball with `bun pm pack`.
|
|
84
|
+
|
|
85
|
+
osu-play now reads osu!lazer's live `client.realm` directly in read-only mode instead of copying it into a separate app directory.
|
|
86
|
+
|
|
87
|
+
Standalone Bun executables are intentionally not part of the release flow right now. The current Realm dependency uses native bindings, and Bun's standalone executable support does not yet cover that path cleanly enough for this app.
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
MIT
|