Installation

Basics

In order to use Gears, you'll need to install it. If you are using TypeScript you do not need to worry about types as they are included natively.

npm install @enitoni/gears

Or, if you're using Yarn

yarn add @enitoni/gears

Using with third party libraries

Gears is designed to be fully generic so it can work with anything that exposes a messaging interface. A messaging interface refers to anything that emits a message, an example would be the demo on the home page, a Discord bot, or even typing things in a command line.

Currently, we provide these official libraries for working with Gears:

When you need to import the classes, import them from the binding library not Gears itself. You can import matchers from Gears itself since they will work regardless.

Correct example:

import { Bot, Adapter, Command } from "@enitoni/gears-readline"

Incorrect example:

import { core } from "@enitoni/gears"
Understanding Gears