Packages
RapiDoc is a family of packages. Most sites need only the first one, rapidoc, which is a browser bundle you load with a <script> tag. The others are Node packages for build steps, local tooling and full developer portals.
In the browser
Section titled “In the browser”rapidoc has no runtime dependencies: everything it needs is bundled into its JavaScript files.
| Import | Elements | What it is for |
|---|---|---|
rapidoc (dist/rapidoc-min.js) |
<rapi-doc> |
The full interactive API reference: navigation, search, schemas, Try, authentication, in-browser mocking and MCP export. |
<rapi-doc-mini> |
One endpoint or a few, embedded in a blog post, tutorial or changelog. | |
<oauth-receiver> |
The OAuth 2.0 callback page that hands the authorization code back to <rapi-doc>. |
|
rapidoc/flow (dist/rapidoc-flow-min.js) |
<rapi-flow> |
Arazzo workflows drawn as a diagram and run in the browser. A separate bundle, so pages without workflows don’t download it. |
npm install rapidocIn Node
Section titled “In Node”| Package | What it is for |
|---|---|
@rapidoc/cli |
The rapidoc command: preview, validate, lint and bundle a spec, run a mock server, turn a spec into an MCP server, and build and serve developer portals. |
@rapidoc/mock |
The mock server behind rapidoc mock: answers every operation over HTTP from examples or generated data, validates requests and checks OAuth tokens. Also usable as a library. |
@rapidoc/mcp |
Turns OpenAPI and Arazzo documents into MCP tools: manifest builder, runtime and server project writer. The same code <rapi-doc> uses in the browser. |
@rapidoc/embed |
The shared core of integrations (plugins and middleware for frameworks, docs sites and tools): renders the standard host page for <rapi-doc> and lists the routes to serve. See Build an Integration. |
@rapidoc/hono |
Serves the API reference from a Hono app: app.use(rapidoc({ specUrl })). See Server frameworks. |
@rapidoc/express, @rapidoc/fastify |
The same for Express and Fastify apps. See Server frameworks. |
@rapidoc/vitepress |
Adds API reference pages to a VitePress site, in its theme and sidebar. See Documentation sites. |
@rapidoc/docusaurus |
Adds API reference pages to a Docusaurus site, in its theme and sidebar. See Documentation sites. |
@rapidoc/starlight |
Adds API reference pages to a Starlight site, in its layout and sidebar. See Documentation sites. |
@rapidoc/prerender |
Renders <rapi-doc> to HTML at build time (Declarative Shadow DOM or light DOM), plus a static sidebar and Arazzo diagrams as SVG. Good for SEO and first paint. See the pre-rendering guide. |
Developer portals
Section titled “Developer portals”A developer portal puts your API references next to Markdown guides, with search, navigation and optional single sign-on (SSO) through Okta, Microsoft Entra ID or any OpenID Connect provider. These packages are documented in the RapiDoc Portal docs; for private portals, see SSO and access.
| Package | What it is for |
|---|---|
create-rapidoc |
Scaffolds a new portal: npm create rapidoc. rapidoc init does the same. |
@rapidoc/portal |
The portal engine behind rapidoc dev and rapidoc build: OpenAPI specs and Markdown, MDX or Markdoc guides in, a static site out. |
@rapidoc/server |
Serves a built portal with single sign-on (OpenID Connect) and per-page access rules (rapidoc serve). |
Which do I need?
Section titled “Which do I need?”- An API reference on a page you already have:
rapidoc. Start with the Quickstart. - A mock API your frontend or tests can call:
@rapidoc/cliand@rapidoc/mock. - An MCP server for AI agents: the Export button in
<rapi-doc>,rapidoc mcp, or@rapidoc/mcpin your own code. - Static HTML of your reference at build time:
@rapidoc/prerender. - An API reference served by your Hono app:
@rapidoc/hono. - An API reference inside your Starlight docs:
@rapidoc/starlight. - A RapiDoc plugin for another framework or tool:
@rapidoc/embed. - A whole developer portal:
create-rapidoc, which installs@rapidoc/cliand@rapidoc/portal.