Skip to content

Commit 4f2f1e7

Browse files
committed
description updates
1 parent 0f1878d commit 4f2f1e7

2 files changed

Lines changed: 33 additions & 34 deletions

File tree

README.md

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
</p>
44

55
<h1 align="center">OTG Code</h1>
6-
<p align="center"><em>On-The-Go Code — a mobile-first terminal-based browser IDE for remote development</em></p>
6+
<p align="center"><em>On-The-Go Code — a mobile-first, terminal-focused development environment in the browser</em></p>
77

8-
<p align="center">Vibe code on your VPS or home machine from anywhere — phone, tablet, or desktop — with zero client-side installation. Full mobile-optimised terminal, file explorer, code editor, and localhost preview in a single browser tab, accessible via Cloudflare Quick Tunnels.</p>
8+
<p align="center">Work on your VPS or home machine from anywhere — phone, tablet, or desktop — with zero client-side installation. A mobile-optimised terminal built for coding CLIs, with file explorer, code editor, and localhost proxy — all in a single browser tab, accessible via a single Cloudflare Quick Tunnel.</p>
99

1010
<p align="center">
1111
<img src="https://img.shields.io/badge/version-0.0.1-blue" alt="Version">
@@ -35,25 +35,27 @@
3535
<div style="font-size:13px;color:#555;margin-top:8px;">Terminal interface</div>
3636
</td>
3737
<td align="center" style="padding:8px">
38-
<a href="public/videos/demo_localhost.gif" title="Open Localhost GIF"><img src="public/videos/demo_localhost.gif" alt="Localhost explorer" width="220" style="max-width:220px;height:auto;"></a>
39-
<div style="font-size:13px;color:#555;margin-top:8px;">Localhost explorer</div>
38+
<a href="public/videos/demo_localhost.gif" title="Open Localhost GIF"><img src="public/videos/demo_localhost.gif" alt="Localhost preview" width="220" style="max-width:220px;height:auto;"></a>
39+
<div style="font-size:13px;color:#555;margin-top:8px;">Localhost preview</div>
4040
</td>
4141
</tr>
4242
</table>
4343

4444

45+
Three panels — **Terminal**, **Files**, and **Browser** — responsive 3-column layout on desktop/landscape, single-panel with bottom tab bar on mobile/portrait (orientation-aware breakpoint). All panels stay mounted in the DOM with CSS visibility toggling, preserving terminal state, WebSocket connections, and iframe content across navigation. Everything routes through a single Cloudflare Quick Tunnel.
46+
4547
### Terminal
4648
- Multi-session tabs (renamable), xterm.js with configurable font size
4749
- **Quick action tab groups** — color-coded action tabs (blue) and app tabs (green):
4850
- **cmds** — common shell commands (ls, top, df, free, nvidia-smi, etc.)
4951
- **cd** — visual directory picker with server-side CWD detection (works inside tmux)
5052
- **Ctrl+** — sticky modifier combos (Ctrl, Ctrl+Shift, Alt, Alt+Shift) with full A-Z and 0-9
51-
- **code** — coding CLI launchers (Claude Code, Codex, OpenCode) with permission presets, plus common CLI key combos (Shift+Tab, Ctrl+C, Ctrl+O)
53+
- **code** — coding CLI launchers (Claude Code, Codex, OpenCode) with vendor selector, permission presets, and slash commands
5254
- **git** — quick actions (status, log, diff, add, fetch, pull, push, stash, branch), commit with message input, git config setup (user.name/email)
5355
- **nano / vim** — file opener with version detection, in-app command buttons, save/exit shortcuts
5456
- **tmux** — session manager (list, attach, create, kill), in-session window/pane controls, auto extended-keys compatibility
5557
- **Always-visible nav keys** below input — Enter, Bksp, arrows, y/n/q, Esc, Tab, PgUp/PgDn
56-
- **Context-aware tabs** — editor mode (nano/vim) disables action tabs; tmux mode hides nano/vim (can't track state inside tmux); plain terminal shows everything
58+
- **Context-aware tabs** — editor mode (nano/vim) disables action tabs; tmux mode hides nano/vim; plain terminal shows everything
5759
- Auto-reset of tmux/editor state on socket reconnect
5860
- System info popup with OS, kernel, CPU, memory, GPU details
5961
- Tool version detection (nano, vim, tmux, claude, codex, opencode)
@@ -62,22 +64,22 @@
6264
- Multi-session tabs (renamable), breadcrumb + editable path navigation
6365
- Create, rename, delete files and folders; file info dialog; hidden files toggle
6466
- Context menu (right-click / long-press), selectable/scrollable file paths
65-
- Drag-and-drop file upload
66-
67-
### Viewers & Editors
68-
- **Code Editor** — Monaco with syntax highlighting, configurable font size, word wrap
69-
- **Markdown Preview** — GitHub-flavored with prose styling
70-
- **Jupyter Notebook** — cells with type badges, rendered markdown, code, and outputs
71-
- **HTML Preview** — live rendered in sandboxed iframe
72-
- **PDF Viewer** — inline rendering with zoom and pinch-to-zoom
73-
- **Image Viewer** — zoom controls with full pan/scroll at any zoom level, pinch-to-zoom
74-
- **Video Player** — mp4, webm, ogg, mov, mkv, avi
75-
- **Audio Player** — mp3, wav, ogg, flac, aac, m4a
76-
77-
### Layout & Access
78-
- **Responsive** — 3-column resizable panels on desktop/landscape, single-panel with bottom tab bar on mobile/portrait (orientation-aware breakpoint)
79-
- **Localhost Browser** — preview any localhost port via `/proxy/:port` reverse proxy (single tunnel, no per-port cloudflared processes), multi-tab with reachability checks
80-
- **Cloudflare Tunnel** — one command (`./start.sh`) to build, start, and expose via public URL; all localhost previews route through the same tunnel
67+
- Drag-and-drop file upload with progress tracking and per-file cancel
68+
- Chunked upload for large files (>80 MB) to bypass Cloudflare's 100 MB request limit
69+
- **Built-in viewers & editors:**
70+
- **Code Editor** — Monaco with syntax highlighting, configurable font size, word wrap
71+
- **Markdown Preview** — GitHub-flavored with prose styling
72+
- **Jupyter Notebook** — cells with type badges, rendered markdown, code, and outputs
73+
- **HTML Preview** — live rendered in sandboxed iframe
74+
- **PDF Viewer** — inline rendering with zoom and pinch-to-zoom
75+
- **Image Viewer** — zoom controls with full pan/scroll at any zoom level, pinch-to-zoom
76+
- **Video Player** — mp4, webm, ogg, mov, mkv, avi
77+
- **Audio Player** — mp3, wav, ogg, flac, aac, m4a
78+
79+
### Localhost Preview
80+
- Preview any localhost port in a new tab via the built-in `/proxy/:port` reverse proxy
81+
- Multi-tab port list with reachability checks and green/amber status indicators
82+
- All localhost previews route through the same main tunnel of the app
8183

8284
## Quick Start
8385

@@ -95,12 +97,12 @@ cp .env.example .env
9597
./start.sh
9698
```
9799

98-
The `start.sh` script installs dependencies if needed, builds the app, starts the server, and launches a Cloudflare Quick Tunnel — printing a public URL you can open on any device.
100+
The `start.sh` script installs dependencies if needed, builds the app, starts the server, and launches a Cloudflare Quick Tunnel — printing a public URL you can open on any device. On macOS it also clears Gatekeeper quarantine flags on node-pty binaries. If `cloudflared` is not found in your PATH, the script auto-downloads it to `.bin/` (supports macOS, Linux, and Windows on x64/arm64).
99101

100102
<details>
101-
<summary><strong>DNS tip:</strong> Tunnel URLs not resolving? Set your DNS to 1.1.1.1</summary>
103+
<summary><strong>DNS tip:</strong> Tunnel URL not resolving? Set your DNS to 1.1.1.1</summary>
102104

103-
Quick tunnel URLs (e.g. `xxxx.trycloudflare.com`) resolve instantly on Cloudflare DNS but may take time on ISP/router DNS servers, or fail entirely if a stale NXDOMAIN gets cached. Set your DNS to **1.1.1.1** (Cloudflare) for instant resolution — it's faster and more reliable than most ISP DNS.
105+
The Quick Tunnel URL (e.g. `xxxx.trycloudflare.com`) resolves instantly on Cloudflare DNS but may take time on ISP/router DNS servers, or fail entirely if a stale NXDOMAIN gets cached. Set your DNS to **1.1.1.1** (Cloudflare) for instant resolution.
104106

105107
**macOS:**
106108
```bash
@@ -147,20 +149,17 @@ Express (port 7777)
147149
├── Socket.IO — real-time terminal I/O via node-pty
148150
├── REST API — file operations (list, read, write, rename, delete, upload, download, mkdir)
149151
├── Reverse Proxy — /proxy/:port/* forwards HTTP + WebSocket to localhost services
150-
└── Cloudflare Tunnel — single optional tunnel via cloudflared (all traffic, including localhost previews)
152+
└── Cloudflare Tunnel — single optional tunnel via cloudflared (all traffic)
151153
```
152154

153-
All three panels (Files, Terminal, Browser) are always mounted in the DOM with CSS visibility toggling — preserving terminal state, WebSocket connections, and iframe content across navigation.
154-
155-
### Localhost Preview
156-
157-
The Browser tab previews any localhost port through the Express reverse proxy — no extra tunnels or processes are spawned. When you enter a port, the UI checks reachability via `/proxy/:port/` and gives you a link to open in a new tab.
155+
### Reverse Proxy
158156

159-
The proxy handles:
157+
The `/proxy/:port` reverse proxy is how localhost previews work — no extra tunnels or processes needed. It handles:
160158
- **Path rewriting** — strips the `/proxy/:port` prefix before forwarding to `127.0.0.1:<port>`
161159
- **WebSocket upgrades** — WS connections on `/proxy/:port/...` are forwarded (supports Vite HMR, webpack-dev-server, etc.)
162-
- **Header stripping** — removes `X-Frame-Options` and CSP headers so content can embed
163-
- **Asset path rewriting** — rewrites absolute paths in HTML, CSS, JS (src, href, url(), ES imports) to include the `/proxy/:port` prefix
160+
- **Header stripping** — removes `X-Frame-Options` and CSP headers so content can embed in the preview iframe
161+
- **Asset path rewriting** — rewrites absolute paths in HTML, CSS, and JS (src, href, url(), ES imports) to include the `/proxy/:port` prefix so assets load correctly through the proxy
162+
- **Port blocking** — blocks privileged ports (1–1023, except 80/443) and the OTG server port itself
164163

165164
**Dev server notes:** Most dev servers (Vite, webpack, Next.js) work out of the box since both HTTP and WebSocket traffic are proxied. However, dev servers that hardcode their WebSocket URL to `ws://localhost:<port>` in client-side code (bypassing the proxy path) will fail over the tunnel — the HMR connection won't reach the VPS. Vite works because its HMR client connects relative to the page origin. If a dev server's HMR breaks, configure it to use a relative or custom WebSocket path.
166165

public/videos/demo_localhost.gif

278 KB
Loading

0 commit comments

Comments
 (0)