Skip to content

Repository files navigation

Glasses

GitHub Repo Banner

License: GPL v3 TypeScript Node.js BunJS Docker Hub GitHub Packages

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.

πŸ’‘ Inspiration

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.

🧭 How it works

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 to copilot).
  • 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.
  • /status shows which repo/agent/sandbox your current conversation is bound to.

πŸ“Š Status

  • βœ… Telegram channel
  • βœ… Copilot CLI wrapper (non-interactive copilot -p, session resume)
  • 🚧 Devin CLI wrapper (interface in place, not yet implemented)
  • 🚧 Discord, WhatsApp channels (planned)

πŸš€ Getting started

πŸ“‹ Requirements

  • 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

βš™οΈ Runtime

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.

πŸ’» Local development

bun install
cp .env.example .env   # fill in the values, see below
bun run dev

Then point your Telegram bot's webhook at https://<your-tunnel>/webhook/telegram (use a tool like ngrok for local testing).

πŸ” Environment variables

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

πŸš‚ Deploying to Railway

  1. Push this repo to your own GitHub account (or fork it).
  2. Create a new Railway project from the repo β€” railway.json and the Dockerfile configure the build automatically.
  3. Attach a Postgres plugin and set DATABASE_URL from it.
  4. Set the remaining environment variables in the Railway dashboard.
  5. Set your Telegram webhook to https://<your-railway-domain>/webhook/telegram.

See docs/ARCHITECTURE.md for more detail on how the pieces fit together.

πŸ› οΈ Development

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)

πŸ’¬ Community Discussions

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

πŸ›Ÿ Help & Support

Need help? Check our Help & Support discussions or create a new issue.

🎯 Contributing

Important: Submit pull requests to the dev branch following the repository workflow.

Contributions are welcome! Your code must pass bun run typecheck before merging.

πŸ’– Sponsors

Like this project? Leave a star! ⭐⭐⭐⭐⭐

There are several ways you can support this project:

⭐ GitHub Star Nomination

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!

πŸ“ƒ License

This project is licensed under GPL-3.0-or-later.

πŸ“ Author

This project is created by Waren Gonzaga under WG Technology Labs, with the help of awesome contributors.

contributors


πŸ’»πŸ’–β˜• by Waren Gonzaga | YHWH πŸ™ - Without Him, none of this exists, even me.

About

Remote coding agents, anywhere. Chat with Copilot, Devin, and other coding CLIs from Telegram, Discord, or WhatsApp.

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages