Skip to content

Commit

Permalink
docs: clarify commander options
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxuum committed Feb 8, 2024
1 parent 2e1bad1 commit b373d9a
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions docs/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,34 @@ CommanderClient.start(
// Register commands or types here
},
{
// The app that will be used to display the Commander UI
// Commander comes with a default app, but you can create your own
app: CommanderApp,
},

// The default key is F2, but you can change it here
activationKeys: [Enum.KeyCode.F2]

// The maximum terminal and command history length, default length is 1000
historyLength: 1000

// If you don't want to register the built-in types, you can change this option
registerBuiltInTypes: true
}
).catch((err) => warn("Commander could not be started:", tostring(err)));
```
</TabItem>

<TabItem value="server" label="Server">
```ts showLineNumbers
CommanderServer.start((registry) => {
// Register commands or types here
}).catch((err) => warn("Commander could not be started:", tostring(err)));
CommanderServer.start(
(registry) => {
// Register commands or types here
},
{
// If you don't want to register the built-in types, you can change this option
registerBuiltInTypes: true
}
).catch((err) => warn("Commander could not be started:", tostring(err)));
```
</TabItem>

Expand Down Expand Up @@ -94,4 +111,4 @@ CommanderServer.start((registry) => {
}).catch((err) => warn("Commander could not be started:", tostring(err)));
```

See the [Registration](/guides/registration.mdx) guide for more details on how these methods work.
See the [Registration](/guides/registration.mdx) guide for more details on how these methods work.

0 comments on commit b373d9a

Please sign in to comment.