> For the complete documentation index, see [llms.txt](https://envyware.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://envyware.gitbook.io/api-docs/commands/getting-started.md).

# Getting Started

There is currently two ways of registering commands with the EnvyWare command API. But before we can register any commands you will need an instance of the CommandFactory interface.

The command factory handles all registering, parsing, and general platform level operations for the commands.

You can get an instance of the CommandFactory for your platform like so:

```java
public class MainModClass {

    private ForgePlayerManager playerManager = new ForgePlayerManager();
    private ForgeCommandFactory commandFactory = new ForgeCommandFactory(ForgeAnnotationCommandParser::new, playerManager);

}
```

The above example is taken directly from EnvyGyms, and demonstrates getting an instance of the ForgeCommandFactory, using the annotation based parsing (which is currently the only parsing type that exists).

Once you have this command factory you can then parse, and register commands using the `CommandFactory#parse`, and `CommandFactory#register` methods. \\

For velocity you will want to use the `VelocityCommandFactory` and the `VelocityAnnotationCommandParser`.
