Preview
The RapiDoc Portal packages are not on npm yet. Until they are, run the CLI from a checkout of the RapiDoc monorepo: node <monorepo>/packages/rapidoc-cli/src/index.js <command> instead of npx rapidoc <command>.
Prerequisites
Section titled “Prerequisites”- Node.js 22.12 or later
- One or more OpenAPI 3.0, 3.1 or Swagger 2.0 files (optional: the starter includes one)
Create a portal
Section titled “Create a portal”Scaffold the project
npm create rapidoc@latest my-portalIn a repository that already has OpenAPI files, run
npx rapidoc initthere instead. It finds the specs and asks which to list underapis:, the site title, and whether to install the dependencies, then prints the command that does the same without questions. Options:--title "Acme Developers",--spec <file>(repeatable),--no-install,--forceto overwrite existing files, and--yesto take the defaults without asking.Start the dev server
cd my-portalnpm run devThe portal opens on
http://localhost:4321. Guide edits appear immediately; a change torapidoc.config.yamlor a spec restarts the server.Make it yours
Edit
rapidoc.config.yaml: the site title and logo, the theme color, the header tabs and the sidebar. Write guides indocs/. See Configuration and Writing guides.Build for production
npm run buildThe static site is written to
dist/. Upload it to any static host: see Static hosting.
What the starter contains
Section titled “What the starter contains”my-portal/├── rapidoc.config.yaml # site, header, tabs, theme, APIs├── package.json # dev, build and validate scripts├── specs/api.yaml # a starter spec (or your own specs)├── docs/│ ├── index.markdoc # the home page│ ├── getting-started.md│ └── guides/overview.markdoc└── .gitignore # node_modules/, dist/, .rapidoc-temp/Read on in Project structure.
Check your specs in CI
Section titled “Check your specs in CI”npx rapidoc validateIt checks every local spec in apis: against the OpenAPI schema and exits with code 1 on an error. See Validate.