rrotor

CLIs

A CLI is a kind of program: a pinned command-line tool installed into your rrotor and run one command at a time in the sandbox, so Claude can use it without touching your machine.

The manifest

Same repo, deploy, sandbox, vault, egress proxy, approvals, limits and audit as a program, with no program.py, functions, schedules or databases: "kind": "cli" and a cli block instead.

{
  "name": "github",
  "kind": "cli",
  "description": "GitHub's gh",
  "cli": {
    "install": { "url": "https://github.com/cli/cli/releases/download/v2.62.0/gh_2.62.0_linux_amd64.tar.gz", "sha256": "<its 64-hex checksum>" },
    "command": "gh",
    "allow": ["pr *", "issue *", "repo view *", "api repos/*"],
    "approvals": ["pr merge *", "pr close *", "issue close *"],
    "env": { "GH_TOKEN": "secret:GH_TOKEN", "GH_PROMPT_DISABLED": "1" },
    "home": true
  },
  "hosts": ["api.github.com", "github.com"],
  "secrets": ["GH_TOKEN"],
  "limits": { "seconds": 120, "memory_mb": 512 }
}
installOne source, pinned, with the sha256 of what is downloaded (below)
commandWhat runs: a path or a name in the install, npm’s bin, PyPI’s console script, or the image’s binary. There is no shell
allowGlob patterns over the joined arguments; none means any arguments
approvalsPatterns whose commands wait for the person first
envThe process’s environment; secret:NAME takes a declared secret from the vault
hometrue: a private HOME kept across calls (the tool’s config, a login it keeps); otherwise the run’s own /tmp
interactiveOnly false: interactive sessions are not built yet (true is refused, E_MANIFEST)

Install sources

SourceWriteHosts the install also reaches
A release asset{"url": "https://…", "sha256": "…"}The URL’s own host; for github.com also objects.githubusercontent.com and release-assets.githubusercontent.com
npm{"npm": "name@1.2.3", "sha256": "…"}registry.npmjs.org
PyPI{"pypi": "name==1.2.3", "sha256": "…"}pypi.org and files.pythonhosted.org
The image{"image": "git"}None: nothing is downloaded, and no checksum is needed
  • The manifest’s hosts are allowed too. Every redirect is checked against the same list, HTTPS on 443 to public addresses only, 512 MB at most (E_CLI_INSTALL otherwise).
  • The SHA-256 is checked before anything is unpacked (E_CLI_CHECKSUM, naming the one it got). No code of the CLI runs at install. Get the real checksum from the release’s published checksums or PyPI’s files page.
  • url: a tarball, a zip or a bare binary; pick the Linux build for the runtime’s architecture.
  • npm: an exact version, run with the image’s node. No install scripts run and no dependency is fetched: a package whose dependencies are not all bundled is refused.
  • pypi: an exact version whose wheel the runtime can import (py3-none-any, or CPython 3.13 on Linux); its dependencies come from a hashed requirements.lock beside glyphh.json.
  • A new version is a new deploy, and rolls back like any program.

cli_run

cli_run {"cli": "github", "args": ["pr", "list", "--state", "open"]}
→ {"run_id": "…", "status": "done",
   "data": {"exit_code": 0, "stdout": "…", "stderr": "", "stdout_bytes": 412, "stderr_bytes": 0,
            "truncated": false, "files": {}, "files_skipped": []}}
  • Takes {cli, args, stdin?, files?} (REST: POST /v1/clis/{name}/run). files are written to a fresh working folder for the call, the command’s current folder; the files the command makes or changes there come back in files.
  • A nonzero exit is still done, with its exit_code. stdout and stderr each come back up to their first 64 KB; all of each goes to the run’s log.
  • Every call is a run: run_status, run_log (the command line, secrets masked) and the audit log. program_call on a CLI is refused E_NOT_PROGRAM, cli_run on a program E_NOT_CLI.

Allow and approval patterns

  • The arguments are joined as a shell would quote them and matched against the patterns. With allow set, one must match, or the call is refused 403 E_CLI_DENIED (an audit event, never a run).
  • A pattern matches the whole line, so a trailing * also takes further flags: api repos/x -X DELETE matches api repos/*. Write narrower patterns for what must not pass.
  • A command matching approvals waits with needs_approval at step cli, the command line in its prompt. program_continue with {"approved": true} runs it; false ends it E_CLI_DECLINED. It expires after 15 minutes.

Secrets as environment

"GH_TOKEN": "secret:GH_TOKEN" passes a declared secret from the vault (set it with secret_set, as for a program). It is never written to disk, and its value is masked as [secret] in the run’s log, its Result and the audit log. PATH, HOME, TMPDIR, LANG, the proxy variables and any LD_* are rrotor’s and cannot be set.

Limits

ArgumentsAt most 256, of 8,192 characters each
stdinUp to 1 MB of text
filesUp to 64 files of 1 MB each, in and out; past that, out ones are only named in files_skipped
Time and memoryThe manifest’s limits.seconds (past it, E_LIMIT_SECONDS) and limits.memory_mb, per process
Install512 MB downloaded, 1 GB unpacked
  • A CLI’s run executes only the system, its install and its venv: nothing it may write (its working folder, /tmp, its HOME).
  • Not enforced by rrotor: what the command itself does with the arguments it was allowed. A pattern is only as narrow as it is written.
  • One-shot commands only: interactive sessions are not built yet.

The glyphh command as a CLI

{
  "name": "glyphh",
  "kind": "cli",
  "cli": {
    "install": { "pypi": "glyphh==<version>", "sha256": "<the wheel's>" },
    "command": "glyphh",
    "env": { "GLYPHH_API_KEY": "secret:GLYPHH_API_KEY" },
    "home": true
  },
  "hosts": ["ada.glyphh.ai", "platform.glyphh.ai"],
  "secrets": ["GLYPHH_API_KEY"],
  "limits": { "seconds": 120, "memory_mb": 256 }
}

Claude then calls Ada Cloud through the glyphh command in the sandbox, its API key kept in the runtime’s vault.