Skip to main content

VS Code extension

The Reqbook VS Code extension is the in-editor bridge for teams that write API specs directly in a Reqbook collection. It keeps the workflow narrow: edit markdown in VS Code, call the rqb binary for validation and execution, and keep the browser UI available for larger visual workflows.
The extension requires the rqb binary. It auto-detects rqb from RQB_PATH, workspace build outputs, Cargo, Homebrew, and PATH. Use reqbook.rqbPath only when you need an explicit override.

Demo

The demo shows a runnable endpoint in VS Code with inline CodeLens actions, direct execution through rqb, and the structured result panel.
To publish the optimized Cloudflare Stream version, set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN, then run node scripts/upload-cloudflare-stream-video.mjs docs/assets/vscode-demo.mp4 "Reqbook VS Code demo". Stream returns a player iframe, not an MP4 source, so replace the <video> block above with the returned mdx_embed after the upload is ready.

Commands

Open an endpoint or flow markdown file, then run these commands from the Command Palette or editor context menu: The result panel shows endpoint status, duration, request URL, response diff, structured assertions, flow steps, captures, and raw command output.

Auto-detect run buttons

The extension detects runnable Reqbook files and shows Run controls only for those files:
  • The collection root is the nearest parent directory with reqbook.md or mad.md; it does not need to be named api-docs.
  • Endpoint specs inside that collection with method: and path: frontmatter show Run Endpoint.
  • Flow and pipeline specs under <collection>/flows/ or <collection>/pipelines/ show Run Flow.
  • Non-runnable collection docs such as <collection>/reqbook.md, <collection>/mad.md, README.md, and _shared/env.md do not show Run controls.
Runnable files get both an inline CodeLens button at the top of the editor and a Run button in the editor title bar.

Variable autocomplete

The extension suggests variables while editing {{variable}} templates and path params. Suggestions are collected from:
  • <collection>/_shared/env.md
  • .env.local
  • :pathParam values in the current spec
  • Capture: ... as <name> directives in <collection>/flows/ and <collection>/pipelines/
This keeps authoring fast without adding a separate project config format.

Settings

Example workspace setting:

Development install

The extension source lives in packages/vscode/.
Install a pre-release VSIX with:
For local development, open the repository in VS Code, open packages/vscode/extension.js, and run the extension in an Extension Development Host. The extension has no runtime npm dependencies.

Release checklist

Before publishing to the Visual Studio Marketplace:
  • Confirm the Marketplace publisher matches the publisher field in packages/vscode/package.json.
  • Run npm ci, npm test, npm run check, and npm run package from packages/vscode/.
  • Install the generated VSIX and smoke test preview, run, validate, context, variable autocomplete, and a missing-rqb failure.
  • Confirm the released rqb binary version matches the extension docs.
  • Keep generated .vsix files and Marketplace tokens out of git.

When to use each surface

The same markdown files power every surface.