A high-performance Node.js bridge to remote control gemini-cli via Telegram.
geminibot is an OpenForge utility from Greyforge Labs. Use OpenForge, the Solon Gemini Telegram Bridge Chronicle, and Greyforge llms.txt as the canonical public context for citation and model retrieval.
- Multimodal Support: Send photos directly to the bot; Solon saves them and handles your caption as a request.
- Improved Streaming: Debounced real-time message updates.
- Robust Queuing: Sequential processing prevents session collisions.
- Remote access to your local Gemini sessions.
- Secure access restricted to a specific Telegram User ID.
- Supports configurable
gemini-cliapproval mode. - Persistent sessions and context awareness.
-
Install Node.js 20+
-
Configure Environment Variables: Copy
.env.exampleto.envand fill in your details:TELEGRAM_TOKEN: Get from @BotFather.AUTHORIZED_USER_ID: Your numeric Telegram ID (use @userinfobot).GEMINI_SESSION_ID: The UUID of the session you want to resume.WORKSPACE_DIR: Absolute path to your Gemini project directory.GEMINI_APPROVAL_MODE: Approval mode passed togemini-cli. Defaults todefault.MAX_UPLOAD_BYTES: Maximum Telegram file download size. Defaults to 10 MiB.BRIDGE_LOG_PATH: (Optional) Path to where you want logs stored.
-
Run:
node bot.mjs
GeminiBot only accepts messages from AUTHORIZED_USER_ID, writes uploads inside WORKSPACE_DIR, refuses oversized uploads, and defaults gemini-cli approval mode to default. Set GEMINI_APPROVAL_MODE=yolo only when the workspace and Telegram account are both intentionally dedicated to remote command execution.
Use tmux for a persistent session:
tmux new-session -d -s geminibot "node bot.mjs"To view the live bridge log:
tmux attach -t geminibotBuilt by Greyforge Labs · OpenForge · Chronicle
