# Quick Start

## `Quick Start`

This guide will help you set up and run Kick Bot with a basic configuration after installing the package.

### `Basic Setup`

Create a new JavaScript file (e.g., `bot.js`) and add the following code:

```javascript
const { createBot } = require('kickbot');

// Create a bot instance with minimal configuration
const bot = createBot({
  // Required configuration
  clientId: 'your-kick-client-id',
  clientSecret: 'your-kick-client-secret',
  skillfulApiKey: 'your-skillful-api-key',
  chatroomId: 'your-chatroom-id',

  // Optional to enable the dashboard
  enableDashboard: true,
  dashboardPassword: 'your-strong-password'
});

// Start the bot
bot.start()
  .then(() => console.log('Bot started!'))
  .catch(error => console.error('Failed to start bot:', error));
```

### `Running the Bot`

Run your bot with:

```bash
node bot.js
```

#### `First-Time Authentication`

The first time you run Kick Bot, it will need to authenticate with Kick.com:

1. The bot will start a local server and output a URL which looks like this:&#x20;

   ```
   INFO: Starting authentication process...
   INFO: Auth server started at http://localhost:3000
   INFO: Please open this URL in your browser to authenticate
   ```

2. Open this URL in your browser

3. Log in to Kick.com if prompted

4. Authorize the application<br>

   <figure><img src="https://2166271580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS0TAZCNsj3CIFMwFkHtG%2Fuploads%2FKeVnUyqrEPyw8qYgrhOI%2Fimage.png?alt=media&#x26;token=a9d66da0-5101-4598-a544-93c04be555b3" alt=""><figcaption><p>Authorize The Bot</p></figcaption></figure>

5. Once authorized, the browser will redirect and display a success message\ <br>

   <figure><img src="https://2166271580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS0TAZCNsj3CIFMwFkHtG%2Fuploads%2F2kc4uzuh7k90q8LLfibx%2Fimage.png?alt=media&#x26;token=f35772eb-08de-496d-87c5-df6bd4b3cb46" alt=""><figcaption><p>Example Success Page</p></figcaption></figure>

6. The bot will automatically store the authentication token for future use

7. Your bot is now live and running!  If you enabled the dashboard, you can login and access it on your hosted domain with the `/dashboard` route or `localhost:3000/dashboard` for testing locally<br>

   <figure><img src="https://2166271580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS0TAZCNsj3CIFMwFkHtG%2Fuploads%2FbQEjGmpHVM2HgMVjFdyr%2Fimage.png?alt=media&#x26;token=231a35f3-daed-40f9-9af9-eb7e1997beae" alt=""><figcaption><p>The Dashboard</p></figcaption></figure>

### `Built-in Commands`

KickBot comes with several built-in commands:

| Command               | Description                           |
| --------------------- | ------------------------------------- |
| `!ask [question]`     | Ask the AI a question                 |
| `!help`               | Show available commands               |
| `!agents`             | List available AI agents              |
| `!changeagent [name]` | Start a vote to change the AI agent   |
| `!yes`                | Vote yes in an active vote            |
| `!no`                 | Vote no in an active vote             |
| `!8ball [question]`   | Get a Magic 8-Ball response           |
| `!imagine [scenario]` | Have the AI generate a funny scenario |

### `Basic Configuration`

Here's an example with more configuration options:

```javascript
const bot = createBot({
  // Required configuration
  clientId: 'your-kick-client-id',
  clientSecret: 'your-kick-client-secret',
  skillfulApiKey: 'your-skillful-api-key',
  chatroomId: 'your-chatroom-id',
  
  // Optional configuration
  redirectUri: 'http://localhost:3000/callback',
  serverPort: 3000,
  defaultAgent: 'General Assistant',
  logLevel: 'info', // 'error', 'warn', 'info', 'debug', or 'trace'
  debug: false,
  maxResponseLength: 500,
  
  // Enable additional commands
  enabledCommands: ['8ball', 'imagine'],
  
  // Control whether viewers can change AI agents
  allowAgentChanges: true

  // Enabled / Disable the dashboard
  enableDashboard: true,
  dashboardPassword: 'your-strong-password'
});
```

### `Example: Disabling Agent Changes`

If you want to prevent viewers from changing the AI agent:

```javascript
const bot = createBot({
  // Required configuration
  clientId: 'your-kick-client-id',
  clientSecret: 'your-kick-client-secret',
  skillfulApiKey: 'your-skillful-api-key',
  chatroomId: 'your-chatroom-id',
  
  // Disable agent changes
  allowAgentChanges: false,
});
```

### `Checking Bot Status`

Access the bot status page at `http://localhost:3000/status` to verify:

* Connection status
* Active agent
* Enabled commands

### `Next Steps`

* Learn how to [register custom commands](https://claude.ai/chat/custom-commands.md)
* Explore [advanced configuration options](https://claude.ai/chat/advanced-options.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gaming.skillfulai.io/web-sdk/templates/kick-stream-bot/getting-started/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
