Skip to content

Remote control your Cursor AI coding sessions via Telegram, Gmail, and Feishu

License

Notifications You must be signed in to change notification settings

j0ntz/cursor-autopilot

Repository files navigation

Cursor Autopilot Logo

Remote control your Cursor AI coding sessions via Telegram, Gmail, and Feishu.

VS Code Marketplace Version Open VSX

Cursor Autopilot demo

Overview

Cursor Autopilot sends your full AI chat responses to Telegram (or Email/Feishu), and lets you reply from your phone to continue or redirect the coding session. Zero files are created in your repository — all configuration lives in VS Code settings and the user home directory.

Installation

Marketplace (Recommended)

Step Action
1 Open Cursor
2 Search for Cursor Autopilot in Extensions (Ctrl/Cmd+Shift+X)
3 Click Install
4 Open any project folder
5 Configure your adapter via Settings > search "autopilot"

Manual Installation

git clone https://github.com/j0ntz/cursor-autopilot
cd cursor-autopilot
npm install
npm run compile
npx vsce package
code --install-extension cursor-autopilot-*.vsix

Restart Cursor to activate.

Configuration

All configuration is done through VS Code Settings (no config files in your repo).

Open Settings (Cmd+,) and search for autopilot, or edit settings.json directly:

{
  "autopilot.enabled": true,
  "autopilot.adapters": ["telegram"],
  "autopilot.telegram.token": "123456:ABC-DEF...",
  "autopilot.telegram.chatId": "987654321"
}

Per-Workspace Bots

Each Cursor window can have its own Telegram bot. Set adapter credentials in Workspace settings (Settings > Workspace tab) to override user-level defaults. This means different projects can notify different Telegram chats.

Telegram Setup

  1. Create a bot via @BotFather on Telegram — save the token.
  2. Get your chat ID from @userinfobot.
  3. Set autopilot.telegram.token and autopilot.telegram.chatId in VS Code settings.

Email / Feishu

See the Setup Guide for Email and Feishu configuration.

How It Works

Outbound (Cursor → Telegram): At the end of each AI chat turn, the agent pipes its full response directly to telegram-send.py via stdin in a single command — no intermediate files. The script splits the message into 4096-character chunks and sends them to Telegram. Credentials are injected as terminal environment variables ($AUTOPILOT_TG_TOKEN, $AUTOPILOT_TG_CHAT_ID) — each Cursor window gets its own isolated set, so different workspaces can use different bots with no collisions.

Inbound (Telegram → Cursor): The extension polls Telegram for replies and injects them into the Cursor chat composer:

  • 1 = Continue
  • 2 = Stop
  • Any other text = custom instruction sent directly to the AI

What Gets Created

The extension manages these files in your home directory (never in the repo):

File Purpose
~/.cursor/rules/after_each_chat.mdc Cursor rule instructing the agent to send responses to Telegram
~/.cursor-autopilot/telegram-send.py Companion script for chunked message sending (reads stdin)

The extension also sets AUTOPILOT_TG_TOKEN and AUTOPILOT_TG_CHAT_ID environment variables in the integrated terminal for the current window.

Testing

Open Command Palette (Cmd+Shift+P) and run Inject text into Cursor Chat to test the injection mechanism.

Documentation

See the Setup Guide for detailed setup, adapter configuration, and troubleshooting.

Support

Open an issue on GitHub for bugs or feature requests.

Contributing

We welcome contributions. Please open a GitHub issue to discuss your ideas before submitting pull requests.

License

MIT — see LICENSE.

About

Remote control your Cursor AI coding sessions via Telegram, Gmail, and Feishu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •