# openmagicline

> Magicline API for everybody.

Latest version **2.3.0** (published 2026-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install openmagicline
pnpm add openmagicline
yarn add openmagicline
bun add openmagicline
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2026-04-10 |
| First published | 2022-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 61.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | vaaski |
| Maintainers | vaaski |
| Keywords | magicline, gym, mysports, reverse-engineered |

## Links

- npm: https://www.npmjs.com/package/openmagicline
- Repository: https://github.com/vaaski/openmagicline
- Homepage: https://github.com/vaaski/openmagicline#readme
- Issues: https://github.com/vaaski/openmagicline/issues
- npm.io page: https://npm.io/package/openmagicline

## Dependencies (6)

- [ws](https://npm.io/package/ws.md) ^7.5.10
- [debug](https://npm.io/package/debug.md) ^4.3.7
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [ofetch](https://npm.io/package/ofetch.md) ^1.4.1
- [form-data](https://npm.io/package/form-data.md) ^4.0.1
- [@stomp/stompjs](https://npm.io/package/@stomp/stompjs.md) ^6.1.2

## Recent versions

- 2.3.0 (latest) — 2026-04-10
- 2.2.0 — 2025-04-13
- 2.1.0 — 2024-10-26
- 2.0.0 — 2024-09-29
- 1.1.0 — 2023-03-26
- 1.0.0 — 2023-03-11
- 0.3.0 — 2023-03-05
- 0.2.0 — 2022-12-04
- 0.1.2 — 2022-11-20
- 0.1.1 — 2022-07-31
- 0.1.0 — 2022-07-31

## README

<h1><p align="center">Openmagicline</p></h1>
<p align="center">The Magicline API for everybody.</p>

## Synopsis

I work at a gym that has been using [magicline](https://magicline.com) for
well over a decade now.

When they switched to a completely new cloud-based web-interface in about 2016,
using magicline got a lot slower. The new interface not only took a
significant time to get used to, it also runs considerably slower than
the previous (native) one. This sucks for an environment where the
customer expects fast and reliable service.

I build custom software to speed up the workflow, and Openmagicline is the
adapter that powers it.

Openmagicline is a **reverse-engineered**, **strongly-typed** version of
magicline's internal API.

## Usage

This is far from feature-complete as I only implement the parts I need.
Feel free to use it, but expect a lot of functionality to be missing.

I am, however, very open to [contributions](#roadmap) and this project should be a
solid starting point for anyone who wants to implement missing functionality.

```ts
const magicline = new Openmagicline({
  gym: "gym", // example for https://gym.web.magicline.com
  username: "your username",
  password: "your password",
})

await magicline.login()
await magicline.customer.search("John Doe")
```

## Features

- **Strongly-typed** - All API calls and responses are typed
- **Authentication** - Automatically re-authenticates on session expiry
- **Covered** - Probably close to 100% test coverage

## Roadmap

- Detect magicline version and warn if openmagicline is outdated
- Improve tests and verify API responses with something like zod

## New in v2

- Added setting `organizationUnitId` per instance to avoid re-checking it.
  - This is optional, it'll get the default unitID if not provided.
- Added checkoutByCustomerID to Checkin class which utilizes a cached map of
  customerID -> checkinID to avoid having to re-list checkins.
- Switched to [Bun](https://bun.sh) for package management and testing.
- Switched to [ofetch](https://npmr.vaa.ski/ofetch) for HTTP requests.
- Switched to [Biome](https://biomejs.dev) for linting and formatting.

---
_Source: https://npm.io/package/openmagicline · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
