**by **@PanditSiddharth
For Docker first:
sudo usermod -aG docker $USER
newgrp docker
- Go to @BotFather.
- Send
/newbot
to create a new bot. - Follow instructions for name + username (must end with
bot
).
You will get bot token and bot link after setup.
- Go to @MissRose_bot.
- Send
/info
. - You’ll see your Telegram user ID.
- Install Termux from F-Droid.
- Run these commands:
pkg update && pkg upgrade -y pkg install nodejs git -y git clone https://github.com/PanditSiddharth/compilers.git compiler cd compiler npm install node index.js
Ignore red warnings; bot is running.
Requirements: Node.js installed, optional compilers (C/C++, Python, Java, etc.)
-
Create project:
mkdir compiler && cd compiler npm init -y npm install iocompiler
-
Create
index.ts
(orindex.js
):import { config } from "dotenv"; config(); import { compiler } from "iocompiler"; import { Telegraf } from "telegraf"; import https from "https"; const agent = new https.Agent({ family: 4 }); const bot = new Telegraf(process.env.BOT_TOKEN as string, { telegram: { agent } }); bot.launch({ dropPendingUpdates: true }); compiler(bot as any);
-
Create an
ioconfig.json
in your project root: -
Run the project:
node index.js
- Make sure Docker is installed and running.
- Clone and run inside a container:
git clone https://github.com/PanditSiddharth/compilers.git compiler cd compiler docker build -t iocompiler . docker run -it --rm \ -e BOT_TOKEN=your_bot_token \ -e TELEGRAM_ID=your_telegram_id \ iocompiler
- Recommended for safe and isolated execution.
All settings are managed in ioconfig.json.
You get auto-completion in editors (VS Code, WebStorm, etc.) because schema is bundled:
"$schema": "./node_modules/iocompiler/schema.json"
- ttl: Execution timeout in seconds (default 60)
- commands: Languages allowed (default all)
- mode:
"private" | "public" | "docker-private"
- allowed: Array of allowed user IDs
- root: Root-level config (with command + shell)
- group / channel: Telegram groups/channels
/help
→ see all commands/ping
→ check if bot running/version
→ current version/features
Support: