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 therqb 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 throughrqb, 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.mdormad.md; it does not need to be namedapi-docs. - Endpoint specs inside that collection with
method:andpath:frontmatter showRun Endpoint. - Flow and pipeline specs under
<collection>/flows/or<collection>/pipelines/showRun Flow. - Non-runnable collection docs such as
<collection>/reqbook.md,<collection>/mad.md,README.md, and_shared/env.mddo not show Run controls.
Variable autocomplete
The extension suggests variables while editing{{variable}} templates and path params. Suggestions are collected from:
<collection>/_shared/env.md.env.local:pathParamvalues in the current specCapture: ... as <name>directives in<collection>/flows/and<collection>/pipelines/
Settings
Example workspace setting:
Development install
The extension source lives inpackages/vscode/.
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
publisherfield inpackages/vscode/package.json. - Run
npm ci,npm test,npm run check, andnpm run packagefrompackages/vscode/. - Install the generated VSIX and smoke test preview, run, validate, context, variable autocomplete, and a missing-
rqbfailure. - Confirm the released
rqbbinary version matches the extension docs. - Keep generated
.vsixfiles and Marketplace tokens out of git.
When to use each surface
The same markdown files power every surface.