# Technical Documentation: tsl0922/ttyd

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/tsl0922/ttyd)

### Overview (`README.md`)

[](https://github.com/tsl0922/ttyd/releases)
[](https://hub.docker.com/r/tsl0922/ttyd)
[](https://repology.org/project/ttyd/versions)


# ttyd - Share your terminal over the web

ttyd is a simple command-line tool for sharing terminal over the web.



# Features

- Built on top of [libuv](https://libuv.org) and [WebGL2](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) for speed
- Fully-featured terminal with [CJK](https://en.wikipedia.org/wiki/CJK_characters) and IME support
- [ZMODEM](https://en.wikipedia.org/wiki/ZMODEM) ([lrzsz](https://ohse.de/uwe/software/lrzsz.html)) / [trzsz](https://trzsz.github.io) file transfer support
- [Sixel](https://en.wikipedia.org/wiki/Sixel) image output support ([img2sixel](https://saitoha.github.io/libsixel) / [lsix](https://github.com/hackerb9/lsix))
- SSL support based on [OpenSSL](https://www.openssl.org) / [Mbed TLS](https://github.com/Mbed-TLS/mbedtls)
- Run any custom command with options
- Basic authentication support and many other custom options
- Cross platform: macOS, Linux, FreeBSD/OpenBSD, [OpenWrt](https://openwrt.org), Windows

# Installation

## Install on macOS

- Install with [Homebrew](http://brew.sh): `brew install ttyd`
- Install with [MacPorts](https://www.macports.org): `sudo port install ttyd`

## Install on Linux

- Install on Debian/Ubuntu: `sudo apt install ttyd`
- Install the snap: `sudo snap install ttyd --classic`
- Install on OpenWrt: `opkg install ttyd`
- Install on Gentoo: clone the [repo](https://bitbucket.org/mgpagano/ttyd/src/master) and follow the directions [here](https://wiki.gentoo.org/wiki/Custom_repository#Creating_a_local_repository).
- Install with [Homebrew](https://docs.brew.sh/Homebrew-on-Linux) : `brew install ttyd`
- Precompiled static binaries: download from the [releases](https://github.com/tsl0922/ttyd/releases) page

## Install on Windows

- Binary version (recommended): download from the [releases](https://github.com/tsl0922/ttyd/releases) page
- Install with [WinGet](https://github.com/microsoft/winget-cli): `winget install tsl0922.ttyd`
- Install with [Scoop](https://scoop.sh/#/apps?q=ttyd&s=2&d=1&o=true): `scoop install ttyd`
- [Compile on Windows](https://github.com/tsl0922/ttyd/wiki/Compile-on-Windows)

# Usage

## Command-line Options

```
/* Detailed source-code truncated for AI context efficiency. */
```

Read the example usage on the [wiki](https://github.com/tsl0922/ttyd/wiki/Example-Usage).

## Browser Support

Modern browsers, See [Browser Support](https://github.com/xtermjs/xterm.js#browser-support).

## Alternatives

* [Wetty](https://github.com/krishnasrinivas/wetty): [Node](https://nodejs.org) based web terminal (SSH/login)
* [GoTTY](https://github.com/yudai/gotty): [Go](https://golang.org) based web terminal

---

### Overview (`html/README.md`)

## Prerequisites

> **NOTE:** yarn v2 is required.

Install [Yarn](https://yarnpkg.com/getting-started/install), and run: `yarn install`.

## Development

1. Start ttyd: `ttyd bash`
2. Start the dev server: `yarn run start`

## Publish

Run `yarn run build`, this will compile the inlined html to `../src/html.h`.

---

### Overview (`man/README.md`)

# Building the man page

```bash
go get github.com/cpuguy83/go-md2man
go-md2man < ttyd.man.md  > ttyd.1
```

---

--- METRICS ---
- Files Extracted: 3
- Estimated Token Budget: ~827 tokens
- Canonical Reference: https://codewiki.google/github.com/tsl0922/ttyd
