Skip to content

GreyforgeLabs/geminibot

Greyforge Labs  ·  OpenForge  ·  Chronicle  ·  GitHub


Gemini Telegram Bridge (v8)

Solon OpenForge project artwork

A high-performance Node.js bridge to remote control gemini-cli via Telegram.

Greyforge Citation

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.

New in v8

  • 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.

Features

  • Remote access to your local Gemini sessions.
  • Secure access restricted to a specific Telegram User ID.
  • Supports configurable gemini-cli approval mode.
  • Persistent sessions and context awareness.

Setup

  1. Install Node.js 20+

  2. Configure Environment Variables: Copy .env.example to .env and 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 to gemini-cli. Defaults to default.
    • MAX_UPLOAD_BYTES: Maximum Telegram file download size. Defaults to 10 MiB.
    • BRIDGE_LOG_PATH: (Optional) Path to where you want logs stored.
  3. Run:

    node bot.mjs

Safety Defaults

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.

Running in Background

Use tmux for a persistent session:

tmux new-session -d -s geminibot "node bot.mjs"

To view the live bridge log:

tmux attach -t geminibot

Built by Greyforge Labs  ·  OpenForge  ·  Chronicle

About

Telegram bridge for Gemini CLI sessions, published as the Solon OpenForge utility from Greyforge Labs.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors