Cipher Assistent is a minimal open-source bridge that lets a Telegram bot talk to GitHub Copilot Chat inside VS Code.
It is intentionally small:
- no OpenAI API layer
- no trading modules
- no project-specific logic
- no external model server
- just Telegram, a local Python bot, and a VS Code extension
The goal is simple: make it easy for other people to run a private Telegram-to-VS-Code assistant on their own machine.
- A user sends a message to a Telegram bot.
- The Python bot receives the message.
- The bot forwards the request to a local VS Code extension over
127.0.0.1. - The extension opens Copilot Chat in VS Code and submits the prompt.
- Copilot writes the final answer into a local response file.
- The extension watches that file and sends the response back to the Python bot.
- The Python bot sends the answer back to Telegram.
Everything stays local except the normal Telegram and Copilot services you already use.
Telegram
↓
Python bot
↓ HTTP on localhost
VS Code extension
↓
GitHub Copilot Chat
↓ writes response file
VS Code file watcher
↓ HTTP on localhost
Python bot
↓
Telegram
cipher-assistent/
├─ bot/
│ ├─ .env.example
│ ├─ bot.py
│ └─ requirements.txt
├─ extension/
│ ├─ .vscodeignore
│ ├─ package.json
│ ├─ tsconfig.json
│ └─ src/
│ ├─ botClient.ts
│ ├─ copilotBridge.ts
│ ├─ extension.ts
│ ├─ fileWatcher.ts
│ ├─ httpServer.ts
│ └─ logger.ts
├─ .gitignore
└─ LICENSE
- Windows, macOS, or Linux
- Python 3.11+
- Node.js 18+
- VS Code 1.85+
- A Telegram bot token from @BotFather and chatID from @userinfobot
- GitHub Copilot and GitHub Copilot Chat enabled in VS Code
Install these in VS Code:
- GitHub Copilot
- GitHub Copilot Chat
git clone <your-repo-url>
cd cipher-assistentCreate bot/.env from the example file.
cp bot/.env.example bot/.envThen fill in:
TELEGRAM_TOKENALLOWED_CHAT_IDS- optional port overrides if needed
cd bot
python -m pip install -r requirements.txtcd ../extension
npm install
npm run compileOpen the repository root in VS Code.
Then open the extension folder and run the extension in Extension Development Host mode if you want to package or debug it.
For a local workflow, you can also compile the extension and install it as a VSIX.
From the bot folder:
python bot.pyThe bot starts:
- the Telegram polling loop
- a local callback server on
127.0.0.1
When the extension activates, it starts a local HTTP server and begins watching the response file.
The extension exposes two commands:
Cipher Assistent: Start BridgeCipher Assistent: Stop Bridge
By default the bridge auto-starts when the extension activates.
Send a normal text message to the Telegram bot.
If your chat ID is allowed, the message is forwarded into Copilot Chat and the answer comes back to Telegram.
| Variable | Required | Default | Description |
|---|---|---|---|
TELEGRAM_TOKEN |
yes | - | Telegram bot token |
ALLOWED_CHAT_IDS |
yes | - | Comma-separated list of allowed chat IDs |
BOT_SERVER_PORT |
no | 4000 |
Local callback server port used by the Python bot |
EXT_SERVER_PORT |
no | 3000 |
Local HTTP port used by the VS Code extension |
REQUEST_TIMEOUT_SECONDS |
no | 600 |
Max wait time for a Copilot answer |
TYPING_INTERVAL_SECONDS |
no | 4 |
Telegram typing indicator refresh interval |
RESPONSE_FILE_PATH |
no | workspace-root cipher_response.txt |
Explicit response file path override |
| Setting | Default | Description |
|---|---|---|
cipherAssistent.extensionServerPort |
3000 |
Port for the extension HTTP server |
cipherAssistent.botServerPort |
4000 |
Port for the Python bot callback server |
cipherAssistent.responseFilePath |
empty | Optional absolute override for the response file path |
This project is intentionally local-first.
- The Python bot only binds to
127.0.0.1 - The VS Code extension only binds to
127.0.0.1 - Telegram access is restricted by
ALLOWED_CHAT_IDS - No OpenAI-compatible API server is included
- No project-specific secrets are part of the repository
Still, you should treat this as a personal local bridge and not as a hardened internet-facing service.
The original system lived inside a much larger private workspace with trading modules, experiments, and extra bridges.
This repository strips all of that away and keeps only the reusable core:
- Telegram bot
- local callback server
- VS Code extension
- Copilot response file bridge
That makes it easier for others to understand, run, and adapt.
- It depends on GitHub Copilot Chat being available in VS Code
- It is designed for a single local machine workflow
- It does not include authentication beyond Telegram chat allow-listing
- It does not include conversation history storage, you can set this up in a memory.md file if needed
- It does not include model routing or provider abstraction
You can extend this starter with:
- per-user sessions
- chat history persistence
- slash commands
- file attachments
- approvals before sending prompts
- multi-workspace routing
- alternative response-file formats
- module section
MIT