Skip to content
SoulFire LogoSoulFire

Complete command

POST
/v1/commands:complete

Retrieves tab-completion suggestions for a partial command. Uses Brigadier's completion system to generate context-aware suggestions based on the command structure and current cursor position.

Permission requirements depend on the scope (same as ExecuteCommand).

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Request Body

application/json
  1. body

Request message for getting tab-completion suggestions for a partial command.

scope*

The execution scope that determines which instances/bots are visible for completion suggestions. Must be set to one of the scope options.

command*string

The partial command string to complete. May be an incomplete command that the user is typing, e.g., "mov" or "move 100 ".

cursor*integer

The cursor position within the command string (0-indexed). Completions will be generated for the token at this position. Typically this is the length of the command string for end-of-line completion.

Formatint32

Response Body

Response message containing tab-completion suggestions.

application/json
  1. response

Response message containing tab-completion suggestions.

suggestions*array<>

List of completion suggestions for the partial command. May be empty if no completions are available. Suggestions are generated based on the command's Brigadier definition and the current execution scope's visibility.

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/commands:complete' \
  -H 'Content-Type: application/json' \
  -d '{
  "command": "",
  "cursor": 0
}'
Example Response
{
  "suggestions": [
    {
      "suggestion": "string",
      "tooltip": "string"
    }
  ]
}

Was this page helpful?