Skip to content

osu-files ​

osu-files reads and modifies osu!lazer Realm data and the file formats around it: .osu, .osz, .osr, .osk, storyboards, skins, and collections.

CAUTION

This library allows essentialy unlimited access to osu!lazer's database. Caution is advised, as bugs might occur. Please be 100% sure your application works before sharing it with others.

Quick start ​

ts
import init from 'osu-files'

const db = init('./client.realm', {
  filesFolderPath: './files',
})

const maps = db.beatmaps.get.byOnlineId(506483).map(map => map.Metadata?.Title)
db.close()

See Installation for setup.

Example ​

This documentation features a live editor so you can preview the code on your own. Try it out!

ts
import { parseOsu } from 'osu-files'

const metadata = parseOsu(beatmaps[0].osuText).metadata

return metadata

Released under the MIT License.