# claude-remote Self-hosted remote control for Claude Code. Wrap CLI in PTY, stream output to server, approve prompts from phone. ## Project Pure Bun stack: no frameworks, minimal dependencies. Target ~1000-1500 lines total. Core tech: - bun-pty for PTY wrapper (FFI to Rust, pre-built binaries) - bun:sqlite for persistence - Bun.serve() for HTTP + WebSocket + SSE - plain text output (no xterm.js) for mobile-friendly display ## Contribution policy If bun-pty needs changes, fork and contribute upstream. Don't vendor or patch locally. ## Workflow After making changes: ```bash just check # lint + typecheck + test ``` Commit after each logical change. One change = one commit. Keep commits atomic. ## Bun defaults - Use `bun ` instead of `node ` or `ts-node ` - Use `bun test` instead of `jest` or `vitest` - Use `bun build ` instead of `webpack` or `esbuild` - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install` - Use `bun run ``` With the following `frontend.tsx`: ```tsx#frontend.tsx import React from "react"; import { createRoot } from "react-dom/client"; // import .css files directly and it works import './index.css'; const root = createRoot(document.body); export default function Frontend() { return

Hello, world!

; } root.render(); ``` Then, run index.ts ```sh bun --hot ./index.ts ``` For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.