Open Source · MIT License · 889 lines of code

Your server.
Your phone.
One tap.

Open-source Telegram Mini App. Full terminal with smart buttons, Claude Code integration, and voice input. No SSH app needed.

ubuntu@production ~ teletty
$ ssh deploy@production
Connected to 141.227.180.71
 
$ claude "fix the auth middleware"
 
Reading src/middleware/auth.js
Found issue: token expiry not checked
Editing src/middleware/auth.js
 
? Allow Edit tool on src/middleware/auth.js?
Allow Deny
THE PROBLEM

We've all been there.

That moment when you need your terminal and all you have is your phone.

01

Server is down.

Production alert fires. You're at dinner with family. Your laptop is in the car. The SSH app on your phone keeps timing out.

02

Deploy failed.

CI/CD pipeline is red. You're on the train. The fix is one command, but typing it on a phone keyboard takes 3 attempts and 5 minutes.

03

AI needs approval.

Claude Code is running your migration. It needs you to approve 12 file edits. You need to type 'Y' + Enter twelve times. On a phone.

Traditional SSH apps don't solve this. They give you a terminal with a tiny keyboard. teletty gives you smart buttons.

KILLER FEATURE

Smart buttons replace your keyboard.

teletty scans terminal output for interactive prompts and renders one-tap buttons. 7 pattern types. 88 lines of regex. Zero AI needed.

Y/n Confirmation
$ apt upgrade
? Do you want to continue? [Y/n]
Yes No
Numbered Options
Select an option:
1) Production
2) Staging
3) Development
1: Production 2: Staging 3: Development
Claude Code Permission
Bash command: npm run deploy
? Allow Bash tool?
Allow Deny
Dangerous Command Detection
! rm -rf /var/log/old/
Are you sure? [y/N]
Yes No

Dangerous commands are highlighted in red. Auto-approve mode will NOT approve these.

AI-NATIVE

Built for Claude Code.

The only mobile terminal with native AI coding agent support.

claude code session
$ claude "refactor the payment module"
 
Reading src/payments/stripe.js
Reading src/payments/webhook.js
Planning refactor...
 
I'll split the monolithic handler into:
1. stripe-client.js (API calls)
2. webhook-handler.js (event processing)
3. payment-validator.js (input validation)
 
? Create 3 new files and modify 2 existing?
Yes, proceed No, cancel
One-tap approve/deny Claude Code permission prompts become clickable buttons. No keyboard needed.
Auto-approve mode Two-click activation. Automatically approves safe prompts for hands-free AI coding.
Safety guardrails Blocks rm -rf, DROP TABLE, DELETE, shutdown, reboot, mkfs. Even in auto-approve mode.
10-minute timeout Auto-approve disables itself after 10 minutes. Set it and forget it safely.
FEATURES

Everything included. Nothing extra.

889 lines of code. 7 files. Zero frameworks. Zero build step.

>_

Tmux Persistence

Sessions survive disconnects, network drops, even server restarts. Close Telegram, come back hours later -- you're exactly where you left off.

*

Voice Commands

Push-to-talk voice input. Dictate terminal commands when typing isn't practical. Web Speech API with optional Azure Whisper server-side fallback.

=

Multi-Tab

Up to 4 concurrent terminal sessions. Switch between servers, logs, and deployments instantly. Each tab is an independent tmux session.

Emergency API

Management API lets you execute commands via HTTPS when SSH is completely down. Protected by token auth. Your lifeline when nothing else works.

Telegram Auth

HMAC-SHA256 verification via Telegram. No passwords to remember, no SSH keys to manage. Whitelist by Telegram user ID. Simple and bulletproof.

Audit Logging

Every terminal session is automatically recorded via tmux pipe-pane. Full accountability for every command executed. Stored in /var/log/terminal-sessions/.

SECURITY

7 layers between your server and everyone else.

Your teletty instance is YOUR private terminal. No one else can access it.

1
Telegram HMAC-SHA256
Only Telegram servers can generate valid auth data. Cryptographically impossible to forge.
2
User ID Whitelist
Only YOUR Telegram account is allowed. Everyone else sees 'Access denied'.
3
IP-Bound JWT
Session tokens locked to your IP address. Expire after 4 hours. Stolen token = useless.
4
initData Freshness
Auth data older than 5 minutes is rejected. Prevents replay attacks entirely.
5
Timing-Safe Auth
All comparisons use crypto.timingSafeEqual. Zero timing side-channel leakage.
6
Rate Limiting
Max 10 auth attempts per minute per IP. Brute force attacks = automatically blocked.
7
Sanitized Environment
Terminal sessions see only PATH, HOME, TERM. Server secrets never leak to the shell.
SETUP

Three steps. Five minutes.

From zero to terminal-on-your-phone.

01

Create a bot

Open @BotFather in Telegram. Send /newbot. Choose a name. Get your token. Takes 60 seconds.

02

Deploy

Give the install prompt to Claude Code or any AI agent. It installs Node.js, tmux, clones teletty, configures HTTPS, creates the systemd service. You provide the token.

03

Open

Tap the Terminal button in your Telegram bot. Authenticate automatically. Full terminal with smart buttons, voice, multi-tab. Done.

INSTALL

Up and running in 60 seconds.

Three ways to deploy. Pick your favorite.

AI Agent
Docker
Manual

Copy this prompt and give it to Claude Code, Cursor, or any AI coding agent connected to your server:

Deploy teletty (github.com/olegchetrean/teletty) on this server.
Read the CLAUDE.md in the repo for full instructions.
Ask me for my Telegram bot token and user ID before configuring.
Set up HTTPS with Caddy or Cloudflare Tunnel.
Create a systemd service. Verify with /health endpoint.

Clone the repo and start with Docker Compose:

git clone https://github.com/olegchetrean/teletty && cd teletty
cp .env.example .env
nano .env  # Set BOT_TOKEN, ALLOWED_USER_IDS, SESSION_SECRET
docker compose up -d

Clone, configure, and start manually:

git clone https://github.com/olegchetrean/teletty && cd teletty
cp .env.example .env && nano .env
npm install
node server.js  # or: pm2 start server.js --name teletty
COMPARISON

How teletty compares.

Side by side with the alternatives.

Feature teletty SSH Apps (Termius) Web Terminals (ttyd) Telegram Bots
No install on phone -- --
Smart buttons -- -- --
AI agent support -- -- --
Session persistence Partial -- --
Voice input -- -- --
Mobile optimized -- Partial
Multi-tab -- --
Auto-approve mode -- -- --
Dangerous cmd detection -- -- --
Open source & free Varies

Your terminal. Everywhere.

889 lines of code. Zero frameworks. 100% open source.

Star on GitHub

github.com/olegchetrean/teletty