{"_id":"@10xdevs/term","name":"@10xdevs/term","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@10xdevs/term","version":"0.1.0","private":false,"bin":{"term":"bin/term.mjs"},"scripts":{"dev":"npx tsx server.ts","build":"next build","start":"node ./bin/term.mjs","prepack":"next build","lint":"eslint","type-check":"tsc --noEmit"},"dependencies":{"@base-ui/react":"^1.6.0","@tailwindcss/postcss":"^4.2.2","@wterm/dom":"^0.3.0","@wterm/ghostty":"^0.3.0","@wterm/react":"^0.3.0","class-variance-authority":"^0.7.1","clsx":"^2.1.1","lucide-react":"^1.8.0","next":"16.2.3","node-pty":"^1.0.0","postcss":"^8.5.9","react":"19.2.5","react-dom":"19.2.5","shadcn":"^4.13.1","tailwind-merge":"^3.6.0","tailwindcss":"^4.2.2","tw-animate-css":"^1.4.0","ws":"^8.18.2","tsx":"^4.19.4"},"devDependencies":{"@types/node":"^25.6.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@types/ws":"^8.18.1","eslint":"^9.39.4","eslint-config-next":"16.2.3","typescript":"^6.0.2"},"gitHead":"35fea9623780111e0ff2821a27e334136c989dd4","_id":"@10xdevs/term@0.1.0","description":"Full local terminal in the browser, connected to your machine's shell via WebSocket and [node-pty](https://github.com/microsoft/node-pty).","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-cMzOYJaE3AN7GNB1Q225mLwut6L3yNkjAYAL3aWvxbXBQ33mUr4XZlgL/rKXvN/2N22A4eWv0OR7PzZG23bZNg==","shasum":"f4ffa6ccdefda5d715c67916334e887427e92005","tarball":"https://registry.npmjs.org/@10xdevs/term/-/term-0.1.0.tgz","fileCount":22,"unpackedSize":519319,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH5wj8JT+z7OhQnzwahSyZR1CGGguFnNVbm33jKrliDEAiEAsnUFeTONVm0dQuZ05V+JBdrhOPtTm90ORWtEqZB92Hk="}]},"_npmUser":{"name":"10xdevs","email":"tanavposwal939@gmail.com"},"directories":{},"maintainers":[{"name":"10xdevs","email":"tanavposwal939@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/term_0.1.0_1784472328901_0.2687112556689666"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T14:45:28.789Z","0.1.0":"2026-07-19T14:45:29.068Z","modified":"2026-07-19T14:45:29.237Z"},"maintainers":[{"name":"10xdevs","email":"tanavposwal939@gmail.com"}],"description":"Full local terminal in the browser, connected to your machine's shell via WebSocket and [node-pty](https://github.com/microsoft/node-pty).","readme":"# Local Shell Example\n\nFull local terminal in the browser, connected to your machine's shell via WebSocket and [node-pty](https://github.com/microsoft/node-pty).\n\n## Run as a package\n\nAfter publishing, run the optimized production server directly with Bun:\n\n```bash\nbunx @10xdevs/term\nbunx @10xdevs/term --port 8080\n```\n\nThe default port is `4242`. The package builds once on first run when no production build is present, then starts the small custom HTTP + WebSocket server (not the Next development server).\n\n## Setup\n\nFrom the monorepo root:\n\n```bash\npnpm install\nzig build\npnpm --filter local dev\n```\n\nOpens at `local-example.wterm.localhost` via [portless](https://github.com/vercel-labs/portless).\n\n## How It Works\n\n- `server.ts` starts an HTTP + WebSocket server alongside Next.js\n- On WebSocket connection, a PTY process is spawned with your default shell\n- The browser sends keystrokes over WebSocket; the server relays PTY output back\n- Terminal resizing is forwarded to the PTY via a custom escape sequence\n\n## Key Files\n\n| File | Description |\n|---|---|\n| `server.ts` | Custom server with WebSocket ↔ PTY bridge |\n| `app/page.tsx` | Terminal page with auto-resize and WebSocket connection |\n| `app/layout.tsx` | Root layout with metadata |\n","readmeFilename":"README.md","_rev":"1-3a8ac0d81655797a01571ecaa4efce0b"}