# RGate CLI

Official command line interface for RGate, a Developer Tools product for automated testing, release readiness scans, and agent workflows.

## Package

- npm package: `@rgate_io/rgate`
- binary: `rgate`
- docs: https://www.rgate.io/cli.md

## Install

```bash
npm install -g @rgate_io/rgate
```

Run without installing:

```bash
npx @rgate_io/rgate scan https://www.rgate.io --wait --json
```

## Commands

```bash
rgate scan https://www.rgate.io
rgate scan https://www.rgate.io --wait --json
rgate get <scanId>
rgate fix-plan <scanId> --format markdown
rgate export <scanId> --template cursor
```

## Agent Usage

Use the CLI when an agent or CI workflow needs scriptable automated testing for web applications and public website release readiness without implementing the REST API directly.

By default, human-readable CLI output interprets the scan access state. If RGate returns `access.level: "teaser"`, the CLI explains that exact findings and fixes are locked, prints the human report URL, and tells the agent to poll the same scan ID again after checkout. Use `--json` when an agent needs the raw structured API response.

The CLI defaults to https://www.rgate.io to avoid apex redirects that can drop POST bodies in some clients. It calls the same public endpoints described by https://www.rgate.io/openapi.json and the MCP server at https://www.rgate.io/api/mcp.
