> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markapidown.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Reqbook CLI for API Testing

> Run Reqbook from the terminal to validate, execute, flow-test, import, and package markdown API specs for coding agents.

## What is rqb-cli?

**rqb-cli** is the terminal interface to Reqbook. Every capability is accessible as a subcommand.

Use it for:

* Scripted API testing and CI/CD pipelines
* Importing and validating specs
* Running ad-hoc HTTP requests from the terminal
* AI agent tool integration via MCP

## Commands

| Command | What it does |
| - | - |
| `rqb init` | Scaffold a new collection in the current project |
| `rqb request <METHOD> <URL>` | Send an ad-hoc HTTP request |
| `rqb exec <file>` | Execute one endpoint spec |
| `rqb diagnose <file>` | Diagnose a failed endpoint with likely cause and next action |
| `rqb flow <file>` | Run a multi-step pipeline, or inspect resolved step requests with `--dry-run` |
| `rqb validate <path>` | Validate endpoint or pipeline files |
| `rqb check <path>` | Run PR-focused contract checks and reports |
| `rqb context <target>` | Print bounded executable API context for coding agents |
| `rqb agent pack <target>` | Write an agent-ready context pack with guardrails and verify commands |
| `rqb import postman\|insomnia\|openapi\|collection\|http\|curl` | Import from another tool or local collection format |
| `rqb export openapi <path>` | Export markdown endpoint specs as OpenAPI |
| `rqb serve` | Launch rqb-ui in a browser |
| `rqb mock` | Start a mock HTTP server |
| `rqb mcp` | Start MCP server for AI agent integration |
| `rqb doctor` | Diagnose project setup |

## Same binary two interfaces

```
rqb serve → opens rqb-ui in your browser
rqb exec → runs in the terminal (rqb-cli)
```

Both ship in one binary. There is no separate installation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.