···5353```kt
5454val TestCommand = Command("test") {
5555 async()
5656-5656+5757 executor {
5858 ctx.sendMesage(text("Hello, world!"))
5959 }
···8181```kt
8282val TestCommand = Command("test") {
8383 aliases("hello")
8484-8484+8585 executor {
8686 ctx.sendMesage(text("Hello, world!"))
8787 }
···9797```kt
9898val TestCommand = Command("test") {
9999 aliases("hello")
100100-100100+101101 executor {
102102 ctx.sendMesage(text("Hello, world!"))
103103- }
104104-103103+}
104104+105105 sub("bye") {
106106 executor {
107107 ctx.sendMessage(text("Bye, world!"))
···123123```kt
124124val TestCommand = Command("test") {
125125 aliases("hello")
126126-126126+127127 val name by arg("name", stringParser()) // stringParser comes from Cloud's StringParser
128128-128128+129129 executor {
130130 ctx.sendMesage(text("Hello, $name!"))
131131 }
···141141This will work for `/hello rad`: `Hello, rad!`. But when we
142142try to do `/hello bye rad`
143143or `/hello rad bye`, we will either get a syntax exception
144144-or this:
144144+or this cloud exception:
145145146146-```
146146+```txt
147147There is no object in the registry identified by the key 'name'
148148```
149149···155155```kt
156156val TestCommand = Command("test") {
157157 aliases("hello")
158158-158158+159159 val name by arg("name", stringParser())
160160161161 executor {
···164164165165 sub("bye") {
166166 val name by arg("name", stringParser())
167167-167167+168168 executor {
169169 ctx.sendMessage(text("Bye, $name!"))
170170 }
···194194```kt
195195val TestCommand = Command("test") {
196196 aliases("hello")
197197-197197+198198 val name by arg("name", stringParser())
199199200200 permission("axi.testcommands.hello")
201201-201201+202202 executor {
203203 ctx.sendMesage(text("Hello, $name!"))
204204 }
205205-205205+206206 // ...
207207}
208208```
···225225226226Well, there's two options:
227227228228-* Use the [KSP processor](/getting-started/ksp) to register
229229- them automatically
230230-* Register them manually
228228+- Use the KSP processor to register them automatically
229229+- Register them manually
231230232231### Automatic Registration
233232234234-First, make sure you have set up
235235-the [KSP processor](/getting-started/ksp).
233233+First, make sure you are using the
234234+Axi gradle plugin, as specified in the
235235+[Quickstart](/getting-started/quickstart) page.
236236237237Then, all you need to do is to add the `@AutoRegistered`
238238annotation to your
···242242@AutoRegistered
243243val MyCommand = Command("hello")
244244```
245245+246246+::: warning
247247+If you are making an Axi module used
248248+by other people, this will not work
249249+due to library loading and classloaders.
250250+See the manual section below.
251251+:::
245252246253### Manual Registration
247254
-69
docs/src/getting-started/ksp.md
···11-# Applying KSP
22-33-This guide will teach you how to set up KSP and Axi's KSP
44-processor, for automatically registering commands and
55-more to come.
66-77-## Applying the plugin
88-99-Apply the plugin to your buildscript:
1010-1111-::: code-group
1212-1313-```kts [build.gradle.kts]
1414-plugins {
1515- id("com.google.devtools.ksp") version "2.1.20-1.0.31"
1616-}
1717-```
1818-1919-```groovy [build.gradle]
2020-plugins {
2121- id 'com.google.devtools.ksp' version '2.1.20-1.0.31'
2222-}
2323-```
2424-2525-:::
2626-2727-## Add the processor
2828-2929-Add the processor to your dependencies:
3030-3131-::: code-group
3232-3333-```kts{2} [build.gradle.kts]
3434-dependencies {
3535- ksp("net.radstevee.axi:axi-ksp")
3636-}
3737-```
3838-3939-```groovy{2} [build.gradle]
4040-dependencies {
4141- ksp 'net.radstevee.axi:axi-ksp'
4242-}
4343-```
4444-4545-:::
4646-4747-::: warning
4848-If you are using shadow, you may have to change
4949-your shaded archive classifier:
5050-5151-::: code-group
5252-5353-```kts{3} [build.gradle.kts]
5454-tasks {
5555- shadowJar {
5656- archiveClassifier = ""
5757- }
5858-}
5959-```
6060-6161-```groovy{3} [build.gradle]
6262-tasks {
6363- shadowJar {
6464- archiveClassifier = ''
6565- }
6666-}
6767-```
6868-6969-:::