Documentation
Open App

CLI Scanner

The Requexa CLI scans your Next.js App Router project and produces a manifest of every endpoint — methods, paths, query params, body shapes, and auth types. No configuration needed.

Installation

No install required. Use npx to always run the latest version:

Terminal
npx requexa --version

Or install globally if you prefer:

Terminal
npm install -g requexa
# or
pnpm add -g requexa

Scanning a Project

Run the scan command from the root of your Next.js project:

Terminal
# Scan current directory
npx requexa scan ./

# Scan a specific path
npx requexa scan ./my-nextjs-app

The CLI walks your app/ or src/app/ directory, finds every route.ts and route.js file, and analyses each one with TypeScript AST parsing.

Info
Your project does not need to be running. The CLI reads source files — it does not make HTTP requests or start a server.

Understanding the Output

The CLI prints a summary table to your terminal and writes requexa.manifest.json to the scanned directory:

Terminal output example
✔ Discovered 8 route files
✔ Parsed 22 endpoints
✔ Wrote requexa.manifest.json

METHOD  PATH                        PARAMS        AUTH
GET     /api/users                  page, limit   Bearer
POST    /api/users                  -             Bearer
GET     /api/users/:id              -             Bearer
PUT     /api/users/:id              -             Bearer
DELETE  /api/users/:id              -             Bearer
GET     /api/posts                  cursor, tag   -
POST    /api/posts                  -             Bearer
GET     /api/posts/:slug            -             -

Each endpoint entry includes:

FieldDescription
methodHTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
pathRoute path with :param notation for dynamic segments
params.pathPath parameters extracted from the route pattern
params.queryQuery parameters detected from searchParams.get() calls
bodyBody fields detected from Zod schemas or destructured req.json()
authAuth pattern detected (Bearer, Basic, API Key, session)
confidencehigh | medium | low — how certain the extractor is

The manifest file is plain JSON and can be committed to your repository or generated on every deploy in CI.

Uploading Your Manifest

After scanning, upload the manifest to your Requexa workspace using your API key:

Terminal
curl -X POST "https://app.requexa.com/api/manifests?workspace=YOUR_WORKSPACE_SLUG" \
  -H "Content-Type: application/json" \
  -H "x-api-key: rqx_YOUR_API_KEY" \
  --data-binary @requexa.manifest.json

Replace YOUR_WORKSPACE_SLUG with your workspace slug (shown in the sidebar) and rqx_YOUR_API_KEY with your API key from the Settings panel.

Tip
Upload rate limit is 10 times per hour per workspace. Uploads from CI on every commit are fine — just avoid hammering it in a tight loop.

You can also automate this in CI. Example GitHub Actions step:

.github/workflows/requexa.yml
- name: Scan and upload API manifest
  run: |
    npx requexa scan ./
    curl -X POST "$REQUEXA_URL/api/manifests?workspace=$REQUEXA_WORKSPACE" \
      -H "Content-Type: application/json" \
      -H "x-api-key: $REQUEXA_API_KEY" \
      --data-binary @requexa.manifest.json
  env:
    REQUEXA_URL: https://app.requexa.com
    REQUEXA_WORKSPACE: ${{ secrets.REQUEXA_WORKSPACE }}
    REQUEXA_API_KEY: ${{ secrets.REQUEXA_API_KEY }}

Getting Your API Key

Your API key is available in the Requexa web app. Open the Settings panel from the bottom of the sidebar. Your key is shown there and can be copied or rotated.

  • Keys start with rqx_ for easy identification
  • Rotating a key immediately invalidates the old one — update your CI secrets afterward
  • Never commit your API key to version control — use environment variables or secret managers
Warning
Your API key is shown once on account creation and is always available in Settings. Keep it secret — anyone with your key can upload manifests to your workspace.