Sandbox
@tuchg/Lucarne

Telegram and WeChat bridge for local agent sessions

Lucarne runs beside your local agent CLI processes and turns session events into chat messages. From Telegram or WeChat, you can approve commands, see progress, and return to the same context by quoting a message or opening the panel.

335 stars16 forksRustUpdated 1mo ago
Who it's for

Builders who want to control local Claude Code, Codex, Gemini, Copilot, Pi, or Grok sessions from Telegram or WeChat.

What it delivers

You can step away from your machine and still approve work, get notified, and resume the right agent session from chat.

What it does

Chat-based approvals

Sends permission prompts to Telegram or WeChat so you can approve or deny actions from your phone.

Quote-to-resume session routing

Lets you quote a WeChat notification and reopen the matching agent session with the same context.

Telegram workspace panel

Provides `/panel` for browsing agents, workspaces, session history, and live sessions.

Local session tracking

Detects running agents on the machine and keeps historical session state available.

Zero-intrusion setup

Works without hooks, skills, MCP, or project changes; you just install and initialize it.

Background service management

Installs as a user-level service with autostart support on macOS, Windows, and Linux.

How to get it

  1. 1macOS / Linux
    curl -LsSf https://github.com/tuchg/Lucarne/releases/latest/download/lucarned-installer.sh | sh
  2. 2Windows PowerShell
    powershell -c "irm https://github.com/tuchg/Lucarne/releases/latest/download/lucarned-installer.ps1 | iex"
  3. 3Homebrew
    brew tap tuchg/Lucarne https://github.com/tuchg/Lucarne
    brew install lucarned
  4. 4Run
    lucarned init
  5. 5Run
    lucarned autostart install --start
  6. 6Run
    brew services start lucarned
    brew services restart lucarned
    brew services stop lucarned

README

Lucarne AI Poster

Release Coverage License: MIT Telegram WeChat

English | 中文

Stop babysitting your local AI agents.

  • No new mobile app required; receive timely, secure notifications through existing channels
  • Zero-intrusion setup: no hooks, no skills, no MCP, no project changes; scan a QR code and start using it in one step
  • Agents run on your local computer, so you can step away while WeChat / Telegram keep you synced on key progress
  • Permission approvals, clarifying questions, and failure notifications become actionable mobile events
  • Scan a WeChat QR code to receive agent messages; quote a message to continue the matching context automatically
  • Use the Telegram console to view all agents, workspaces, and historical sessions
  • View local agent session history and agents currently running on this machine
  • Lightweight resident process with high performance and low memory use; idle agents are released automatically

Quick Start

1. Install

macOS / Linux:

curl -LsSf https://github.com/tuchg/Lucarne/releases/latest/download/lucarned-installer.sh | sh

Windows PowerShell:

powershell -c "irm https://github.com/tuchg/Lucarne/releases/latest/download/lucarned-installer.ps1 | iex"
Homebrew (recommended) and release archives

Homebrew:

brew tap tuchg/Lucarne https://github.com/tuchg/Lucarne
brew install lucarned

Release archives are also available for macOS, Linux, and Windows on x86_64 and aarch64.

2. Initialize

lucarned init

Initialization guides you through:

  • Selecting enabled agents: claude, codex, copilot, gemini, pi, grok (Grok Build)
  • Configuring a Telegram Bot Token and an entry chat with Topics/thread mode enabled (optional)
  • Logging in to WeChat by QR code (optional)
  • Generating the config file: ~/.lucarned/lucarned.yaml

3. Start the background service

lucarned autostart install --start
Homebrew service commands (recommended)
brew services start lucarned
brew services restart lucarned
brew services stop lucarned
Platform notes

lucarned autostart uses native user-level service managers:

  • macOS: LaunchAgent
  • Windows: Task Scheduler logon task
  • Linux: systemd user service

Linux autostart requires systemd user services. Non-systemd Linux can run lucarned manually.

4. Open the Telegram panel (optional)

/panel

After the Lucarne panel appears, you can create workspaces, bind agents, resume historical sessions, and approve commands.

Common commands

lucarned doctor
lucarned paths
lucarned autostart status
lucarned autostart start
lucarned autostart stop
lucarned update
Homebrew service commands
brew update
brew upgrade lucarned
brew services start lucarned
brew services restart lucarned
brew services stop lucarned
macOS/Linux config: ~/.lucarned/lucarned.yaml
Windows config:     %LOCALAPPDATA%\lucarned\lucarned.yaml
Logs:               lucarned paths

Configuration Example

See the full example at examples/lucarned.yaml.

After initialization, the active config lives at: ~/.lucarned/lucarned.yaml.

You can also override settings with environment variables:

export TELEGRAM_BOT_TOKEN="123456:..."
export TELEGRAM_CHAT_ID="123456789"
export LUCARNE_AUTHORIZED_USER_IDS="111111,222222"

Usage

See the full command reference at docs/commands.md. This README keeps only the core paths.

WeChat: quote-to-route

  1. Lucarne pushes agent progress to WeChat.
  2. Quote a notification and reply; Lucarne automatically restores the matching agent session.
  3. Continue the conversation with the original context attached.
  4. If rate limits delay pushes, send /latest or /l to clear the backlog and deliver only the latest notification round per workspace (no help menu reply; does not replay the full queue).

WeChat quote routing uses two strategies: it prefers message_id, then falls back to a quoted-text hash.

Telegram: mobile multi-agent console

Telegram needs Topics/thread mode for the entry chat. A private chat with the bot can use the bot's own topic mode (Bot API 9.4+ reports this as has_topics_enabled from getMe); use that private chat ID as entry_chat_id. A forum supergroup also works, but is not required.

  1. Send /panel in the entry chat.
  2. Tap New or send /aN to create an agent workspace.
  3. Enter the workspace topic and assign tasks to agents like a normal chat.
  4. When an agent asks for permission, tap [Approve] / [Deny].
  5. Send /status to inspect state, /interrupt to stop work, or /fork to branch a session.

Telegram workspaces map to Forum Topics. One project gets one topic; one topic can bind one live agent session.

  • Telegram supports every WeChat feature.

Architecture Overview

┌─────────────┐  ┌─────────────┐
│  Telegram   │  │   WeChat    │  ← User-facing channels
└──────┬──────┘  └──────┬──────┘
       │                │
   lucarne-         lucarne-
   telegram         wechat          ← Channel adapter (commands, notifications, queues, retries)
       │                │
       └───────┬────────┘
          lucarne-adapter           ← Plugin registry
               │
           lucarne                  ← Core: runtime bus, control plane, history, daemon
               │
         agent-sessions             ← Provider parse / discovery / watch
               │
    ┌──────┬──────┬──────┬──────┬──────┐
  Claude Codex Gemini Copilot  Pi   Grok  ← Agent CLI processes

Agent Capability Matrix

CapabilityClaudeCodexGeminiCopilotPiGrok Build
Reasoning / Thinking
Tool calls
Structured approval
AskUserQuestion
Usage tracking
Interrupt
Resume
Sub-agents
Native commands
Fork (create branched session)

Development

git clone https://github.com/tuchg/Lucarne.git
cd agents
cargo +nightly check -Zbuild-dir-new-layout
cargo +nightly test -Zbuild-dir-new-layout

Roadmap

  • Linux support: installation docs, service management, release packages, and smoke tests
  • Windows support: installation docs, background execution, path / process compatibility, and release packages
  • Message modes: steer / queue
  • Split agent-sessions into an independent crate
  • Support remote agent environments
  • More agent providers: Cursor, opencode, and more
  • More channels: Discord, Slack, Feishu, DingTalk, Matrix, QQ, and more
  • ....

License

MIT

Friend link: linux.do

Files in the repo

Repository payload18 top-level entries
  • .cargo
  • .github
  • agent-sessions
  • crates
  • docs
  • examples
  • Formula
  • scripts
  • tests
  • .gitignore
  • AGENTS.md
  • Cargo.lock
  • Cargo.toml
  • CONTEXT.md
  • LICENSE
  • README.cn.md
  • README.md
  • rust-toolchain.toml

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k