https://github.com/pomdtr/smallweb-telegram-bot
access the smallweb cli from telegram
https://github.com/pomdtr/smallweb-telegram-bot
smallweb-app
Last synced: 10 months ago
JSON representation
access the smallweb cli from telegram
- Host: GitHub
- URL: https://github.com/pomdtr/smallweb-telegram-bot
- Owner: pomdtr
- Created: 2024-12-18T16:59:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-19T20:53:07.000Z (over 1 year ago)
- Last Synced: 2025-07-05T18:11:31.881Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegram Integration for smallweb
## Install
First install the entrypoint:
```ts
// ~/smallweb/telegram/main.ts
import { Telegram } from "jsr:@smallweb/telegram@";
const telegram = new Telegram();
export default telegram;
```
Then, register the app as an admin app:
```json
// ~/.smallweb/config.json
{
// ...
"adminApps": [
// ...
"telegram"
]
}
```
## Initial Setup
1. Create a new bot using the [BotFather](https://t.me/botfather)
2. Set-up the required environment variables
- Copy the token and set it as the `TELEGRAM_BOT_TOKEN` environment variable
- Set the `TELEGRAM_BOT_SECRET` environment variable to a random string
3. Use `smallweb run telegram set-webhook` to set the webhook
You should also set up the `TELEGRAM_CHAT_ID` environment variable to the chat id of the chat that should be allowed to run smallweb commands.
## Usage
Most cli commands are available. Use `help` to see the list of available commands.