From 9c6b5f6e5926ac2f630dd725fcc6c774093ead6a Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Wed, 28 Jan 2026 10:59:39 -0500 Subject: [PATCH] Update CLAUDE.md with project-specific instructions Added project description, contribution policy for bun-pty, and standard workflow notes. Kept Bun API references for development guidance. --- CLAUDE.md | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..e03b27e --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,132 @@ +# 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`.