Add light build requiring bun installed

This commit is contained in:
Jared Miller 2026-01-28 17:28:17 -05:00
parent 5abdf31480
commit eb3bad289a
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
2 changed files with 18 additions and 2 deletions

View file

@ -17,13 +17,22 @@ start:
check:
bun run lint && bun run typecheck && bun run test
# Build CLI binary (smallest possible)
build: build-cli build-bundle
@ls -lah dist/bin/
# Build CLI binary (standalone, ~100MB, no deps)
build-cli:
mkdir -p dist/bin
bun build --compile --minify --sourcemap=none src/cli.ts --outfile dist/bin/claude-remote
# Build CLI bundle (small, requires bun installed)
build-bundle:
mkdir -p dist/bin
bun build --minify --target bun src/cli.ts --outfile dist/bin/claude-remote.js
chmod +x dist/bin/claude-remote.js
# Docker build
build:
build-image:
docker build -t claude-remote .
up:

View file

@ -2,6 +2,13 @@
// PTY wrapper for claude CLI
// Check for Bun runtime (only fails when running bundled .js with Node)
if (typeof Bun === "undefined") {
console.error("claude-remote requires Bun to run.");
console.error("Install Bun: https://bun.sh");
process.exit(1);
}
import type { IPty } from "bun-pty";
import { spawn } from "bun-pty";
import type { ClientMessage, ServerMessage } from "./types";