CLI reference

Workspace and host commands.

Workspace: agentgate

Runs inside the agent workspace. No GitHub token needed. AGENTGATE_URL defaults to http://agentd:7432.

agentgate doctor
agentgate renew
agentgate pr list [--repo OWNER/REPO] [--state open|closed|all] [--page N] [--per-page N]
agentgate pr view NUMBER [--repo OWNER/REPO]
agentgate pr create --title TITLE --base BRANCH [--head BRANCH] [--body-file FILE] [--ready] [--upstream OWNER/REPO] [--repo OWNER/REPO]
agentgate pr comment NUMBER --body-file FILE [--repo OWNER/REPO]
agentgate pr review NUMBER --body-file FILE [--repo OWNER/REPO]
agentgate pr merge NUMBER --sha HEAD_SHA [--method squash|merge|rebase] [--repo OWNER/REPO]
agentgate ci list [--repo OWNER/REPO] [--branch BRANCH] [--page N] [--per-page N]
agentgate ci view RUN_ID [--repo OWNER/REPO]
agentgate ci jobs RUN_ID [--repo OWNER/REPO] [--page N] [--per-page N]
agentgate ci logs JOB_ID [--repo OWNER/REPO] [--output FILE] [--force]
CommandNotes
doctorChecks Git/LFS, commit identity, and broker connectivity. Doesn't prove App permissions.
renewRe-runs workspace setup so Git sends a renewed runtime assertion.
pr createDrafts unless --ready. --upstream opens a fork PR.
pr reviewAlways a COMMENT review.
pr mergeNeeds human approval and the full 40-character head SHA. Defaults to squash.
ci logsPlain text. --output writes mode 0600 and refuses to overwrite without --force.

agentgate-egress-check validates host isolation — see Docker workspace.

Host: npm scripts

Run on the trusted host, never in the workspace.

ScriptPurpose
npm startStart agentd
npm run approvalsList approvals (pending, superseded)
npm run approve -- <id>Approve (full ID or ≥8-char prefix)
npm run deny -- <id>Deny
npm run approval-webStart the approval web UI
npm run audit:verify [dir]Verify the audit hash chain
npm run audit:forwardShip audit records off-host
npm run demoCredential-free demo
npm testUnit and real-Git integration tests
npm run test:fuzzProtocol fuzzing
npm run test:dockerContainer smoke test
npm run test:liveLive GitHub App smoke test

Host: scripts

ScriptPurpose
scripts/issue-runtime.jsMint an Ed25519 runtime assertion
scripts/sign-bundle.jsSign a policy or revocation bundle
scripts/detect.jsRun SIEM detections over audit records
scripts/make-dev-cert.shDevelopment CA and broker certificate