> For the complete documentation index, see [llms.txt](https://rdswiki.raftmodding.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rdswiki.raftmodding.com/programming/creating-console-commands.md).

# Creating console commands

Console commands are created through attributes and only works with STATIC methods.\
Here's different examples :&#x20;

```csharp
[ConsoleCommand("hi", "Says hi to you")]
public static string TestCommand()
{
    return "Hi console"
}
```

Console commands can also have arguments with a `string[] args` parameter as shown below.

```csharp
[ConsoleCommand("mycommand")]
public static void TestCommand(string[] args)
{
    // Do your stuff with the args string array. (does not include the initial command)
}
```
