{"id":46729956,"url":"https://github.com/ThisIsJeron/openclaw-better-gateway","last_synced_at":"2026-03-23T16:01:08.218Z","repository":{"id":336186805,"uuid":"1148567429","full_name":"ThisIsJeron/openclaw-better-gateway","owner":"ThisIsJeron","description":"OpenClaw plugin that enhances the gateway web UI with automatic refresh and better WebSocket handling","archived":false,"fork":false,"pushed_at":"2026-03-04T06:09:22.000Z","size":321,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-04T12:39:42.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@thisisjeron/openclaw-better-gateway","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThisIsJeron.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-03T05:31:59.000Z","updated_at":"2026-02-26T12:57:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ThisIsJeron/openclaw-better-gateway","commit_stats":null,"previous_names":["thisisjeron/openclaw-better-gateway"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ThisIsJeron/openclaw-better-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThisIsJeron%2Fopenclaw-better-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThisIsJeron%2Fopenclaw-better-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThisIsJeron%2Fopenclaw-better-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThisIsJeron%2Fopenclaw-better-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThisIsJeron","download_url":"https://codeload.github.com/ThisIsJeron/openclaw-better-gateway/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThisIsJeron%2Fopenclaw-better-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30863009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-23T14:38:03.667Z","status":"ssl_error","status_checked_at":"2026-03-23T14:38:01.683Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-09T15:00:26.394Z","updated_at":"2026-03-23T16:01:08.212Z","avatar_url":"https://github.com/ThisIsJeron.png","language":"TypeScript","funding_links":[],"categories":["Skills \u0026 Plugins","Other Notable Plugins","Skills vs Plugins: What's the Difference?"],"sub_categories":["Notable Skills \u0026 Plugins","Utility","Bundled Plugins"],"readme":"# OpenClaw Better Gateway\n\nAn OpenClaw plugin that turns the Gateway into a **full-featured workspace** — resilient chat, embedded IDE, browser terminal, and file API, all in one tab.\n\n## Why this plugin\n\nOpenClaw Gateway is great for chatting with models, but when sockets drop, you need to edit files, or you want a terminal — your flow breaks. **Better Gateway** keeps sessions alive and puts everything you need right inside the Gateway UI.\n\n## Features\n\n### Auto-Reconnect \u0026 Reliability\n\n- **Automatic WebSocket recovery** — disconnects are detected and retried transparently\n- **Visual status indicator** — connected / reconnecting / disconnected state always visible\n- **Network awareness** — detects online/offline transitions and retries when connectivity returns\n- **Click-to-refresh fallback** — fast manual recovery when automatic retry is exhausted\n- **Enhanced Gateway route** — drop-in improved UI at `/better-gateway/` with all enhancements pre-injected\n\n### Embedded IDE (Monaco)\n\n- **Full Monaco editor** in the browser — syntax highlighting for 30+ languages\n- **Sidebar file explorer** — tree navigation with open-folder and refresh controls\n- **Multi-tab editing** — open, switch, close, and reorder tabs\n- **Keyboard shortcuts** — Ctrl+S save, Ctrl+B toggle sidebar, Ctrl+P quick-open, Ctrl+W close tab, Ctrl+Tab cycle tabs\n- **State persistence** — open tabs, active tab, and workspace root remembered across reloads\n- **Gateway-native navigation** — IDE appears as a nav item; click for split view (IDE + chat), Shift+click for IDE-only\n\n### Embedded Terminal (xterm.js + node-pty)\n\n- **Real PTY backend** — full interactive terminal via `node-pty` (vim, htop, tab completion, colors, everything)\n- **xterm.js frontend** — 256-color support, scrollback, clickable links, proper resize handling\n- **SSE + POST transport** — runs entirely on the main gateway port; no extra ports, no extra SSH tunnel config\n- **Gateway-native navigation** — CLI nav item; click for split view (terminal + chat), Shift+click for terminal-only\n- **Keyboard shortcuts** — Ctrl+\\` toggles terminal, Ctrl+L toggles chat sidebar\n\n### File API\n\n- **Read / Write / List / Delete / Mkdir** — full workspace file operations over HTTP\n- **Tested implementation** with strong coverage in repo tests\n\n### Keyboard Shortcuts (all views)\n\n| Shortcut | Action |\n|----------|--------|\n| Ctrl+L | Toggle chat sidebar (works from IDE and terminal) |\n| Ctrl+\\` | Toggle terminal |\n| Shift+click IDE | IDE fullscreen |\n| Shift+click CLI | Terminal fullscreen |\n\n---\n\n## Installation\n\n```bash\nopenclaw plugins install @thisisjeron/openclaw-better-gateway\n```\n\nThen restart your gateway.\n\n### From source\n\n```bash\ngit clone https://github.com/ThisIsJeron/openclaw-better-gateway.git\ncd openclaw-better-gateway\nnpm install \u0026\u0026 npm run build\nopenclaw plugins install -l .\n```\n\n**Note:** The terminal feature requires `node-pty` (native module). It's listed as an optional dependency — if it fails to compile, everything else still works, and the terminal page will tell you what's missing.\n\n## Usage\n\nAfter installation and gateway restart:\n\n```text\nhttps://\u003cYOUR_GATEWAY\u003e/better-gateway/\n```\n\n### Endpoints\n\n| Path | Method | Description |\n|------|--------|-------------|\n| `/better-gateway/` | GET | Enhanced gateway UI with auto-reconnect and nav items |\n| `/better-gateway/ide` | GET | Standalone IDE page (Monaco + file explorer) |\n| `/better-gateway/terminal` | GET | Standalone terminal page (xterm.js) |\n| `/better-gateway/terminal/stream` | GET | Terminal SSE stream (PTY output) |\n| `/better-gateway/terminal/input` | POST | Terminal input (keystrokes to PTY) |\n| `/better-gateway/terminal/resize` | POST | Terminal resize (cols/rows to PTY) |\n| `/better-gateway/api/files` | GET | List files in a directory |\n| `/better-gateway/api/files/read` | GET | Read a file |\n| `/better-gateway/api/files/write` | POST | Write a file |\n| `/better-gateway/api/files` | DELETE | Delete a file |\n| `/better-gateway/help` | GET | Help / installation page |\n| `/better-gateway/inject.js` | GET | Standalone injection script |\n| `/better-gateway/userscript.user.js` | GET | Tampermonkey userscript download |\n\n## Configuration\n\nIn your OpenClaw config (`openclaw.json`):\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"openclaw-better-gateway\": {\n        \"enabled\": true,\n        \"reconnectIntervalMs\": 3000,\n        \"maxReconnectAttempts\": 10,\n        \"maxFileSize\": 10485760\n      }\n    }\n  }\n}\n```\n\n## How it works\n\nThe plugin:\n1. Proxies the original gateway UI under `/better-gateway/` and injects reconnect/status behavior\n2. Serves the IDE (Monaco) and terminal (xterm.js) as standalone pages, embedded via iframes in the nav\n3. Bridges the terminal to a server-side PTY using SSE (server-to-browser) and POST (browser-to-server) — all on the main gateway port\n4. Exposes a file API for workspace read/write/list/delete operations\n\nWhen a WebSocket connection drops, Better Gateway retries automatically. If recovery fails, the status indicator gives a quick click-to-refresh fallback.\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run tests\nnpm test\n\n# Watch mode\nnpm run dev\n```\n\n## Contributing\n\nPRs welcome! Please include tests for new features.\n\n## License\n\nMIT\n\n---\n\nBuilt with :paw_prints: by [ThisIsJeron](https://github.com/ThisIsJeron) and Clawd\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThisIsJeron%2Fopenclaw-better-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThisIsJeron%2Fopenclaw-better-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThisIsJeron%2Fopenclaw-better-gateway/lists"}