Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
🔨 Build a more dynamic bot 🚀 using Baileys as a foundation for WhatsApp 📱. Turn your ideas into reality and take interaction to the next level! 💡🌐
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A TypeScript framework for messaging bots. Write handlers and conversation flows once and run them on WhatsApp (the unofficial Baileys 7 protocol, the official Meta Cloud API, the self-hosted Evolution API and WPPConnect gateways, Twilio or Gupshup), Telegram, Facebook Messenger, Instagram DMs, Discord, email, SMS (Twilio) and HighLevel CRM conversations, with an experimental provider for TikTok. Try your bot in the terminal before connecting a phone, test it without a network, and add AI, persistence or multiple replicas when you need them.
Documentation: https://botmesh.afaya.com.co/ (English · Español · API reference)
import { Bot, flow } from '@botmesh/core'
import { BaileysProvider } from '@botmesh/baileys'
const bot = new Bot({ provider: new BaileysProvider({ session: 'my-bot' }) })
bot.when('hi', (ctx) => ctx.reply('👋 Hello!'))
bot.use(
flow('signup')
.ask('What is your name?', 'name')
.say((_ctx, c) => `Nice to meet you, ${c.state.name}!`),
)
await bot.start() // scan the QR with WhatsApp → Linked devices
Swap BaileysProvider for TelegramProvider (@botmesh/telegram) or CloudAPIProvider (@botmesh/meta) and the rest stays the same.
npm create botmesh my-bot # templates: baileys, telegram, meta, ai, store, support…
cd my-bot && npm install
npm run dev # chat with the bot in the terminal: no phone, no credentials
npm start # connect the real channel
Or add it to an existing project (Node >= 22, ESM-only):
npm install @botmesh/core @botmesh/baileys # WhatsApp (Baileys)
npm install @botmesh/core @botmesh/telegram # Telegram
npm install @botmesh/core @botmesh/meta # WhatsApp Cloud API
npm install @botmesh/ai @anthropic-ai/sdk # + AI (optional; the SDK of the provider you use)
Beta. botmesh is in beta: a plain install gets the beta, and
@betaalways resolves to the newest one (latestis moved by hand after each publish). The docs describe this beta; once@botmesh/core2.0.0 ships, the commands stay the same.
The getting started guide walks through the simulator, linking WhatsApp and connecting Telegram step by step.
AI on WhatsApp: since 2026-01-15 the WhatsApp Business Platform terms forbid general-purpose AI assistants (open ChatGPT-style chatbots). AI in the service of the business (support, sales, bookings) is allowed. Details in the AI plugin guide.
This is a pnpm monorepo with 45 packages: 36 Public, 3 Experimental and 6 Product and internal ones. They are not all equally mature, and the Status column says so plainly:
private. Not published yet and its API may change.private) over any core DurableKv. Per-tenant isolation and compare-and-set in the backend; the API may still change.| Package | Status | Description |
|---|---|---|
| Core | ||
@botmesh/core | Public | Transport-agnostic engine: Bot, IProvider v2, dispatcher, flows/conversations, hooks, plugins, store, testing kit. |
| Transports (channels) | ||
@botmesh/baileys | Public | WhatsApp through Baileys 7 (unofficial, QR or pairing code). |
@botmesh/meta | Public | Official WhatsApp Cloud API (webhook, no ban risk, native buttons/lists/templates). |
@botmesh/telegram | Public | Telegram Bot API (long-poll/webhook, inline keyboards, native polls). |
@botmesh/messenger | Public | Facebook Messenger (Meta Graph Send API, signed webhooks, postback buttons, generic templates). |
@botmesh/instagram | Public | Instagram DMs (Messenger API for Instagram, signed webhooks, quick replies). |
@botmesh/discord | Public | Discord (gateway websocket + REST, slash/components). |
pnpm install # install the whole workspace
pnpm build # pnpm -r build → compiles every package
pnpm test # pnpm -r test → full suite
pnpm run docs # TypeDoc + VitePress → documentation site
Per package: pnpm --filter @botmesh/ai test, pnpm --filter @botmesh/core build, and so on.
| Example | What it shows |
|---|---|
examples/bakery-ai | AI ordering assistant for a bakery (in English) on WhatsApp, through Baileys (QR) or Twilio (webhook with @botmesh/server). Tools with confirmation, totals computed in code, dedupe, an access list, typed configuration and tests with no network. |
They build and test with the rest of the workspace (pnpm build, pnpm test). Each example ships its own README with the commands to run it.
/es/ and the API reference). Sources in docs/ (English in docs/guide/, Spanish in docs/es/guide/); preview locally with pnpm docs:dev.BaileysClass): docs/MIGRATION-v1-to-v2.md.ROADMAP.md.FEATURES.md.SECURITY.md.docs/superpowers/specs/ and docs/superpowers/plans/.See CONTRIBUTING.md. Relevant changes go in CHANGELOG.md.
MIT © Andres Aya
@botmesh/evolution| Public |
| WhatsApp through Evolution API (self-hosted REST gateway, signed webhook). |
@botmesh/wppconnect | Public | WhatsApp through WPPConnect Server (REST + token webhook). |
@botmesh/twilio | Public | WhatsApp and SMS through Twilio Programmable Messaging (X-Twilio-Signature webhooks). |
@botmesh/gupshup | Public | WhatsApp through Gupshup (API v1 + v2 callbacks). |
@botmesh/gohighlevel | Public | GoHighLevel / LeadConnector (Conversations API + signed InboundMessage webhooks). |
@botmesh/email | Public | Email: inbound IMAP IDLE + outbound SMTP, threading, loop and bounce protection. |
@botmesh/tiktok | Experimental | TikTok API for Business: DMs (Business Messaging) and replies to comments on your own videos. |
| Stores (persistence) |
@botmesh/sqlite-store | Public | SQLite (better-sqlite3, WAL). |
@botmesh/redis-store | Public | Distributed Redis (+ multi-replica lock). |
@botmesh/postgres-store | Public | PostgreSQL (pg): shared state, durable scheduler and durable inbox/outbox. |
@botmesh/mysql-store | Public | MySQL/MariaDB (mysql2): shared state and durable scheduler. |
@botmesh/mongo-store | Public | MongoDB (mongodb 6 or 7): shared state and durable scheduler. |
| Plugins |
@botmesh/ai | Public | AI: Anthropic/OpenAI/Ollama/Gemini + 9 OpenAI-compatible presets (DeepSeek/Qwen/GLM/Kimi/Groq/…), auto-reply, tool calling with confirmation, per-user long-term memory and RAG. See the WhatsApp AI policy. |
@botmesh/nlu | Public | Local intents/NLU (define/match + whenIntent), no external services. |
@botmesh/manager | Experimental | Multi-bot orchestrator (registry, lifecycle) + dependency-free HTTP API (control plane /v1 with API keys). |
@botmesh/otel | Public | OpenTelemetry: bot traces (inbound, dispatch, conversations, sends, AI) and bot.metrics() as OTel metrics. @opentelemetry/api as an optional peer. |
@botmesh/events | Public | Versioned envelopes, leased journals with fencing tokens, retries and DLQ for asynchronous processes, and a bot durability backend. |
@botmesh/rag | Public | RAG for @botmesh/ai: loaders, chunking, pluggable embeddings (OpenAI-compatible, Ollama, local hashing) and an in-memory vector index with optional JSON persistence. |
@botmesh/voice | Public | Voice: voice-note transcription (OpenAI-compatible, Deepgram) and spoken replies (OpenAI, ElevenLabs). |
@botmesh/chatwoot | Public | Chatwoot bridge: two-way sync and human handoff driven by Chatwoot agents. |
@botmesh/tickets | Public | Support tickets and queues (ctx.tools.tickets): queue position, business hours and store persistence. |
@botmesh/moderation | Public | Group moderation: anti-spam, word/regex and invite-link filters, warn/mute/kick/delete actions. |
@botmesh/dialogflow | Public | Dialogflow ES/CX: detectIntent over REST (service-account JWT, no Google SDK) and intent routing to flows. |
| Shared infrastructure (dependencies of the public packages) |
@botmesh/http | Public | Safe HTTP client: anti-SSRF, redirect validation, timeouts and download limits. |
@botmesh/graph-core | Public | Shared Meta Graph helpers (webhook verification, error mapping, ingest guard) used by meta/messenger/instagram. |
@botmesh/wa-gateway-kit | Public | Code shared by the WhatsApp REST gateways (evolution, wppconnect): REST client over secureFetch, outbound media resolution and LID/PN identity reconciliation. Installed as their dependency. |
@botmesh/server | Public | Webhook ingress for the providers: raw body, size limits, timeouts, concurrency and health endpoints for node:http, Express, Fastify and Hono (no dependencies). |
| Product / operations (private, persistent) |
@botmesh/inbox | Product | Persistent omni-channel inbox: CAS assignment, handoff, notes, unread, SLA and ledger projection (attachInbox). |
@botmesh/crm | Product | Contacts, tags, attributes, consent (lossless CAS) and per-tenant segments. |
@botmesh/hub | Product | Per-tenant plugin registry: validated manifests and permission-gated enabling. It does not run or sandbox code. |
@botmesh/campaigns | Product | Consent-aware campaigns: durable per-recipient reservations (TTL), atomic settlement and sendCampaign() over bot.broadcast(). |
@botmesh/deployments | Product | Immutable versions, active version, gate reservations, rollback and audited gate runs (including the golden-transcript gate). |
@botmesh/tenant-kv | Internal | Per-tenant JSON documents with compare-and-set over any DurableKv: the base of the product packages. |
| Tooling |
create-botmesh | Public | CLI scaffolder (npm create botmesh), 10 templates: baileys, meta, telegram, ai and the use-case ones games, support, store, restaurant, clinic, ai-full. Every project ships an AGENTS.md for coding agents. |
@botmesh/flow-schema | Public | Versioned JSON documents for code-free flows: validation, safe expressions, compilation to CompiledFlow, reverse export, migrations and deployment helpers. |
eslint-plugin-botmesh | Public | ESLint rules for bots: v1 API leftovers, blocking runtime.enter, async install, empty triggers, ask without timeout and per-user global state. |
@botmesh/sandbox | Experimental | Local simulators of WhatsApp Cloud API, Messenger, Instagram, Twilio, Gupshup, HighLevel, TikTok, Discord and Telegram (signed webhooks, realistic errors, request-shape checks) with a web chat UI: pnpm sandbox. Docker suites for Evolution API, WPPConnect, Chatwoot and Mailpit. |
@botmesh/mcp | Public | Stdio MCP server for coding agents (npx -y @botmesh/mcp, no third-party dependencies): validates, compiles, renders, lints, migrates and diffs JSON flow documents without starting a bot; with --docs it searches these guides. |