motor / interlock 17 clones. Gauss counts each amp clone since Dec 1, 2026. It doesn't count pulls, or clones by an older Amp.
37 downloads. Gauss counts each artifact file download since Dec 2, 2026.
Give your agent this prompt to install Amp and clone this repository:
Install Amp by running `curl -fsSL https://gauss.motor.dev/motor/amp/artifacts/install.sh | sh`, run `amp learn` to learn how it works, then clone https://gauss.motor.dev/motor/interlock with `amp clone`. Copy Or install motor and get Gauss repositories, Piston remote compute, and Amp version control all in one tool. Sign up and give your agent this prompt:
Install the Motor CLI (which installs Amp too) by running `curl -fsSL https://gauss.motor.dev/motor/cli/artifacts/install.sh | sh`, sign me in with `motor auth`, run `motor learn` and `amp learn`, then clone https://gauss.motor.dev/motor/interlock with `amp clone`. Copy
interlock is a local Go CLI that decides whether a shell command is safe to run automatically or needs human approval.
It parses the command into a shell-agnostic IR (expanding variables, paths, symlinks, local scripts, and common obfuscations), scores it with an embedded 16.9M-parameter INT8 ModernBERT classifier (ettin-encoder-17m), and applies a deterministic policy engine with profiles and allow/deny rules. Everything ships inside a single static Go binary (~22 MB, CGO_ENABLED=0) and runs on CPU in ~8–16 ms per command (including cold startup).
Prebuilt binary (macOS / Linux):
curl -fsSL https://gauss.motor.dev/motor/interlock/artifacts/install.sh | sh Or with Go 1.26+:
go install gauss.motor.dev/motor/interlock@latest Or from a local checkout:
./scripts/install.sh Prebuilt static binaries (darwin-arm64, darwin-amd64, linux-amd64, linux-arm64, windows-amd64) are built by Piston on every landing to main and published under monotonic YYYY_MM_NNNN Gauss artifact versions (motor gauss artifact list motor/interlock), with a matching v0.YYYYMM.N Go module tag pushed automatically for go install ...@latest.
shell command + context | v +---------------------------------------------+ | 1. Parse and expand | | Resolve vars, paths, and obfuscation | +----------------------+----------------------+ | v +---------------------------------------------+ | 2. Score risks (local ML model) | | Rate file, network, and system danger | +----------------------+----------------------+ | v +---------------------------------------------+ | 3. Apply policy | | Check profile, rules, and confidence | +----------------------+----------------------+ | +-------------+-------------+ | | v v +-----------------+ +-----------------+ | safe | | blocked | | allow / run | | approve or deny | +-----------------+ +-----------------+ Usage
Classifies a command and prints a JSON (or --format text) report. Exit codes:
3: denied by explicit rule
interlock check --format text -- "rm -rf /etc/hosts" interlock check --profile read-only -- "touch ./out.txt" interlock check --rules .interlock.rules --audit-log session.jsonl -- "git push origin feat/ui" interlock run
Takes the same flags as check. If the command is safe, runs it in the configured shell, directory, and environment and returns the child's exit code. If blocked, refuses to run, writes the report to stderr, and exits with 120 (needs approval) or 121 (denied) so blocked decisions do not collide with normal command exit codes.
interlock run --cwd /work/app --workspace /work/app --no-inherit-env --env PATH=/usr/bin:/bin -- "go test ./..." interlock is a guardrail, not a sandbox. Static inspection and ML scoring catch common mistakes and hazards, but no classifier is perfect, and commands can still behave unexpectedly at runtime (for example, if a file changes or a script fetches new code). Pair interlock run with real isolation like containers, VMs, or scoped credentials whenever you run untrusted commands.
Passing explicit subagent context (--stdin-json)
When an agent runs commands in isolated subshells or worktrees, pass the context directly over stdin. Supplying "env" defaults inherit_env to false so ambient host variables do not leak in.
interlock check --stdin-json , --no-inherit-env, --fs-root , and --no-fs.
interlock explain --format text -- "cd /etc && rm -f ./hosts" interlock audit session.jsonl interlock test-rules --rules .interlock.rules cases.json interlock update # self-update from Gauss artifacts (use --check to preview) interlock version What the frontend inspects
Shells: Bash, Zsh, POSIX sh, Fish, PowerShell, cmd.exe, plus a best-effort fallback tokenizer for other shells.
Expansion: cd/pushd threading (with subshell isolation), variable expansion ($VAR, ${VAR:-default}, %VAR%, $env:VAR), path canonicalization (~, .., symlink resolution, symlink-escape detection).
Local scripts & task runners: recursive inspection of ./script, sh/source (with positional arg binding, cycle/size limits), Makefile, package.json, justfile, Taskfile.yml, lightweight capability scanning for .py/.js/.rb/.pl scripts, and SHA-256 hashing of opaque local binaries.
Obfuscation & resource bombs: static decoding of Base64/Base32 (including file-backed base64 -D < file | sh), hex (xxd -r -p, \xHH), octal (\OOO), ANSI-C $'...', rev, ROT13 tr, quote/backslash splitting, and PowerShell -EncodedCommand; call-graph cycle detection for fork bombs (:(){ :|:& };:, renamed or mutually recursive functions, %0|%0, infinite background loops).
Audit log: --audit-log (or INTERLOCK_AUDIT_LOG) appends locked JSONL entries (0600) with sensitive env values (*KEY*, *TOKEN*, *SECRET*, *PASS*, *AUTH*, etc.) redacted.
Built-in profiles (--profile):
Rules files (.interlock.rules) are evaluated post-expansion. deny always beats allow, and every sub-command and risk label in a compound command (A && B) must be allowed independently.
profile "read-write-delete" confidence_threshold 0.85 allow cmd "git push origin feat/*" allow cmd "go test ./..." deny cmd "rm -rf /**" allow fs_write_outside_workspace, fs_destructive_outside on "/dangerous/**" deny secret_access on "**/.env*" allow network_download where host "*.github.com" allow opaque_or_dynamic_exec on "/work/repo/bin/codegen" sha256=" " Benchmarks
F1: harmonic mean of precision and recall (2 * precision * recall / (precision + recall), scored 0 to 1, higher is better). Precision is how often flagged commands are actually risky; recall is what fraction of real risks get caught. A high F1 requires both catching real risks and not crying wolf on safe commands.
Macro-F1: average F1 score across all 16 individual risk labels, weighted equally so rare labels count as much as common ones. Measures how accurately the model explains why a command is risky.
Any-Risk F1: binary F1 score on whether a command has any risk label vs. being completely safe.
Danger FNR (False Negative Rate): fraction of genuinely risky commands missed (0.0000 means none were missed; lower is safer).
Policy Benign FPR (False Positive Rate under read-write-delete): fraction of safe commands that unnecessarily asked for human approval (lower means less friction).
Latency: average per-command CPU time in milliseconds (pure Go, no GPU, no CGo). Embedded model loading takes ~0.3 ms (zero-copy binary weights and BPE table), so cold single-shot interlock check invocations typically report ~8–16 ms.
235-case held-out real-world & adversarial suite (eval_real)
214-case blind unseen-tools OOD suite (eval_ood, zero overlap with datagen)
Tests tools and flags intentionally excluded from synthetic training templates (eza, dust, tokei, jj, hg, pulumi, fly, wrangler, rclone, http/xh, socat, ngrok, mongosh, redis-cli, duckdb, diskutil, fdisk, nsenter, vault, op, certutil, schtasks, etc.).
Datasets are generated from the proptest (pgregory.net/rapid) simulated environment harness in cmd/datagen and trained in train/:
go run ./cmd/datagen --train 60000 --val 5000 --cal 5000 --seed 200 --out /tmp/interlock-data python -m train.finetune_ettin --base-model jhu-clsp/ettin-encoder-17m \ --train /tmp/interlock-data/train.jsonl --val /tmp/interlock-data/val.jsonl \ --eval-real /tmp/interlock-data/eval_real.jsonl --eval-ood /tmp/interlock-data/eval_ood.jsonl \ --out /tmp/run/ettin17m.pt python -m train.export_ettin --checkpoint /tmp/run/ettin17m.pt \ --cal /tmp/interlock-data/cal.jsonl \ --eval-real /tmp/interlock-data/eval_real.jsonl --eval-ood /tmp/interlock-data/eval_ood.jsonl \ --out internal/model/embedded/interlock-ettin-17m-v2.ilkm License
MIT. See LICENSE. The embedded classifier weights are fine-tuned from jhu-clsp/ettin-encoder-17m (MIT).




