> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infilsense.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Commands

> Search and execute registered controls with aliases, arguments, and autocomplete.

Quick Commands is initialized automatically by `Library.new()` and opens with **F2** by default.

> [!NOTE]
>
> Every button, input, slider, and selection created by the library registers a Quick Command. The command ID is stable when you provide `InternalInfo.UniqueCommandId`; otherwise the library generates a random ID.

## Open the palette

```text theme={null}
F2
```

The palette accepts a command followed by optional space-separated arguments:

```text theme={null}
ws 120
noclip on
message hello from quick commands
```

Keyboard input is ignored while a Roblox text box is focused.

## Matching

Quick Commands searches each command's:

* display title
* command ID
* aliases

Matches are ranked:

| Priority | Match |
| :- | :- |
| 1 | Exact |
| 2 | Prefix |
| 3 | Substring |

Within the same priority, command titles are ordered alphabetically.

## Aliases

Aliases can be declared in any of three places:

```lua theme={null}
Aliases = { "preferred" }
Info = { Aliases = { "fallback" } }
InternalInfo = { Aliases = { "also-supported" } }
```

The resolution order is `config.Aliases`, then `Info.Aliases`, then `InternalInfo.Aliases`.

A complete example:

```lua theme={null}
tab:AddSlider({
	Info = { Title = "Field of View" },
	InternalInfo = {
		UniqueCommandId = "camera_fov",
		Aliases = { "fov", "camfov" },
	},
	Min = 70,
	Max = 120,
	Default = 90,
})
```

You can then use:

```text theme={null}
camera_fov 100
fov 100
camfov 100
```

## Buttons

Normal buttons ignore extra arguments:

```text theme={null}
respawn
```

Toggle buttons accept explicit state values:

```text theme={null}
noclip on
noclip off
noclip true
noclip false
noclip 1
noclip 0
```

Without a recognized state argument, the toggle flips.

## Sliders

Numeric sliders accept one number:

```text theme={null}
ws 120
```

Boolean sliders accept:

```text theme={null}
mute on
mute off
mute true
mute false
mute 1
mute 0
```

With no argument, a boolean slider flips and a numeric slider reapplies its current value.

## Inputs

Standard inputs join all arguments into one text string:

```text theme={null}
message hello from quick commands
```

Toggle inputs use an optional state prefix:

```text theme={null}
prefix on [VIP]
prefix off [VIP]
prefix [VIP]
```

Explicit state prefixes are `on`, `true`, `1`, `off`, and `false`.

## Selections

Selection commands match an option using its `Value` or display title. The matcher checks longer multi-word prefixes first.

```text theme={null}
dest Bank Vault
```

Arguments remaining after the selected option are forwarded:

```text theme={null}
player Builderman
```

For a single-select selection, invoking the command with no arguments advances to the next configured option. For a multi-select selection, multiple options can be supplied as separate arguments or as a comma-separated list. The command replaces the selection with those values, then forwards any remaining arguments to the callback. The selection callback receives the selected value for single-select or the full selected-value array for multi-select.

```text theme={null}
features ESP
features ESP Tracers
features ESP,Tracers
features ESP,Tracers true
hide g true
hide g,w,v true
void enemy,vip
bring guard worker
```

For the command `hide` above, `g,w,v` is parsed as the MultiSelect value and `true` is forwarded as the remaining callback argument. `QuickCommands.lua` does not need to know which arguments are options; the Selection component parses its registered options and keeps the Quick Commands layer generic.

## Autocomplete

When the best match begins with the typed query, the palette shows a ghosted completion. Press **Tab** to insert the matched name or alias followed by a space.

Press **Enter** to execute the top result and close the palette.

## Export the command list

`app:ExportQuickCommandsList()` returns every registered command as an array and prints the same entries to the console. When `writefile` is available, the list is also written under `commandIds/`.

```lua theme={null}
local commands = app:ExportQuickCommandsList()
print("Registered commands:", #commands)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.