Since the Command API makes use of the Text API, make sure you read Tekst first.
The most comfortable way to create a new command is the
CommandSpec builder, which will be detailed in this section.
It supports child commands and argument parsing.
Alternatively, you can use
CommandCallable, a lower-level interface which provides access to the raw command data.
It is described on this page.