AIShortcut

Deploy an AI-powered Telegram bot in one command

Codex CLI + Telegram

bash <(curl -sfL https://raw.githubusercontent.com/ibidathoillah/aishortcut/main/setup-codex-telegram.sh)

Deploys a Telegram bridge for OpenAI Codex CLI.
Source: scripts/codex/setup.sh

ArgDescription
BOT_TOKENTelegram token from @BotFather
CHAT_IDYour Telegram user ID (auto-detected)
WORKSPACE_DIRWorkspace directory (defaults to ~/codex-workspace)
CODEX_API_KEYOptional API key; otherwise use codex login or /login

OpenCode + Telegram

bash <(curl -sfL https://raw.githubusercontent.com/ibidathoillah/aishortcut/main/setup-opencode-telegram.sh)

Deploys an OpenCode AI server with a Telegram bot frontend.
Source: scripts/opencode/setup.sh

ArgDescription
BOT_TOKENTelegram token from @BotFather
PORTOpenCode server port (random if omitted)
CHAT_IDYour Telegram user ID (auto-detected)

Gemini CLI + Telegram (Linux)

bash <(curl -sfL https://raw.githubusercontent.com/ibidathoillah/aishortcut/main/setup-gemini-telegram.sh)

Deploys Google Gemini CLI with a Telegram bot frontend.
Source: scripts/gemini/setup.sh

ArgDescription
BOT_TOKENTelegram token from @BotFather
CHAT_IDYour Telegram user ID (auto-detected)

Gemini CLI + Telegram (Termux/Android)

bash <(curl -sfL https://raw.githubusercontent.com/ibidathoillah/aishortcut/main/setup-gemini-telegram-termux.sh)

Termux-optimized deploy using DioNanos/gemini-cli-termux fork for Android ARM64.
Source: scripts/gemini/setup-termux.sh

ArgDescription
BOT_TOKENTelegram token from @BotFather
CHAT_IDYour Telegram user ID (auto-detected)
Phantom Process Killer (Android 12+)

If the bot keeps dying, Android's phantom process killer may be the cause. The script auto-acquires termux-wake-lock and includes disable instructions.

Reference: atamshkai/Phantom-Process-Killer

How They Work

All installers follow the same pattern:

  1. Install prerequisites (curl, git, tar, etc.)
  2. Install the AI runtime (OpenCode binary, Gemini CLI, or Codex CLI via npm)
  3. Install & configure the Telegram bot
  4. Set up process management (systemd, nohup, or built-in daemon)
  5. Start both services

Termux variant additionally installs @mmmbuto/gemini-cli-termux — a Termux-optimized fork with Android ARM64 PTY support.

Project Structure

aishortcut/
├── setup-opencode-telegram.sh       # forwarder
├── setup-gemini-telegram.sh         # forwarder
├── setup-gemini-telegram-termux.sh  # forwarder
├── setup-codex-telegram.sh          # forwarder
├── scripts/
│   ├── codex/
│   │   └── setup.sh
│   ├── opencode/
│   │   └── setup.sh
│   └── gemini/
│       ├── setup.sh
│       └── setup-termux.sh
├── docs/
│   └── index.html
├── README.md
└── .gitignore

Management Commands

InstallerStatusLogsStop
Codex (systemd) systemctl status codex-telegram journalctl -u codex-telegram -f systemctl stop codex-telegram
Codex (fallback) ~/.codex-telegram-manage.sh status ~/.codex-telegram-manage.sh logs ~/.codex-telegram-manage.sh stop
OpenCode (systemd) systemctl status opencode-telegram-$PORT journalctl -u opencode-telegram-$PORT -f systemctl stop opencode-server-$PORT opencode-telegram-$PORT
OpenCode (fallback) pgrep -f "bun run start" tail -f ~/opencode-telegram-bot-$PORT/telegram-bot.log pkill -f "bun run start"
Gemini (systemd) systemctl status gemini-telegram journalctl -u gemini-telegram -f systemctl stop gemini-telegram
Gemini (fallback) gemini-cli-telegram status gemini-cli-telegram logs gemini-cli-telegram stop
Gemini Termux ~/.gemini-telegram-manage.sh {status|logs|stop|start|restart|wake}

Manual Setup

git clone https://github.com/ibidathoillah/aishortcut.git
cd aishortcut
chmod +x setup-*.sh scripts/*/setup*.sh
./scripts/opencode/setup.sh
./scripts/gemini/setup.sh
./scripts/gemini/setup-termux.sh
./scripts/codex/setup.sh
View on GitHub