[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4824":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":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":15,"starSnapshotCount":15,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},4824,"gotty","yudai\u002Fgotty","yudai","Share your terminal as a web application",null,"Go",19491,1413,317,112,0,1,3,30,4,44.45,"MIT License",false,"master",[25,26,27,28,29,30,31,32],"browser","go","javascript","terminal","tty","typescript","web","websocket","2026-06-12 02:01:04","# ![](https:\u002F\u002Fraw.githubusercontent.com\u002Fyudai\u002Fgotty\u002Fmaster\u002Fresources\u002Ffavicon.png) GoTTY - Share your terminal as a web application\n\n[![GitHub release](http:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fyudai\u002Fgotty.svg?style=flat-square)][release]\n[![Wercker](http:\u002F\u002Fimg.shields.io\u002Fwercker\u002Fci\u002F55d0eeff7331453f0801982c.svg?style=flat-square)][wercker]\n[![MIT License](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg?style=flat-square)][license]\n\n[release]: https:\u002F\u002Fgithub.com\u002Fyudai\u002Fgotty\u002Freleases\n[wercker]: https:\u002F\u002Fapp.wercker.com\u002Fproject\u002Fbykey\u002F03b91f441bebeda34f80e09a9f14126f\n[license]: https:\u002F\u002Fgithub.com\u002Fyudai\u002Fgotty\u002Fblob\u002Fmaster\u002FLICENSE\n\nGoTTY is a simple command line tool that turns your CLI tools into web applications.\n\n![Screenshot](https:\u002F\u002Fraw.githubusercontent.com\u002Fyudai\u002Fgotty\u002Fmaster\u002Fscreenshot.gif)\n\n# Installation\n\nDownload the latest stable binary file from the [Releases](https:\u002F\u002Fgithub.com\u002Fyudai\u002Fgotty\u002Freleases) page. Note that the release marked `Pre-release` is built for testing purpose, which can include unstable or breaking changes. Download a release marked [Latest release](https:\u002F\u002Fgithub.com\u002Fyudai\u002Fgotty\u002Freleases\u002Flatest) for a stabale build.\n\n(Files named with `darwin_amd64` are for Mac OS X users)\n\n## Homebrew Installation\n\nYou can install GoTTY with [Homebrew](http:\u002F\u002Fbrew.sh\u002F) as well.\n\n```sh\n$ brew install yudai\u002Fgotty\u002Fgotty\n```\n\n## `go get` Installation (Development)\n\nIf you have a Go language environment, you can install GoTTY with the `go get` command. However, this command builds a binary file from the latest master branch, which can include unstable or breaking changes. GoTTY requires go1.9 or later.\n\n```sh\n$ go get github.com\u002Fyudai\u002Fgotty\n```\n\n# Usage\n\n```\nUsage: gotty [options] \u003Ccommand> [\u003Carguments...>]\n```\n\nRun `gotty` with your preferred command as its arguments (e.g. `gotty top`).\n\nBy default, GoTTY starts a web server at port 8080. Open the URL on your web browser and you can see the running command as if it were running on your terminal.\n\n## Options\n\n```\n--address value, -a value     IP address to listen (default: \"0.0.0.0\") [$GOTTY_ADDRESS]\n--port value, -p value        Port number to liten (default: \"8080\") [$GOTTY_PORT]\n--permit-write, -w            Permit clients to write to the TTY (BE CAREFUL) [$GOTTY_PERMIT_WRITE]\n--credential value, -c value  Credential for Basic Authentication (ex: user:pass, default disabled) [$GOTTY_CREDENTIAL]\n--random-url, -r              Add a random string to the URL [$GOTTY_RANDOM_URL]\n--random-url-length value     Random URL length (default: 8) [$GOTTY_RANDOM_URL_LENGTH]\n--tls, -t                     Enable TLS\u002FSSL [$GOTTY_TLS]\n--tls-crt value               TLS\u002FSSL certificate file path (default: \"~\u002F.gotty.crt\") [$GOTTY_TLS_CRT]\n--tls-key value               TLS\u002FSSL key file path (default: \"~\u002F.gotty.key\") [$GOTTY_TLS_KEY]\n--tls-ca-crt value            TLS\u002FSSL CA certificate file for client certifications (default: \"~\u002F.gotty.ca.crt\") [$GOTTY_TLS_CA_CRT]\n--index value                 Custom index.html file [$GOTTY_INDEX]\n--title-format value          Title format of browser window (default: \"{{ .command }}@{{ .hostname }}\") [$GOTTY_TITLE_FORMAT]\n--reconnect                   Enable reconnection [$GOTTY_RECONNECT]\n--reconnect-time value        Time to reconnect (default: 10) [$GOTTY_RECONNECT_TIME]\n--max-connection value        Maximum connection to gotty (default: 0) [$GOTTY_MAX_CONNECTION]\n--once                        Accept only one client and exit on disconnection [$GOTTY_ONCE]\n--timeout value               Timeout seconds for waiting a client(0 to disable) (default: 0) [$GOTTY_TIMEOUT]\n--permit-arguments            Permit clients to send command line arguments in URL (e.g. http:\u002F\u002Fexample.com:8080\u002F?arg=AAA&arg=BBB) [$GOTTY_PERMIT_ARGUMENTS]\n--width value                 Static width of the screen, 0(default) means dynamically resize (default: 0) [$GOTTY_WIDTH]\n--height value                Static height of the screen, 0(default) means dynamically resize (default: 0) [$GOTTY_HEIGHT]\n--ws-origin value             A regular expression that matches origin URLs to be accepted by WebSocket. No cross origin requests are acceptable by default [$GOTTY_WS_ORIGIN]\n--term value                  Terminal name to use on the browser, one of xterm or hterm. (default: \"xterm\") [$GOTTY_TERM]\n--close-signal value          Signal sent to the command process when gotty close it (default: SIGHUP) (default: 1) [$GOTTY_CLOSE_SIGNAL]\n--close-timeout value         Time in seconds to force kill process after client is disconnected (default: -1) (default: -1) [$GOTTY_CLOSE_TIMEOUT]\n--config value                Config file path (default: \"~\u002F.gotty\") [$GOTTY_CONFIG]\n--version, -v                 print the version\n```\n\n### Config File\n\nYou can customize default options and your terminal (hterm) by providing a config file to the `gotty` command. GoTTY loads a profile file at `~\u002F.gotty` by default when it exists.\n\n```\n\u002F\u002F Listen at port 9000 by default\nport = \"9000\"\n\n\u002F\u002F Enable TSL\u002FSSL by default\nenable_tls = true\n\n\u002F\u002F hterm preferences\n\u002F\u002F Smaller font and a little bit bluer background color\npreferences {\n    font_size = 5\n    background_color = \"rgb(16, 16, 32)\"\n}\n```\n\nSee the [`.gotty`](https:\u002F\u002Fgithub.com\u002Fyudai\u002Fgotty\u002Fblob\u002Fmaster\u002F.gotty) file in this repository for the list of configuration options.\n\n### Security Options\n\nBy default, GoTTY doesn't allow clients to send any keystrokes or commands except terminal window resizing. When you want to permit clients to write input to the TTY, add the `-w` option. However, accepting input from remote clients is dangerous for most commands. When you need interaction with the TTY for some reasons, consider starting GoTTY with tmux or GNU Screen and run your command on it (see \"Sharing with Multiple Clients\" section for detail).\n\nTo restrict client access, you can use the `-c` option to enable the basic authentication. With this option, clients need to input the specified username and password to connect to the GoTTY server. Note that the credentical will be transmitted between the server and clients in plain text. For more strict authentication, consider the SSL\u002FTLS client certificate authentication described below.\n\nThe `-r` option is a little bit casualer way to restrict access. With this option, GoTTY generates a random URL so that only people who know the URL can get access to the server.  \n\nAll traffic between the server and clients are NOT encrypted by default. When you send secret information through GoTTY, we strongly recommend you use the `-t` option which enables TLS\u002FSSL on the session. By default, GoTTY loads the crt and key files placed at `~\u002F.gotty.crt` and `~\u002F.gotty.key`. You can overwrite these file paths with the `--tls-crt` and `--tls-key` options. When you need to generate a self-signed certification file, you can use the `openssl` command.\n\n```sh\nopenssl req -x509 -nodes -days 9999 -newkey rsa:2048 -keyout ~\u002F.gotty.key -out ~\u002F.gotty.crt\n```\n\n(NOTE: For Safari uses, see [how to enable self-signed certificates for WebSockets](http:\u002F\u002Fblog.marcon.me\u002Fpost\u002F24874118286\u002Fsecure-websockets-safari) when use self-signed certificates)\n\nFor additional security, you can use the SSL\u002FTLS client certificate authentication by providing a CA certificate file to the `--tls-ca-crt` option (this option requires the `-t` or `--tls` to be set). This option requires all clients to send valid client certificates that are signed by the specified certification authority.\n\n## Sharing with Multiple Clients\n\nGoTTY starts a new process with the given command when a new client connects to the server. This means users cannot share a single terminal with others by default. However, you can use terminal multiplexers for sharing a single process with multiple clients.\n\nFor example, you can start a new tmux session named `gotty` with `top` command by the command below.\n\n```sh\n$ gotty tmux new -A -s gotty top\n```\n\nThis command doesn't allow clients to send keystrokes, however, you can attach the session from your local terminal and run operations like switching the mode of the `top` command. To connect to the tmux session from your terminal, you can use following command.\n\n```sh\n$ tmux new -A -s gotty\n```\n\nBy using terminal multiplexers, you can have the control of your terminal and allow clients to just see your screen.\n\n### Quick Sharing on tmux\n\nTo share your current session with others by a shortcut key, you can add a line like below to your `.tmux.conf`.\n\n```\n# Start GoTTY in a new window with C-t\nbind-key C-t new-window \"gotty tmux attach -t `tmux display -p '#S'`\"\n```\n\n## Playing with Docker\n\nWhen you want to create a jailed environment for each client, you can use Docker containers like following:\n\n```sh\n$ gotty -w docker run -it --rm busybox\n```\n\n## Development\n\nYou can build a binary using the following commands. Windows is not supported now. go1.9 is required.\n\n```sh\n# Install tools\ngo get github.com\u002Fjteeuwen\u002Fgo-bindata\u002F...\ngo get github.com\u002Ftools\u002Fgodep\n\n# Build\nmake\n```\n\nTo build the frontend part (JS files and other static files), you need `npm`.\n\n## Architecture\n\nGoTTY uses [xterm.js](https:\u002F\u002Fxtermjs.org\u002F) and [hterm](https:\u002F\u002Fgroups.google.com\u002Fa\u002Fchromium.org\u002Fforum\u002F#!forum\u002Fchromium-hterm) to run a JavaScript based terminal on web browsers. GoTTY itself provides a websocket server that simply relays output from the TTY to clients and receives input from clients and forwards it to the TTY. This hterm + websocket idea is inspired by [Wetty](https:\u002F\u002Fgithub.com\u002Fkrishnasrinivas\u002Fwetty).\n\n## Alternatives\n\n### Command line client\n\n* [gotty-client](https:\u002F\u002Fgithub.com\u002Fmoul\u002Fgotty-client): If you want to connect to GoTTY server from your terminal\n\n### Terminal\u002FSSH on Web Browsers\n\n* [Secure Shell (Chrome App)](https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fsecure-shell\u002Fpnhechapfaindjhompbnflcldabbghjo): If you are a chrome user and need a \"real\" SSH client on your web browser, perhaps the Secure Shell app is what you want\n* [Wetty](https:\u002F\u002Fgithub.com\u002Fkrishnasrinivas\u002Fwetty): Node based web terminal (SSH\u002Flogin)\n* [ttyd](https:\u002F\u002Ftsl0922.github.io\u002Fttyd): C port of GoTTY with CJK and IME support\n\n### Terminal Sharing\n\n* [tmate](http:\u002F\u002Ftmate.io\u002F): Forked-Tmux based Terminal-Terminal sharing\n* [termshare](https:\u002F\u002Ftermsha.re): Terminal-Terminal sharing through a HTTP server\n* [tmux](https:\u002F\u002Ftmux.github.io\u002F): Tmux itself also supports TTY sharing through SSH)\n\n# License\n\nThe MIT License\n","GoTTY 是一个简单的命令行工具，可以将你的CLI工具转换为Web应用程序。它通过WebSocket技术实现实时交互，并支持基本的身份验证和TLS\u002FSSL加密来确保安全性。用户可以通过浏览器访问并操作远程终端，就像直接在本地使用一样。此工具非常适合需要远程管理和监控服务器、演示命令行工具功能或进行协作开发的场景。",2,"2026-06-11 03:00:43","top_language"]