diff --git a/.gitignore b/.gitignore index a457a5f..5bbf6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,9 +29,9 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json # SQLite databases # Root db (legacy, use data/ dirs instead) -/claude-remote.db -/claude-remote.db-shm -/claude-remote.db-wal +/clarc.db +/clarc.db-shm +/clarc.db-wal # Data directories data/dev/*.db @@ -48,4 +48,4 @@ data/prod/*.db-wal # Finder (MacOS) folder config .DS_Store -claude-remote +clarc diff --git a/CLAUDE.md b/CLAUDE.md index 7aa0589..c3e9cc6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# claude-remote +# clarc Self-hosted remote control for Claude Code. Wrap CLI in PTY, stream output to server, approve prompts from phone. diff --git a/Caddyfile.example b/Caddyfile.example index 857fcc3..9450d48 100644 --- a/Caddyfile.example +++ b/Caddyfile.example @@ -1,9 +1,9 @@ -# Caddyfile.example - reverse proxy for claude-remote +# Caddyfile.example - reverse proxy for clarc # # Option 1: Tailscale IP restriction (recommended) # Only allows connections from Tailscale network (100.64.0.0/10) -claude-remote.yourdomain.com { +clarc.yourdomain.com { @tailscale remote_ip 100.64.0.0/10 handle @tailscale { reverse_proxy localhost:7200 @@ -14,7 +14,7 @@ claude-remote.yourdomain.com { # Option 2: Basic auth (if you need public access) # Generate hash with: caddy hash-password -# claude-remote.yourdomain.com { +# clarc.yourdomain.com { # basicauth { # user $2a$14$your_hashed_password_here # } @@ -23,7 +23,7 @@ claude-remote.yourdomain.com { # Option 3: Both (belt and suspenders) -# claude-remote.yourdomain.com { +# clarc.yourdomain.com { # @tailscale remote_ip 100.64.0.0/10 # handle @tailscale { # basicauth { diff --git a/Dockerfile b/Dockerfile index 57f8efc..29e27f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY . . # Build CLI binary (smallest possible) RUN mkdir -p dist/bin && \ bun build --compile --minify --sourcemap=none --target=bun-linux-x64 \ - src/cli.ts --outfile dist/bin/claude-remote + src/cli.ts --outfile dist/bin/clarc # Runtime stage - for running the server FROM oven/bun:1-slim @@ -25,13 +25,13 @@ COPY --from=builder /app/public ./public COPY --from=builder /app/package.json ./ # Copy CLI binary for extraction if needed -COPY --from=builder /app/dist/bin/claude-remote /app/dist/bin/ +COPY --from=builder /app/dist/bin/clarc /app/dist/bin/ # Create data directory RUN mkdir -p data/prod ENV PORT=7200 -ENV DB_PATH=/app/data/prod/claude-remote.db +ENV DB_PATH=/app/data/prod/clarc.db EXPOSE 7200 CMD ["bun", "run", "src/server.ts"] diff --git a/README.md b/README.md index 03837fa..b10780a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# claude-remote +# clarc Self-hosted remote control for Claude Code. Wraps CLI in PTY, streams output to server, approve prompts from phone. @@ -12,16 +12,16 @@ just dev just seed dev "My Phone" # 3. build the binary + symlink to ~/bin -bun build --compile src/cli.ts --outfile claude-remote -ln -sf $(pwd)/claude-remote ~/bin/claude-remote +bun build --compile src/cli.ts --outfile clarc +ln -sf $(pwd)/clarc ~/bin/clarc # 4. set your secret export CLAUDE_REMOTE_SECRET=dev # add to .bashrc/.zshrc # 5. use it like claude -claude-remote -claude-remote -r -claude-remote --dangerously-skip-permissions +clarc +clarc -r +clarc --dangerously-skip-permissions # 6. open browser/phone open http://localhost:7200 @@ -53,13 +53,13 @@ Default if you just run `just seed`: ### run claude -With the binary installed and `CLAUDE_REMOTE_SECRET` set, just use `claude-remote` like `claude`: +With the binary installed and `CLAUDE_REMOTE_SECRET` set, just use `clarc` like `claude`: ```bash -claude-remote # interactive -claude-remote -r # resume -claude-remote --help # shows help -claude-remote -p "explain this" # print mode +clarc # interactive +clarc -r # resume +clarc --help # shows help +clarc -p "explain this" # print mode ``` All arguments pass through to claude. @@ -76,15 +76,15 @@ export CLAUDE_REMOTE_SERVER=ws://localhost:7200/ws # optional, this is the defau Or use flags to override: ```bash -claude-remote --secret other-device --server ws://remote:7200/ws +clarc --secret other-device --server ws://remote:7200/ws ``` ### shell aliases ```bash -alias cr='claude-remote' -alias crr='claude-remote -r' -alias crd='claude-remote --dangerously-skip-permissions' +alias cr='clarc' +alias crr='clarc -r' +alias crd='clarc --dangerously-skip-permissions' alias crdr='crd -r' ``` diff --git a/bun.lock b/bun.lock index 5149871..ceb74ff 100644 --- a/bun.lock +++ b/bun.lock @@ -3,7 +3,7 @@ "configVersion": 1, "workspaces": { "": { - "name": "claude-remote", + "name": "clarc", "dependencies": { "bun-pty": "^0.4.8", }, diff --git a/compose.yml b/compose.yml index 20bb9d3..c378d3f 100644 --- a/compose.yml +++ b/compose.yml @@ -7,7 +7,7 @@ services: - ./data/prod:/app/data/prod environment: - PORT=7200 - - DB_PATH=/app/data/prod/claude-remote.db + - DB_PATH=/app/data/prod/clarc.db - CLAUDE_REMOTE_SECRET - CLAUDE_REMOTE_DEVICE_NAME restart: unless-stopped diff --git a/docs/phase2-design.txt b/docs/phase2-design.txt index 20b00fc..e1f4f55 100644 --- a/docs/phase2-design.txt +++ b/docs/phase2-design.txt @@ -6,7 +6,7 @@ Overview Phase 1 delivered basic remote control: Claude Code session wrapping, SSE streaming to mobile dashboard, binary prompt approval (y/n only). Phase 2 addresses the most -critical gaps between claude-remote and the crabigator reference implementation: +critical gaps between clarc and the crabigator reference implementation: 1. Rich prompt system - multi-option choices, text input, tab instructions 2. ANSI color parsing in output @@ -14,7 +14,7 @@ critical gaps between claude-remote and the crabigator reference implementation: 4. Git status widget 5. UI polish - style controls, filtering, auto-scroll -This phase transforms claude-remote from a proof-of-concept into a genuinely useful +This phase transforms clarc from a proof-of-concept into a genuinely useful remote approval tool. Priority is on prompt system (the blocker for real usage) followed by output quality and UX improvements. @@ -280,7 +280,7 @@ Git Status Extraction ---------------------- Git status widget shows current branch and file changes. Crabigator extracts this -by parsing git status output in the PTY stream. For claude-remote, two approaches: +by parsing git status output in the PTY stream. For clarc, two approaches: Approach A (simple): Git hook in Claude Code - Claude Code has git hooks that emit structured git events @@ -369,7 +369,7 @@ Medium priority: - Grouping: all sessions vs. by project (group by cwd) Implementation: -- Store preferences in localStorage (key: claude-remote-prefs) +- Store preferences in localStorage (key: clarc-prefs) - Apply via CSS classes on container element - Layout: data-layout="1" | "2" | "3" | "fit" - Font size: CSS variable --font-scale diff --git a/docs/plan.md b/docs/plan.md index a85c494..e1b8abc 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -1,4 +1,4 @@ -# claude-remote +# clarc self-hosted remote control for claude code, pure bun stack. @@ -15,12 +15,12 @@ wrap claude cli in PTY, stream output to server, approve prompts from phone. ## project location -`/home/jtm/projects/agentry/repos/claude-remote/` +`/home/jtm/projects/agentry/repos/clarc/` ## structure ``` -claude-remote/ +clarc/ ├── src/ │ ├── cli.ts # PTY wrapper, connects to server │ ├── server.ts # HTTP + WebSocket + SSE diff --git a/justfile b/justfile index d8b3add..3012ef8 100644 --- a/justfile +++ b/justfile @@ -23,17 +23,17 @@ build: build-cli build-bundle # 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 + bun build --compile --minify --sourcemap=none src/cli.ts --outfile dist/bin/clarc # 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 + bun build --minify --target bun src/cli.ts --outfile dist/bin/clarc.js + chmod +x dist/bin/clarc.js # Docker build build-image: - docker build -t claude-remote . + docker build -t clarc . up: docker compose up -d diff --git a/package.json b/package.json index 09ebb85..e94aaae 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "claude-remote", + "name": "clarc", "description": "Self-hosted remote control for Claude Code - wrap CLI in PTY, stream output, approve prompts from phone", "module": "src/server.ts", "type": "module", diff --git a/public/index.html b/public/index.html index a678ac3..dc496ba 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@
-