wetty

Installation from Source

WeTTY can be installed from source or from npm.

To install from source run:

$ git clone https://github.com/butlerx/wetty.git
$ cd wetty
$ pnpm install
$ pnpm build

Development Env

To run WeTTY in dev mode you can run pnpm dev.

WeTTY will then be served from http://localhost:3000 on your machine.

The server will be using the conf/config.json5 config file and be pointing at localhost on port 22.

The sample config explicitly allows http://localhost:3000. Update server.allowedOrigins if you access the development server through another hostname or port. Production deployments must configure their browser-facing origins explicitly; the listen address and request Host are not trusted.

The Dev server will rebuild WeTTY when ever a file is edited and restart the server with the new build. Any current ssh session in WeTTY will be killed and the user logged out.

Source Ownership

Lifecycle state should follow the same pattern across runtimes: keep a small discriminated state inside a functional closure, expose named transitions, and make disposal idempotent. Use string-literal status unions instead of runtime enums, and avoid mutable module globals for per-session state.