Coding should not stop when you leave your terminal. Glasses brings your coding agents wherever you are: it is a self-hosted gateway that lets you direct GitHub Copilot CLI, Devin CLI, and other agents through Telegram, Discord, or WhatsApp, while each conversation runs in its own isolated Railway Sandbox with your repository cloned and session preserved, so you can build, review, and ship from a simple chat.
I really like Harold Finch ("Glasses," as Lionel Fusco calls him) from the TV series Person of Interest because he is the mind behind The Machine, the ultimate AI he built in the story. This project takes inspiration from that same behind-the-scenes orchestration: one quiet control point coordinating agents, repositories, and sandbox sessions so real coding work keeps moving from simple chat messages.
You (Telegram/Discord/WhatsApp)
β
βΌ
Glasses gateway ββββ Postgres (conversations, messages, jobs)
β
βΌ
Railway Sandbox (per conversation)
β
βΌ
Coding CLI (Copilot today, Devin next) + your cloned repo
/new owner/repo [agent]provisions a fresh sandbox, clones the repo, and starts a session with the chosen agent (defaults tocopilot).- Plain messages after that are forwarded as prompts to the same agent in the same sandbox β full conversational context, exactly like using the CLI locally.
/statusshows which repo/agent/sandbox your current conversation is bound to.
- β Telegram channel
- β
Copilot CLI wrapper (non-interactive
copilot -p, session resume) - π§ Devin CLI wrapper (interface in place, not yet implemented)
- π§ Discord, WhatsApp channels (planned)
- Node.js >=22 (the gateway runtime)
- Bun 1.x (dependency management, development, and builds)
- A Postgres database (Railway can provision one for you)
- A Railway account with Sandboxes enabled
- A Telegram bot token from @BotFather
Glasses runs on Node.js. Bun is the toolchain for dependency management,
development, and bundling (bun install, bun run dev, and bun run build).
The Docker image uses Bun only while building; the final runtime image is
plain Node.js Alpine with no Bun present.
bun install
cp .env.example .env # fill in the values, see below
bun run devThen point your Telegram bot's webhook at
https://<your-tunnel>/webhook/telegram (use a tool like ngrok for local
testing).
See .env.example for the full list:
| Variable | Description |
|---|---|
RAILWAY_API_TOKEN |
Railway API token with Sandbox access |
RAILWAY_ENVIRONMENT_ID |
Environment sandboxes are created in |
DATABASE_URL |
Postgres connection string |
TELEGRAM_BOT_TOKEN |
Bot token from @BotFather |
TELEGRAM_ALLOWED_USER_ID |
Only this Telegram user id can talk to the bot |
PORT |
HTTP port (default 3000) |
LOG_LEVEL |
debug | info | warn | error |
COPILOT_GITHUB_TOKEN |
GitHub token for Copilot CLI auth inside sandboxes |
- Push this repo to your own GitHub account (or fork it).
- Create a new Railway project from the repo β
railway.jsonand theDockerfileconfigure the build automatically. - Attach a Postgres plugin and set
DATABASE_URLfrom it. - Set the remaining environment variables in the Railway dashboard.
- Set your Telegram webhook to
https://<your-railway-domain>/webhook/telegram.
See docs/ARCHITECTURE.md for more detail on how
the pieces fit together.
bun test # run tests
bun run typecheck # type-check without emitting
bun run lint # check formatting/lint with biome
bun run build # bundle to dist/ (target: node)Join our community discussions to get help, share ideas, and connect with other users:
- π£ Announcements: Official updates from the maintainer
- πΈ Showcase: Show and tell your implementation
- π Wall of Love: Share your experience with the bot
- π Help & Support: Get assistance from the community
- π§ Ideas: Suggest new features and improvements
Need help? Check our Help & Support discussions or create a new issue.
Important: Submit pull requests to the dev branch following the repository workflow.
Contributions are welcome! Your code must pass bun run typecheck before merging.
Like this project? Leave a star! βββββ
There are several ways you can support this project:
- Become a sponsor and get some perks! π
- Buy us a coffee if you love what we do! β
Found this project helpful? Consider nominating me (@warengonzaga) for the GitHub Star program! This recognition supports ongoing development of this project and my other open-source projects. GitHub Stars are recognized for their significant contributions to the developer community. Your nomination makes a difference and encourages continued innovation!
This project is licensed under GPL-3.0-or-later.
This project is created by Waren Gonzaga under WG Technology Labs, with the help of awesome contributors.
π»πβ by Waren Gonzaga | YHWH π - Without Him, none of this exists, even me.