claude-telegram-relay  by godagoo

AI assistant for Telegram via Claude Code

Created 2 weeks ago

New!

283 stars

Top 92.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides a minimal, cross-platform daemon setup for running Claude Code as an always-on Telegram bot. It enables users to interact with Claude via Telegram, leveraging its advanced capabilities for text, photos, documents, and voice, while offering persistent memory, proactive check-ins, and daily briefings. The target audience includes developers and power users seeking to integrate a sophisticated AI assistant into their daily workflow, benefiting from a background-running, context-aware conversational agent.

How It Works

The relay acts as an intermediary, listening for Telegram messages using the grammY framework. Upon receiving a message, it invokes the Claude Code CLI, passing contextual information such as user profile, conversation history, and current time. Claude Code, equipped with tools, MCP servers, web search, and file access, processes the request and returns a response. Persistent memory is managed via Supabase, storing conversation history and user-defined facts/goals. Each message is embedded (using OpenAI) and stored in Supabase for semantic search, allowing the bot to retrieve relevant past context. Claude Code also automatically identifies and stores important facts and goals mentioned by the user.

Quick Start & Requirements

  • Primary Install/Run: git clone the repository, cd into it, and run bun run setup for dependencies and .env creation. Edit .env with API keys. Start the bot with bun run start. A guided setup using Claude Code itself is also recommended.
  • Prerequisites: Bun runtime (curl -fsSL https://bun.sh/install | bash), Claude Code CLI installed and authenticated, a Telegram account.
  • Dependencies: TELEGRAM_BOT_TOKEN, TELEGRAM_USER_ID, SUPABASE_URL, SUPABASE_ANON_KEY. Optional: USER_NAME, USER_TIMEZONE, VOICE_PROVIDER (Groq or local Whisper), GROQ_API_KEY. OpenAI API key for embeddings is configured within Supabase Edge Function secrets.
  • Always-On Services: bun run setup:launchd (macOS) or bun run setup:services (Linux/Windows) for daemon setup.
  • Links: Guided setup documentation (CLAUDE.md), community (skool.com/autonomee), course (autonomee.ai/telegram-bot-course), YouTube (youtube.com/@GodaGo).

Highlighted Details

  • Full-fledged AI assistant on Telegram supporting diverse message types (text, photos, documents, voice).
  • Persistent memory with semantic search capabilities over conversation history via Supabase.
  • Proactive "smart check-ins" and customizable daily morning briefings.
  • Optional voice message transcription using Groq Cloud or local Whisper.cpp.
  • Leverages Claude Code CLI, providing the AI with "hands" for tools, web search, and file access.

Maintenance & Community

The project is developed by Goda Go and the AI Productivity Hub. Community resources include a Skool group (skool.com/autonomee) and a free course (autonomee.ai/telegram-bot-course).

Licensing & Compatibility

The project is released under the MIT License, permitting free use, customization, and integration into proprietary or open-source projects.

Limitations & Caveats

Setup requires configuring multiple external services (Telegram Bot, Supabase) and installing specific runtimes (Bun) and CLIs (Claude Code). Maximizing the bot's potential, particularly its advanced features like proactive check-ins and briefings, necessitates a deeper understanding and configuration of Claude Code's capabilities, implying a non-trivial learning curve.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
8
Issues (30d)
5
Star History
286 stars in the last 20 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
9 more.

companion-app by a16z-infra

0.1%
6k
AI companion stack for personalized chatbots
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.