# Commands

The Commands system defines how features expose control through command structures.

Commands are used to interact with OMS at runtime, typically via `/oms` or custom command branches.

***

### Overview

The Commands system is responsible for:

* defining command structure
* grouping commands into branches
* exposing feature functionality to users

Commands are typically registered by features and integrated into the OMS command tree.

***

### Core Types

#### OMSCommandEntry

`OMSCommandEntry` defines a single command node and its subcommands.

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/oms-api/src/main/kotlin/io/conboi/oms/api/elements/commands/OMSCommandEntry.kt>" %}

***

#### OMSCommandBranch

`OMSCommandBranch` groups multiple command entries under a shared root.

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/oms-api/src/main/kotlin/io/conboi/oms/api/elements/commands/OMSCommandBranch.kt>" %}

***

### Notes

* Commands are built using Brigadier
* Features may expose additional commands
* Command trees are hierarchical
* Commands are registered during initialization


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://conboi.gitbook.io/oms-wiki/developer-guide/runtime-infrastructure/commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
