rch — CLI for Claude Code and Codex

rch reroutes agent cargo, gcc and make builds to remote workers through a Claude Code hook and frees the local CPU.

Install in Claude Code and Codex

Manual install

curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/remote_compilation_helper/main/install.sh?$(date +%s)" | bash -s -- --easy-mode

Installs `rch` and `rchd`, bootstraps config and refreshes the skill in `~/.claude/skills/rch` and `~/.codex/skills/rch`. Skip the skill with `--skip-skill`.

Access and checks

How we review

Broad access. The tool can change data, run commands or handle secrets.

  • The hook intercepts agent shell commands and reroutes them to other machines.
  • Source code and artifacts are transferred to remote servers over SSH.
  • Installation executes a script from the network through `curl | bash`.

This is third-party code. Review the repository files before installing.

What it does

Remote Compilation Helper runs as a PreToolUse hook in Claude Code. In milliseconds it decides whether a command looks like a build, runs it on a remote worker and returns output and artifacts as if it ran locally. It recognizes `cargo build`, `cargo test`, `go build`, `gcc`, `clang`, `make`, `cmake --build`, `ninja`, `bun test`, `tsc --noEmit` and Nix builds. Source and results travel over `rsync` through SSH to workers listed in `~/.config/rch/workers.toml`. The installer adds the `rchd` daemon and the `rch` binary, and `rch init` guides setup: finding servers in the SSH config, probing, deploying `rch-wkr`, toolchain sync and hook installation. If remote execution is impossible or unsafe, the command runs locally.

Who it is for. Developers running many parallel agents who hit CPU limits on their workstation during Rust, Go and C++ builds.

Good fit when

  • Several agents run `cargo test` at once and the laptop stops responding.
  • An SSH server with many cores is available for builds.
  • You need build routing diagnostics: `rch check` and `rch status --workers --jobs`.
  • A Rust, Go, C++ or TypeScript project builds too slowly locally.

Not a fit when

  • No remote machines with SSH access exist.
  • Source code cannot be copied to third-party servers.
  • You need strict remote-only execution; by default rch falls back to local on failure.

Example request

Set rch up for my server from the SSH config, probe the workers and run cargo test through remote build.

Limitations

Source is synced to worker servers over SSH, so those servers must be trusted. On macOS install `rsync` 3.2 or newer through Homebrew, otherwise transfers use a reduced flag set. The license is MIT with an OpenAI and Anthropic rider; read `LICENSE` before company use. The `PreToolUse` hook is a Claude Code feature, and for Codex the installer adds only the skill. Workers must have matching toolchains, and Go version, CGO and flags must match the local ones or the build stays local. The installer writes into `~/.claude/skills` and `~/.codex/skills`; disable that with `--skip-skill`.

How to disable. Remove the hook with the command shown in `rch --help`, stop the daemon with `rch daemon stop`, delete `rch`, `rchd` and `~/.config/rch`. The installer also refreshes a skill in `~/.claude/skills/rch`, which you remove by hand.

FAQ

How does rch recognize a build command?

A classifier parses the command in milliseconds against a table of recognized forms: `cargo`, `go`, `gcc`, `make`, `ninja`, `bun test` and others. Other commands run as usual.

What happens if the worker is unreachable?

rch is fail-open: the command runs locally. `RCH_REQUIRE_REMOTE=1` makes it refuse instead.

How do I add a worker?

Describe it in `~/.config/rch/workers.toml` (id, host, user, identity_file, total_slots), start `rch daemon start` and check with `rch workers probe --all`.

Are Nix builds supported?

Yes, but only on workers advertising a `nix` capability and a populated `/nix/store`. The result stays on the worker behind a `result` symlink.

How do I confirm routing works?

Run `rch check`, then `rch status --workers --jobs`; they show the state of the hook, daemon, workers and current builds.

How do I install rch?

Run curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/remote_compilation_helper/main/install.sh?$(date +%s)" | bash -s -- --easy-mode in a terminal.

Discussion

No questions or reviews yet.

README in short

The tool consists of the `rch` CLI, the `rchd` daemon and the `rch-wkr` worker agent. It covers Rust, Go, C++, Bun, TypeScript and Nix, and the `--json` and `--robot-triage` flags target agents.

README badge

Report a problem