TypeScript · ESM · Plugin Runtime
One bot for your groups on QQ, WeChat, Discord, Telegram and 20+ other platforms: operators run it from the browser, developers write it once in TypeScript. Small by default — add AI when you need it.
$ npm create zhin-app my-bot -y
$ cd my-bot && pnpm dev
✔ Bot started — no platform account or model key requiredOne bot, two ways to use it: operators manage it in the browser, developers extend it in code. Pick your role, then a goal.
Read messages, change settings, install features and manage welcomes and reminders in Console. Risky actions wait for approval.
Operator guideOne command to scaffold, a feature is a file, hot reload on save — one codebase on 20+ platforms.
Start buildingYou don't need the full architecture first. Pick a goal — each path fits in one sitting.
No platform account or model key — get a reply in the browser Sandbox.
Start the quick start BUILDWrite your own featuresCommands, keyword replies, schedules, AI tools — drop a file in a folder and it works.
Write a first plugin SHIPConnect platforms and go livePick adapters for QQ / WeChat / Discord and more, then deploy, monitor and upgrade.
Choose a platform OPERATERun it without codeOperators and group owners: read messages, change settings, install features, manage welcomes and announcement approvals in Console.
Operator guideQQ, WeChat, WeCom, DingTalk, Lark, Discord, Telegram, Slack, KOOK, LINE… Your code sees one kind of message; adapters handle the platform differences.
commands/hello/index.ts is the /hello command. Middleware, components, schedules and AI tools work the same way — no registration boilerplate.
Save to hot-reload. In-flight messages finish on the old version, and if the new code throws, the old version keeps serving.
The built-in Sandbox is a simulated chat window. Build and test everything without any platform account or model key.
Open console.zhin.dev, enter your address and token: send test messages, read logs, edit config, manage plugins. Nothing to deploy.
The default install is an IM core under 10MB. Run npx zhin setup --ai to add models, tools, memory and MCP.
Smallest form: one bot.ts is the whole bot.
import { definePlugin } from 'zhin.js';
import { defineCommand } from 'zhin.js/command';
export default definePlugin({
name: 'my-bot',
setup({ addCommand }) {
addCommand('hello', defineCommand({
description: 'Say hello',
execute: () => 'Hello from Zhin!',
}));
},
});As it grows: one file per capability, auto-registered from convention folders.
my-bot/
├── plugin.ts # entry: definePlugin()
├── commands/hello/index.ts # the /hello command
├── middlewares/… # keyword replies, filters
├── tools/… # tools the AI can call (optional)
└── zhin.config.yml # port, platform credentials, modelsRunning in 10 minutes (no accounts or keys):
npm create zhin-app my-bot -y
cd my-bot && pnpm devHTTP_TOKEN from .env/hello in the SandboxNext