telecodex
Telegram bot bridge for codex app-server over stdio JSON-RPC.
The bot receives Telegram messages, sends them to codex app-server, and replies back to Telegram chats.
Requirements
- Python 3.10+
- A Telegram bot token (from
@BotFather) codexCLI installed withcodex app-serveravailable
Install
uv sync --group dev
Configuration
By default, telecodex reads a platform-specific config path:
- macOS:
~/Library/Application Support/telecodex/config.toml - Linux:
~/.config/telecodex/config.toml - Windows:
%APPDATA%\\telecodex\\config.toml
Example:
[telecodex]
telegram_bot_token = "123456:ABC..."
allowed_chat_id = 123456789
# optional: enable ACP message logging
# acp_log_file = "/path/to/acp-messages.log"
codex_app_server_cmd = "codex app-server"
codex_model = "gpt-5"
codex_cwd = "."
codex_approval_policy = "never"
poll_timeout_seconds = 30
You can choose another config file with:
python3 -m telecodex --config /path/to/config.toml
Option precedence is:
- CLI flags
- Environment variables (
TELEGRAM_BOT_TOKEN,TELEGRAM_ALLOWED_CHAT_ID,TELECODEX_ACP_LOG_FILE,CODEX_*,POLL_TIMEOUT_SECONDS) - TOML config values
- Built-in defaults
allowed_chat_id (or TELEGRAM_ALLOWED_CHAT_ID) is mandatory, and the bot only replies to that chat id.
ACP/app-server message logging is disabled by default and is enabled only when acp_log_file (or TELECODEX_ACP_LOG_FILE) is set.
Run
# optional: create config.toml at the default platform-specific location shown above
python3 -m telecodex
Telegram commands
On startup, the bot registers Telegram commands:
/start: sendshelloto Codex to initialize/start the conversation turn/verbose: toggles an internal verbose flag (startsfalse)/status: shows latest stored ACP rate-limit values (account/rateLimits/updated)
When verbose mode is enabled, every ACP/app-server message that is not normally processed by the bridge is sent back to the allowed chat as raw JSON in Markdown.
Development
- Lint/format:
make lint - Lint check only:
make lint-check - Tests:
make test
Protocol flow
The bot uses the codex app-server JSON-RPC flow:
initializeinitialized(notification)thread/startturn/startfor each Telegram message- stream
item/agentMessage/delta - wait for
turn/completed
Metadata
Release files for telecodex 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| telecodex-0.0.1.tar.gz | 11.3 kB | Without provenance | Details for telecodex-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| telecodex-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for telecodex-0.0.1-py3-none-any.whl |
Total release size: 21.0 kB
Release files / telecodex-0.0.1.tar.gz
| Download URL | telecodex-0.0.1.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ec02dc42e370de782b10ed9e3cb0429d20f15630e7b56cd93488b99cfbf9dc3
|
|
BLAKE2b-256 checksum How to use checksums |
d6c5cc95848b224ade48420b00686cd441de5e440a0788d7d91f92150002158e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / telecodex-0.0.1-py3-none-any.whl
| Download URL | telecodex-0.0.1-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91f914c9d1cb327b5424c1aa289a2379df575945b7dd9407cffdc67d8d99d1e4
|
|
BLAKE2b-256 checksum How to use checksums |
b26aaef1468450a023cc66b8199bcedbe6254992f4598f12a67d29db376d92bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for telecodex 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.