|
| 1 | +# Installation |
| 2 | + |
| 3 | +`agent-tty` requires Node `>=24 <26`. |
| 4 | +The recommended install path is the npm package `agent-tty`. |
| 5 | +GitHub Release tarballs are the registry-independent fallback, and direct git dependency installs remain best-effort because they build from source. |
| 6 | + |
| 7 | +After any install, verify the binary and local environment: |
| 8 | + |
| 9 | +```bash |
| 10 | +agent-tty version --json |
| 11 | +agent-tty --home "$(mktemp -d)" doctor --json |
| 12 | +``` |
| 13 | + |
| 14 | +If `doctor --json` reports a missing Playwright browser cache on a fresh machine, run: |
| 15 | + |
| 16 | +```bash |
| 17 | +npx playwright install chromium |
| 18 | +``` |
| 19 | + |
| 20 | +## npm |
| 21 | + |
| 22 | +### Global install |
| 23 | + |
| 24 | +```bash |
| 25 | +npm install -g agent-tty |
| 26 | +agent-tty version --json |
| 27 | +agent-tty --home "$(mktemp -d)" doctor --json |
| 28 | +``` |
| 29 | + |
| 30 | +For automation, pin an exact version: |
| 31 | + |
| 32 | +```bash |
| 33 | +PACKAGE_VERSION=<version> |
| 34 | +npm install -g "agent-tty@${PACKAGE_VERSION}" |
| 35 | +agent-tty version --json |
| 36 | +``` |
| 37 | + |
| 38 | +To follow a prerelease channel, use a dist-tag such as `@beta` or `@rc`: |
| 39 | + |
| 40 | +```bash |
| 41 | +npm install -g agent-tty@beta |
| 42 | +``` |
| 43 | + |
| 44 | +### Project-local install |
| 45 | + |
| 46 | +```bash |
| 47 | +npm install agent-tty |
| 48 | +./node_modules/.bin/agent-tty version --json |
| 49 | +``` |
| 50 | + |
| 51 | +With an exact version: |
| 52 | + |
| 53 | +```bash |
| 54 | +PACKAGE_VERSION=<version> |
| 55 | +npm install "agent-tty@${PACKAGE_VERSION}" |
| 56 | +./node_modules/.bin/agent-tty version --json |
| 57 | +``` |
| 58 | + |
| 59 | +## GitHub Release Tarballs |
| 60 | + |
| 61 | +### Direct release asset install |
| 62 | + |
| 63 | +```bash |
| 64 | +VERSION=<version> |
| 65 | +RELEASE_TAG="v${VERSION}" |
| 66 | +RELEASE_TGZ="agent-tty-${VERSION}.tgz" |
| 67 | +TARBALL_URL="https://github.com/coder/agent-tty/releases/download/${RELEASE_TAG}/${RELEASE_TGZ}" |
| 68 | + |
| 69 | +npm install -g "$TARBALL_URL" |
| 70 | +agent-tty version --json |
| 71 | +``` |
| 72 | + |
| 73 | +### Authenticated or private release install |
| 74 | + |
| 75 | +```bash |
| 76 | +VERSION=<version> |
| 77 | +RELEASE_TAG="v${VERSION}" |
| 78 | +RELEASE_TGZ="agent-tty-${VERSION}.tgz" |
| 79 | + |
| 80 | +gh release download "$RELEASE_TAG" --repo coder/agent-tty --pattern "$RELEASE_TGZ" |
| 81 | +npm install -g "./$RELEASE_TGZ" |
| 82 | +agent-tty version --json |
| 83 | +agent-tty --home "$(mktemp -d)" doctor --json |
| 84 | +``` |
| 85 | + |
| 86 | +### Project-local tarball install |
| 87 | + |
| 88 | +```bash |
| 89 | +VERSION=<version> |
| 90 | +RELEASE_TGZ="./agent-tty-${VERSION}.tgz" |
| 91 | + |
| 92 | +npm install "$RELEASE_TGZ" |
| 93 | +./node_modules/.bin/agent-tty version --json |
| 94 | +``` |
| 95 | + |
| 96 | +## Local Tarball From Source |
| 97 | + |
| 98 | +When you need a deterministic local artifact before publishing a GitHub Release, build a tarball from a checkout: |
| 99 | + |
| 100 | +```bash |
| 101 | +TARBALL_DIR=$(mktemp -d) |
| 102 | +npm ci |
| 103 | +npm run pack:private -- --pack-destination "$TARBALL_DIR" |
| 104 | + |
| 105 | +INSTALL_PREFIX=$(mktemp -d) |
| 106 | +npm install -g --prefix "$INSTALL_PREFIX" "$TARBALL_DIR"/*.tgz |
| 107 | +"$INSTALL_PREFIX"/bin/agent-tty version --json |
| 108 | +"$INSTALL_PREFIX"/bin/agent-tty --home "$(mktemp -d)" doctor --json |
| 109 | +``` |
| 110 | + |
| 111 | +`npm run pack:private` rebuilds `dist/` before packing. |
| 112 | +Release automation uses `npm run pack:release` after the CI-quality build step so GitHub Releases and npm publishing reuse the same verified tarball plus checksum. |
| 113 | + |
| 114 | +## Git Source Install |
| 115 | + |
| 116 | +```bash |
| 117 | +npm install -g github:coder/agent-tty |
| 118 | +agent-tty version --json |
| 119 | +``` |
| 120 | + |
| 121 | +Git installs run npm's `prepare` hook and build from source. |
| 122 | +Use this only when you explicitly want the latest default-branch snapshot and your npm/git-dependency environment can build native dependencies such as `node-pty`. |
| 123 | + |
| 124 | +If your shell setup injects `mise activate` or another trust-checked tool into npm lifecycle subprocesses, trust the checkout path first or prefer the npm package or release tarball route. |
0 commit comments