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

# Usage

CommandPrompter intercepts a player's command when it contains prompt tags, pauses execution, collects the answers in order, substitutes them into the command, and dispatches the completed result.

By default, tags use angle brackets:

```
/ban <Who should be banned?> <Reason?>
```

If the answers are `Steve` and `Griefing`, the final command is `/ban Steve Griefing`.

## Prompt types

Add a key at the start of a tag to choose a UI:

| Key              | Prompt                                                            |
| ---------------- | ----------------------------------------------------------------- |
| Empty            | [Chat](/commandprompter/prompts/chat-prompt.md)                   |
| `a:`             | [Anvil UI](/commandprompter/prompts/anvil-ui-prompt.md)           |
| `s:`             | [Sign UI](/commandprompter/prompts/sign-ui-prompt.md)             |
| `p:`             | [Player UI](/commandprompter/prompts/player-ui-prompt.md)         |
| `d:`             | [Dialog UI](/commandprompter/prompts/dialog-ui-prompt.md)         |
| `c:`, `confirm:` | [Confirmation](/commandprompter/prompts/confirmation-prompt.md)   |
| `i:`, `item:`    | [Item Selector](/commandprompter/prompts/item-selector-prompt.md) |

Keys configured in `screen-mappings` (`prompt-config.yml`) route to their configured built-in screen type. Third-party plugins can also register [custom screen](/commandprompter/developers/custom-screens.md) keys. An unknown or misspelled key now fails closed: CommandPrompter cancels interception and logs the unresolved key instead of silently opening Chat.

Reusable prompt definitions can be referenced with `<@preset_id>`. See [Presets](/commandprompter/prompts/presets.md).

For multi-stage workflows, see [Command Flows](/commandprompter/features/command-flows.md) for target approvals, conditions, post-action transformers, and early termination.

## Menu plugin integration

Menu plugins such as DeluxeMenus can put inline tags directly in player commands:

```yaml
'ban_button':
  material: BARRIER
  slot: 13
  display_name: '&cBan a Player'
  left_click_commands:
    - '[close]'
    - '[player] ban <a:Who should be banned?> <Reason?>'
```

Some menu plugins dispatch commands without a player command event. In that case, use a [Console Delegate](/commandprompter/features/console-delegate.md) or [Player Delegate](/commandprompter/features/player-delegate.md):

```yaml
left_click_commands:
  - '[close]'
  - '[console] consoledelegate %player_name% ban <a:Who should be banned?> <Reason?>'
```

Use `%target_player%` inside delegated commands when the target's name must be inserted into the completed command.

## Delimiters and MiniMessage

`Argument-Regex` is the legacy name of the delimiter setting; only its first and last characters are used. With default `< >` delimiters, `Ignore-MiniMessage: true` keeps recognized standard MiniMessage tags from becoming prompts.

To include a literal configured delimiter, prefix it with a backslash (`\<` or `\>` by default). Reload after changing delimiter or MiniMessage settings.

For flags, validation, title displays, and post-command tags, continue with [Arguments](/commandprompter/getting-started/arguments.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cyr1en.gitbook.io/commandprompter/getting-started/usage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
