@@ -14,9 +14,9 @@ GoTTY is a simple command line tool that turns your CLI tools into web applicati
...
@@ -14,9 +14,9 @@ GoTTY is a simple command line tool that turns your CLI tools into web applicati
# Installation
# Installation
Download the latest stable binary file from the [Releases](https://github.com/yudai/gotty/releases) page. Note that the release marked `Pre-release` is built automatically when new code is pushed to the repository, which can include unstable or breaking changes. Download a release marked `Latest release` for a stabale build.
Download the latest stable binary file from the [Releases](https://github.com/yudai/gotty/releases) 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://github.com/yudai/gotty/releases/latest) for a stabale build.
(`darwin_amd64.tar.gz` is for Mac OS X users)
(Files named with `darwin_amd64` are for Mac OS X users)
## Homebrew Installation
## Homebrew Installation
...
@@ -47,26 +47,31 @@ By default, GoTTY starts a web server at port 8080. Open the URL on your web bro
...
@@ -47,26 +47,31 @@ By default, GoTTY starts a web server at port 8080. Open the URL on your web bro
## Options
## Options
```
```
--address, -a IP address to listen [$GOTTY_ADDRESS]
--address value, -a value IP address to listen (default: "0.0.0.0") [$GOTTY_ADDRESS]
--port, -p "8080" Port number to listen [$GOTTY_PORT]
--port value, -p value Port number to liten (default: "8080") [$GOTTY_PORT]
--permit-write, -w Permit clients to write to the TTY (BE CAREFUL) [$GOTTY_PERMIT_WRITE]
--permit-write, -w Permit clients to write to the TTY (BE CAREFUL) [$GOTTY_PERMIT_WRITE]
--height value Static height of the screen, 0(default) means dynamically resize (default: 0) [$GOTTY_HEIGHT]
--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]
--term value Terminal name to use on the browser, one of xterm or hterm. (default: "xterm") [$GOTTY_TERM]
--close-signal value Signal sent to the command process when gotty close it (default: SIGHUP) (default: 1) [$GOTTY_CLOSE_SIGNAL]
--close-timeout value Time in seconds to force kill process after client is disconnected (default: -1) (default: -1) [$GOTTY_CLOSE_TIMEOUT]
--config value Config file path (default: "~/.gotty") [$GOTTY_CONFIG]
GoTTY uses [hterm](https://groups.google.com/a/chromium.org/forum/#!forum/chromium-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://github.com/krishnasrinivas/wetty).
GoTTY uses [xterm.js](https://xtermjs.org/) and [hterm](https://groups.google.com/a/chromium.org/forum/#!forum/chromium-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://github.com/krishnasrinivas/wetty).