Skip to content
/ qmk Public

⌨️ Get information on keyboards, compile firmware and more

License

Notifications You must be signed in to change notification settings

matthax/qmk

Repository files navigation

npm CircleCI CodeCov node Discord

QMK.js

Bring the power of the open source project to your browser or node.js project. Get information on keyboards and layouts and even compile firmware using the QMK API.

Installation

Using yarn (recommended):

yarn add qmk

Or with npm:

npm install --save qmk

Usage

Get metadata for keyboards using the QMK Keyboard API

import QMK from 'qmk';

// Create an API client using the provided version
const client = new QMK('v1');
const keyboardName = 'massdrop/alt';

// Fetch keyboard metadata
client.keyboards(keyboardName).then(({ keyboards }) => {
  // The "keyboards" call always returns a dictionary of keyboards
  // So we keep keyboardName to reference it in the response body
  console.info(keyboards[keyboardName]);
}).catch((err) => {
  console.error(err);
});

Get metadata for every supported QMK keyboard using the special all keyword

import QMK from 'qmk';

// Create an API client using the provided version
const client = new QMK('v1');

// Fetch keyboard metadata
client.keyboards('all').then(({ keyboards }) => {
  console.info(keyboards);
}).catch((err) => {
  console.error(err);
});

Check out more usage examples in the examples directory

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

⌨️ Get information on keyboards, compile firmware and more

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published