ChatGPT-Telegram-Workers ships one file and a KV namespace
Easily deploy your Telegram ChatGPT bot on Cloudflare Workers (or Vercel, Docker...).
At a glance
- What is it?
- ChatGPT-Telegram-Workers is a Telegram bot that forwards messages to an AI provider, built so the whole thing can be pasted as a single file onto Cloudflare Workers, Vercel or Docker. Its one click deploy clones the repository, creates the key value namespace and asks for a bot token, while the source in the repository is a pnpm workspace with separate builds for the Workers and Vercel targets.
- Who is it for?
- This project suits someone who wants a private Telegram bot pointing at their own AI provider key without setting up a server or buying a domain. It does not suit a team that needs per user rate limits, audit logging or a support commitment, since the configuration lives in a key value namespace and the admin surface is a Telegram Mini App.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 12 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.
Star history
- tbxark/ChatGPT-Telegram-Workers3,814 ★ · +11
| Repository | 2026-09-14 | 2026-11-13 |
|---|---|---|
| tbxark/ChatGPT-Telegram-Workers | 3.8k | 3.8k |
11 Stars in the last 60 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The promise is one file, no domain and no server
The About paragraph is the whole pitch, and it is a list of things you do not have to do. The project describes itself as the simplest and fastest way to deploy your own ChatGPT Telegram bot: use Cloudflare Workers, a single file, copy and paste it directly, with no dependencies required, no need to configure a local development environment, no domain name required, and serverless operation. That is a real engineering constraint rather than a slogan, and it explains the shape of the repository. A single file that can be pasted anywhere has to carry its own bundle, which is why the published package exposes exactly one file, the dist entry point, as both its main and its module. There is also a system initialisation setting, described as customisable so that the personality you debugged never disappears when a prompt is regenerated.
One click clones the repository and creates the namespace
The deployment documentation starts with a button rather than instructions, and the one line describing it is precise about what happens. Cloudflare clones the repository, creates the key value namespace, asks for your bot token, and deploys. So the two secrets a user has to supply are the Telegram bot token and, later, an API key for whichever AI provider they pick, and everything else is provisioned by the platform. The configuration itself is described as a simple key value based configuration, and the repository carries the matching platform files at the root: a worker configuration file written as JSON with comments, a variables example for local secrets, and a deployment descriptor for the Vercel target. A Vercel deployment has its own document, and running locally or in Docker has a third.
Seven providers behind a Mini App admin panel
Provider support is the first thing listed as a feature, and seven names are given: OpenAI, Cloudflare AI, Cohere, Anthropic, Mistral, DeepSeek and Groq. Two of them are notable for different reasons, one being the option to keep the traffic inside Cloudflare's own inference and the other being the ability to point at a provider with an OpenAI compatible interface. Configuration does not happen through a config file alone, because the project ships a web admin panel built as a Telegram Mini App for managing AI providers and settings. There is also a custom command system whose stated purpose is quick switching of models and switching of robot presets, which is the difference between a bot you reconfigure and a bot you talk to about its own configuration.
One build, three deployment targets
The same code is compiled for three places and the file layout shows how. The server package emits two bundles, one for a Node server and one named for Vercel, and both are copied into the container image alongside a separate manifest used only for Docker. The deployment descriptor for Vercel sits at the repository root next to the worker configuration, which is why a single build can serve a serverless function and a container. The compose file is four lines of substance: it builds from the Dockerfile, maps port 8787, mounts your local config file and worker configuration as read only volumes with a comment telling you to change the paths, and uses host networking on the stated grounds that a proxy port may be reached through the host. So a local run is meant to look like production rather than like a sandbox.
The Docker build installs a compiler and then removes it
The container file is written with comments explaining its own awkward parts, which is how you find the interesting detail. The runtime image is a slim Node image, and the build stage installs the package manager globally at a pinned version before copying the source. In the production stage, the system package manager installs python3, make and a C++ compiler, runs the install, and then purges all three plus their dependencies and clears the apt lists. The comment gives the reason: the SQLite driver may fall back to compiling from source when no prebuilt binary matches the platform, so the toolchain is needed for the install step only and is removed to keep the image small. The container then exposes port 8787 and starts the compiled server entry point:
EXPOSE 8787
CMD ["node", "/app/dist/node.js"]pnpm is pinned twice because corepack is no longer bundled
The build stage carries a note about Node 25 and above no longer bundling the package manager shim, which is a change that breaks a lot of older Dockerfiles. The workaround is written into the comment: install the pnpm version pinned in the manifest's package manager field directly, which the file does with a global install of a specific pnpm version. So there are two places that must agree, the package manager field in the manifest and the version in the Dockerfile, and a mismatch shows up as a build failure rather than as a warning. The repository is a workspace, with a workspace manifest and a lock file at the root, and installation uses a frozen lock file with a mounted cache so repeated builds do not refetch the store.
The manifest reads 1.10.7 while the newest tag is 2.0.0
There is a version inconsistency worth knowing about. The published releases are 2.0.0 on 2026-09-15, then 1.10.7 on 2025-02-27 and 1.10.6 on 2025-02-05, so the two most recent releases are seven months and one day apart. The package manifest in the repository, however, still carries the version 1.10.7. The reason is visible in the scripts: a version script runs a TypeScript file under the scripts directory to generate the version, which is the usual pattern for deriving it from tags rather than typing it in. The last push to the default branch master is dated 2026-09-15, the same day as the 2.0.0 tag, and the repository is not archived. Because the two numbers disagree, a deployment that pins the package version and a deployment that pins the release tag get different code.
Streaming, images and plugins fill out the tail of the feature list
The remaining features are small and independent of each other. Streaming output is listed, so replies arrive progressively rather than as one message. Multi language support is listed, which pairs with the Chinese README sitting beside the English one at the root. Text to image generation is listed, which means the bot is not only a text forwarder. And a plugin system is listed with its own documentation page and a plugins directory at the repository root, described as customizable plugins. Around those, the toolchain is equally modern and equally small: linting runs through one binary with its own configuration file, formatting has a separate configuration file, the TypeScript build is checked through a separate project configuration from the main one, and tests run across the workspace with an end to end suite that builds the server first.
Editorial conclusion
This project suits someone who wants a private Telegram bot pointing at their own AI provider key without setting up a server or buying a domain. It does not suit a team that needs per user rate limits, audit logging or a support commitment, since the configuration lives in a key value namespace and the admin surface is a Telegram Mini App. Before deploying, decide which provider you will use and read the configuration and commands document, and note that the manifest version and the newest release tag disagree, so pin the release rather than the package version.
Frequently asked questions
Can ChatGPT be integrated with Telegram?
Yes, and that is what this project does: it is a Telegram bot that forwards messages to an AI provider. Provider support is listed for OpenAI, Cloudflare AI, Cohere, Anthropic, Mistral, DeepSeek and Groq, and the bot runs as a single file on Cloudflare Workers, Vercel or Docker.
How do I deploy the ChatGPT Telegram bot to Cloudflare Workers?
Either use the one click deploy button, where Cloudflare clones the repository, creates the key value namespace, asks for your bot token and deploys, or copy the single built file into a worker of your own. No domain name, server or local development environment is required.
How is the bot configured?
Through a simple key value based configuration, with an example variables file for local secrets and a worker configuration file at the repository root. A web admin panel built as a Telegram Mini App manages AI providers and settings, and custom commands allow quick switching of models and robot presets.
Can I run the ChatGPT Telegram bot with Docker?
Yes. The compose file builds the image, maps port 8787, mounts your config file and worker configuration as read only volumes, and uses host networking. The container installs a C++ toolchain during the install step only, because the SQLite driver may need to compile from source, and purges it afterwards to keep the image small.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/tbxark-chatgpt-telegram-workers)Star history chart for your README
[](https://hysenlabs.com/projects/tbxark-chatgpt-telegram-workers)Was this useful?