Load-Aware Shims
offrig shim installs opt-in wrapper executables ahead of your normal PATH. Inside configured Worktrees, matching commands run locally while your laptop has headroom and spill transparently onto a remote Rig when local concurrency, CPU load, or free RAM cross [shim.routing] thresholds. Outside configured Worktrees (or when no remote Rig is configured), Shims pass straight through to the real local binary with negligible overhead.
Install and activate Shims
Section titled “Install and activate Shims”# Install managed # offrig-shim wrappersoffrig shim install cargo pnpm pytest
# Activate in your current shell (or add to ~/.zshrc / ~/.bashrc / config.fish)eval "$(offrig shim env)"Supported shell dialects for offrig shim env --shell: sh, bash, zsh, and fish (auto-detected from $SHELL when omitted).
Inspect active Shims, PATH ordering, routing thresholds, and resolved local fallback binaries:
offrig shim lsoffrig shim ls --jsonRemove one or all managed Shims:
offrig shim remove pytestoffrig shim remove --allConfigure [shim.routing]
Section titled “Configure [shim.routing]”Configure routing thresholds in ~/.config/offrig/config.toml (or per-repo offrig.local.toml):
[shim.routing]# Spill to remote Rig once more than 2 shimmed commands run locally (default: 2, max: 256)max_local_concurrent = 2# Spill when 1-minute load average / CPU cores exceeds 0.75 (default: 0.75)max_load_ratio = 0.75# Spill when available laptop memory drops below 20% (default: 20, max: 99)min_free_memory_percent = 20Safety guarantees
Section titled “Safety guarantees”- Automatic pre-start local fallback: If a shimmed command decides to spill remotely but the target Rig is unreachable before execution begins (for example, when working offline on a flight), the Shim automatically falls back to your local binary instead of failing your workflow.
- Forbidden system commands:
offrig shim installrefuses to shadowoffrig,offrigd,sh,ssh, andgit. - Non-destructive removal:
offrig shim removeonly deletes files bearing the managed# offrig-shimheader and never touches unrelated binaries.