Lightweight command framework for building Kick.com bots on top of @manaobot/kick.
Designed for Bun. Built for simplicity.
KickIt is a minimal command framework built on top of @manaobot/kick.
It provides a clean abstraction for:
- Command handling
- Context-based message responses
- Webhook-driven bots
- Optional ngrok integration
KickIt does not replace the SDK β it extends it with a simple developer experience.
bun add @manaobot/kickitKickIt optionally supports ngrok for local development. To enable ngrok support, also install the ngrok package:
bun add @ngrok/ngrokimport {KickIt} from "../src";
const bot = new KickIt({
prefix: "!",
auth: {
clientId: Bun.env.KICK_CLIENT_ID!,
clientSecret: Bun.env.KICK_CLIENT_SECRET!,
accessToken: Bun.env.KICK_ACCESS_TOKEN!,
refreshToken: Bun.env.KICK_REFRESH_TOKEN!,
expiresAt: parseInt(Bun.env.KICK_EXPIRES_AT!, 10) || Date.now(),
scopes: ["chat:write", "events:subscribe", "moderation:ban", "channel:read"],
},
ngrok: {
authtoken: Bun.env.NGROK_AUTHTOKEN,
domain: "topical-goshawk-leading.ngrok-free.app",
port: 5000,
path: "/kick/webhook",
},
});
bot.command("ping", async (ctx) => {
await ctx.reply("pong π");
});
bot.command("love", async (ctx) => {
const target = ctx.args.join(" ") || ctx.event.sender.username;
const percent = Math.floor(Math.random() * 101);
await ctx.reply(
`${ctx.event.sender.username} β€οΈ ${target}: ${percent}%`
);
});
await bot.start();bot.command("hello", async (ctx) => {
await ctx.reply("Hello chat!");
});- Prefix-based commands
- Context-driven handlers
- Async support
Every command receives a structured context:
ctx.client // KickClient instance
ctx.event // Raw webhook event
ctx.args // Command arguments
ctx.reply() // Send chat messageThis keeps KickIt lightweight while still giving full access to the SDK.
KickIt uses the official SDK internally:
- OAuth authentication
- Webhook subscriptions
- REST API access
- Chat messaging
You can still access the SDK directly:
ctx.client.api.users.get()Local development is easy:
ngrok: {
authtoken: "...",
domain: "your-domain.ngrok-free.app"
}KickIt automatically:
- starts webhook server
- opens ngrok tunnel
- subscribes to events
KickIt ships with a built-in CLI tool for authenticating with Kick and obtaining OAuth tokens. This is the fastest way to get your access token, refresh token, and expiry before wiring them into your bot config.
bunx kickit --clientId <id> --clientSecret <secret> --scopes <scopes>| Flag | Short | Type | Description |
|---|---|---|---|
--clientId |
-i |
string | Your Kick application client ID. Prompted interactively if omitted. |
--clientSecret |
-s |
string | Your Kick application client secret. Prompted interactively if omitted. |
--scopes |
string | Comma or space separated list of OAuth scopes to request. Required. | |
--port |
-p |
string | Local port for the OAuth callback server. Defaults to 3000. |
--save-env |
boolean | Automatically write tokens to a .env file instead of printing to stdout. |
Pass one or more valid KickScopes values separated by commas or spaces:
--scopes "chat:write,events:subscribe,channel:read"
# or
--scopes "chat:write events:subscribe channel:read"Invalid scope values are ignored with a warning β the CLI will still proceed if at least one valid scope is provided.
Interactive credential entry (credentials prompted securely):
bunx kickit --scopes "chat:write,events:subscribe"Fully non-interactive:
bunx kickit -i your_client_id -s your_client_secret --scopes "chat:write,events:subscribe" --port 4000Save tokens directly to .env:
bunx kickit -i your_client_id -s your_client_secret --scopes "chat:write" --save-envWithout --save-env, the CLI prints the tokens to stdout so you can copy them into your environment:
Add the following to your environment variables:
KICK_ACCESS_TOKEN=...
KICK_REFRESH_TOKEN=...
KICK_EXPIRES_AT=...
==========> Scopes granted: chat:write, events:subscribe
β Authorization completed.
With --save-env, tokens are written to your .env file automatically and the above output is skipped.
bot.command("love", async (ctx) => {
const target = ctx.args.join(" ") || ctx.event.sender.username;
const percent = Math.floor(Math.random() * 101);
await ctx.reply(`${ctx.event.sender.username} β€οΈ ${target}: ${percent}%`);
});KickIt is intentionally minimal.
It focuses only on:
- Command handling
- Context abstraction
- Developer ergonomics
It does not attempt to replace the underlying SDK.
If you need low-level control, use:
ctx.clientPull requests are welcome.
You can help by:
- improving typings
- adding examples
- suggesting framework features
Join the Discord server:
GPL-3.0 License
See LICENSE file for details.
KickIt works alongside:
@manaobot/kickβ Core SDK- KickIt β Command framework