[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81856":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":14,"starSnapshotCount":14,"syncStatus":12,"lastSyncTime":30,"discoverSource":31},81856,"browser-terminal","AkaraChen\u002Fbrowser-terminal","AkaraChen","A local browser-based terminal powered by Rust, PTY forwarding, WebSocket, and Xterm.js.",null,"Rust",24,2,1,0,38.43,false,"main",true,[20,21,22,23,24,25,26],"axum","pty","rust","terminal-emulator","tokio","websocket","xtermjs","2026-06-12 04:01:35","# Browser Terminal\n\nA small local terminal server that lets the browser act as a terminal window manager.\n\nThe Rust backend serves a single HTML page and forwards WebSocket traffic to an\nindependent PTY session. The frontend uses Xterm.js, reads a `channel` query\nparameter, and asks the backend to open each new browser window as a separate\nterminal session.\nFiles under `static\u002F` are embedded into the Rust binary at build time.\nThe frontend entrypoint is `static\u002Fapp.js`, split into ES modules under\n`static\u002Fjs\u002F`, with Alpine.js stores and components handling the browser UI\nbindings.\n\n## Features\n\n- Browser terminal UI powered by Xterm.js\n- Rust WebSocket backend using Axum\n- Static assets embedded into the Rust binary\n- Alpine.js UI bindings with frontend scripts split into ES modules\n- One PTY session per WebSocket connection\n- `?channel=\u003Cid>` URL-based session identity\n- New-window button for opening a fresh terminal session in the current\n  session's working directory\n- Settings dialog for terminal font and font size\n- Nerd Font loading via `@xterm\u002Faddon-web-fonts`\n- Settings persisted in `localStorage`\n- Live settings sync across open tabs via the browser `storage` event\n- Window title sync from Xterm title updates\n- Dynamic document icon for Claude, Codex, OpenCode, Qoder, Amp, Cline,\n  Copilot, Cursor, Kilo Code, and Kimi terminal titles\n- Tailwind CDN for compact page styling\n\n## Run\n\n```sh\ncargo run\n```\n\nThe server opens the browser automatically. You can also open it manually:\n\n```text\nhttp:\u002F\u002F127.0.0.1:3000\u002F?channel=main\n```\n\nWhen the server listens on a loopback address such as `127.0.0.1` or\n`localhost` and only allows loopback origins, Basic Auth is disabled by default.\nWhen it listens on a non-loopback address or allows a non-loopback CORS origin,\nthe server prints Basic Auth credentials when it starts. The default username is\n`admin`; if no fixed password is configured, a random password is generated for\nthat run.\n\nUse a different port with:\n\n```sh\ncargo run -- --port 3100\n```\n\nBind to a different host, or allow a separate frontend origin:\n\n```sh\ncargo run -- --host 0.0.0.0 --port 3100 --cors-origin http:\u002F\u002Flocalhost:5173\n```\n\n`HOST`, `PORT`, `CORS_ORIGIN`, and `DANGEROUS_ALLOW_ALL_HOST` environment\nvariables are also supported.\n\nWhen `--cors-origin` is omitted, only loopback hosts and loopback origins on the\nserver port are allowed, such as `http:\u002F\u002F127.0.0.1:3000` or\n`http:\u002F\u002Flocalhost:3000`. The same origin policy is also applied to WebSocket\nhandshakes.\n\nTo allow arbitrary `Host` and `Origin` headers, pass the explicit dangerous\nflag:\n\n```sh\ncargo run -- --dangerous-allow-all-host\n```\n\nBasic Auth remains enabled in this mode.\n\nUse `~\u002F.browser-terminalrc` to pin a fixed Basic Auth password. A configured\npassword also enables Basic Auth when listening on a loopback address:\n\n```text\nusername = admin\npassword = change-this-password\n```\n\n`user` is accepted as an alias for `username`, and `basic_auth_password` is\naccepted as an alias for `password`.\n\n## Notes\n\nThe server binds to `127.0.0.1` by default and is intended for local use. It\ndoes not include TLS, so do not expose it directly to the public internet.\n\nShells start in the user's home directory. The PTY implementation uses\n`portable-pty`, and the home directory is resolved with the cross-platform\n`dirs` crate.\n\n## Tech Stack\n\n- Rust\n- Axum\n- Tokio\n- portable-pty\n- include_dir\n- Alpine.js\n- Xterm.js\n- Xterm.js Web Fonts addon\n- Tailwind CSS CDN\n- LobeHub Icons static SVG CDN\n- Nerd Fonts via jsDelivr\n","Browser Terminal 是一个基于浏览器的本地终端，利用Rust、PTY转发、WebSocket和Xterm.js技术实现。该项目通过Rust后端提供了一个单页HTML应用，并将WebSocket流量转发到独立的PTY会话中，前端则使用Xterm.js来渲染终端界面。其特点包括：支持每个WebSocket连接对应一个PTY会话、基于URL参数创建新的终端会话窗口、以及通过Alpine.js处理UI绑定等。此外，项目还提供了如字体设置、Nerd Font加载等功能，并能够跨标签页同步设置。此工具非常适合需要在浏览器环境中进行命令行操作或开发测试的场景。","2026-06-11 04:06:59","CREATED_QUERY"]