mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
create-chat-sdk
Scaffold a new Chat SDK bot project.
Chat SDK is a unified TypeScript SDK by Vercel for building chat bots across Slack, Teams, Google Chat, Discord, WhatsApp, and more.
Quick Start
npm create chat-sdk@latest my-bot
Or with your preferred package manager:
pnpm create chat-sdk@latest my-bot
yarn create chat-sdk my-bot
bunx create-chat-sdk@latest my-bot
You can also run the binary directly:
npx create-chat-sdk@latest my-bot
pnpm create chat-sdk my-bot
bunx create-chat-sdk my-bot
The CLI walks you through selecting platform adapters, a state adapter, and installs dependencies for you.
Usage
Usage: create-chat-sdk [options] [name]
Arguments:
name name of the project
Options:
-d, --description <text> project description
--adapter <values...> platform or state adapters to include (skips interactive prompt)
--pm <manager> package manager to use (npm, yarn, pnpm, bun)
-y, --yes skip prompts and accept defaults
--no-install skip dependency installation
-q, --quiet suppress non-essential output
--no-color disable color output (respects NO_COLOR)
-h, --help display help for command
Examples
Interactive mode (prompts for everything):
npm create chat-sdk@latest
Provide a name and let the CLI prompt for the rest:
npm create chat-sdk@latest my-bot
Skip adapter prompts by passing them directly:
npm create chat-sdk@latest my-bot --adapter slack teams redis
Fully non-interactive:
npm create chat-sdk@latest my-bot -d 'My awesome bot' --adapter slack redis -y
Silent non-interactive (for CI/scripts):
npm create chat-sdk@latest my-bot --adapter slack pg -yq --pm pnpm --no-install
Available Adapters
Messaging Platforms
| Adapter | Flag value | Package |
|---|---|---|
| Slack | slack |
@chat-adapter/slack |
| Microsoft Teams | teams |
@chat-adapter/teams |
| Google Chat | gchat |
@chat-adapter/gchat |
| Discord | discord |
@chat-adapter/discord |
| Telegram | telegram |
@chat-adapter/telegram |
whatsapp |
@chat-adapter/whatsapp |
|
| Beeper Matrix | matrix |
@beeper/chat-adapter-matrix |
| Photon iMessage | imessage |
chat-adapter-imessage |
| Zernio | zernio |
@zernio/chat-sdk-adapter |
Developer Tools
| Adapter | Flag value | Package |
|---|---|---|
| GitHub | github |
@chat-adapter/github |
| Linear | linear |
@chat-adapter/linear |
| Resend | resend |
@resend/chat-sdk-adapter |
| Liveblocks | liveblocks |
@liveblocks/chat-sdk-adapter |
State
| Adapter | Flag value | Package | Notes |
|---|---|---|---|
| In-Memory | memory |
@chat-adapter/state-memory |
Development only |
| Redis | redis |
@chat-adapter/state-redis |
node-redis driver |
| ioredis | ioredis |
@chat-adapter/state-ioredis |
ioredis driver |
| PostgreSQL | pg |
@chat-adapter/state-pg |
What You Get
The scaffolded project is a Next.js app with:
src/lib/bot.ts- Bot configuration with your selected adapterssrc/app/api/webhooks/[platform]/route.ts- Dynamic webhook route.env.example- Pre-populated with the environment variables for your adaptersnext.config.ts- Configured with any requiredserverExternalPackages
After Scaffolding
cd my-bot
cp .env.example .env.local
# Fill in your credentials in .env.local
npm run dev
See the Chat SDK docs for platform setup guides and API reference.
License
MIT