CLICLItypeA command you run, rather than a dependency you import.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

@saptools/cf-request-runner

Discovers every API endpoint of a CAP service already deployed to Cloud Foundry by walking its service documents, $metadata and endpoints catalog — falling back to container SSH to parse .cds files.

Answers "what can I actually call on this deployment" from the outside, with deep entity expansion, rather than from documentation that may not match what was deployed.

Facts

Latestv0.3.0ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
DebuggingCAPDebuggingcapabilitySeeing what running code did between an input arriving and a result coming out: which code ran, what the values were at each point, and why a value ended up as it did.
Flavors
Node.jsJavafrom its runtime
Runs
Cloud Foundry

Who is behind it

Đông TrầnĐông TrầnPersonMaintains this
In the atlas: maintains 18, contributes to 18
@dongitran
maintainer

What it declares

Every artifact

Type
CLI
Origin
Independently maintained
Runtime
build time
Runs on
Cloud Foundry

As a CLI

Distributed through
npm

Connections1

@saptools/cf-request-runner connections@saptools/cf-request-runnerPROVIDES→ provides1provides authoredDebugging

Install

npm add @saptools/cf-request-runner

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from dongitran/saptools under MIT, read
dongitran/saptools/packages/cf-request-runner/README.mdOn GitHub

🏃 @saptools/cf-request-runner

Auto-discover all API endpoints of an SAP CAP CDS service deployed on Cloud Foundry.

Automatically walk your remote CAP service documents, OData $metadata, and endpoints catalog, perform deep entity expansion, and safely fall back to container SSH to parse .cds files — no more guessing routes or reading manual documentation.

npm version license node types

Install • Quick Start • CLI • FAQ


✨ Features

  • 🌍 Root Endpoint Discovery — fetches root service documents and catalogs from a deployed CAP service dynamically.
  • 🟢 Deep Entity Discovery — reads OData $metadata before falling back to service documents to infer entity and operation endpoints.
  • ⚡ CF SSH Fallback — if runtime requests are blocked or hidden, falls back to cf ssh to run a headless script parsing .cds definitions.
  • 🧭 Zero Configuration — seamlessly integrates with your active Cloud Foundry CLI (cf target) session. No complex credential management required.
  • 🗄️ Programmatic API — exports fully typed methods for deep integrations in other Node.js apps.
  • 📋 Copy-Ready Curl — emits ready-to-run curl commands for each endpoint/method with the resolved bearer token already injected.
  • 🧪 Interactive Runner — select an endpoint and method, enter JSON for write requests, and print the formatted response from the CLI.
  • 🧠 Smart Fallbacks — safely handles missing cf CLI sessions, invalid tokens, or restricted network environments.

📦 Install

npm install -g @saptools/cf-request-runner

Note

Requires Node.js ≥ 20 and the official cf CLI installed and targeted to a space.


Updates

Every command first checks npm for a newer @saptools/cf-request-runner (at most once an hour, one small request with a 2-second timeout) and, when one exists, installs that exact version with the package manager that owns the running binary and re-runs the command you typed on the new version. Both steps are announced on stderr; nothing is printed when the install is already current:

cf-request-runner: updating 0.3.0 -> 0.4.0 ...
cf-request-runner: updated to 0.4.0; re-running the command

If the install cannot complete, one stderr line gives the manual command and the command runs on the installed version; that version is not retried for a day. This CLI is a single command with required options, so it has no self-update subcommand; run npm install -g @saptools/cf-request-runner@latest to update by hand.

ControlEffect
SAPTOOLS_AUTO_UPDATE=on|notify|offon (default) installs and re-runs; notify prints the manual command once per version; off never checks. Applies to every @saptools CLI.
CF_REQUEST_RUNNER_AUTO_UPDATEsame values, this CLI only; wins over the global variable
SAPTOOLS_UPDATE_INTERVAL_MINUTESminutes between checks (default 60; 0 checks on every run)
SAPTOOLS_NPM_REGISTRYregistry to check and install from (default: npm's configured registry, then npmjs)
SAPTOOLS_UPDATE_DEBUG=1explain on stderr why nothing happened

The updater switches itself off in CI (CI set), under NODE_ENV=test or NO_UPDATE_NOTIFIER, when the binary runs from a source checkout, an npm link or an npx cache, and inside the re-run itself. It never writes to stdout, never asks for input, never uses sudo, and never moves onto a prerelease. Its state lives in ~/.saptools/updates/.

🚀 Quick Start

# 1. Target your CF space
cf target -o my-org -s dev

# 2. Run the request runner discovery
cf-request-runner --app my-cap-app --url https://my-cap-app.cfapps.us10.hana.ondemand.com

# 3. Output as JSON for programmatic consumption
cf-request-runner -a my-cap-app -u https://... --json | jq '.'

# 4. Generate copy-ready curl commands
cf-request-runner -a my-cap-app -u https://... --curl

# 5. Run an endpoint interactively
cf-request-runner -a my-cap-app -u https://... --interactive

🧰 CLI

cf-request-runner

Executes the endpoint discovery script on a running application.

cf-request-runner --app <appId> --url <baseUrl>
FlagShorthandDescriptionRequired
--app <name>-aCloud Foundry application name.Yes
--url <baseUrl>-uBase URL of the deployed application.Yes
--cf-home <dir>Custom CF_HOME directory if using an isolated CF session.No
--token <bearerToken>Bearer token override. Prefer CF_REQUEST_RUNNER_TOKEN for sensitive tokens.No
--jsonOutput the results in strict JSON format.No
--out <filePath>Save JSON output to a specific file. Missing parent directories are created automatically.No
--curlOutput copy-ready curl commands for every discovered endpoint and method. Includes the resolved bearer token when available.No
--interactive-iSelect and execute a discovered endpoint from the CLI. Prompts for JSON payloads on write methods.No
--help-hDisplay help for command.No
Copy and run requests

Generate curl commands for all discovered endpoint/method combinations:

cf-request-runner -a my-cap-app -u https://my-cap-app.example.com --curl

Warning

--curl intentionally includes the resolved bearer token in the Authorization header so commands are immediately runnable. Treat this output as sensitive and avoid pasting it into logs or chat.

Run a request interactively from the CLI:

cf-request-runner -a my-cap-app -u https://my-cap-app.example.com --interactive

Interactive mode prompts for an endpoint, a supported method, and a JSON payload for POST, PUT, and PATCH requests, then prints the response status, headers, and body.

For token-based runs, prefer an environment variable so the bearer token is not saved in shell history:

CF_REQUEST_RUNNER_TOKEN="$TOKEN" cf-request-runner -a my-cap-app -u https://my-cap-app.example.com --json

❓ FAQ

Why do I need to pass the base URL manually?

The Cloud Foundry CLI can return multiple routes for a single app. Passing the exact base URL ensures we are calling the correct public-facing router, especially in complex landscapes.

Does this work for non-CAP applications?

While primarily built for SAP CAP (which exposes $metadata and endpoints), the CF SSH fallback strictly scans for .cds files. Non-CAP applications might not yield full results.


🛠️ Development

From the monorepo root:

pnpm install
pnpm --filter @saptools/cf-request-runner build
pnpm --filter @saptools/cf-request-runner typecheck
pnpm --filter @saptools/cf-request-runner test:unit
pnpm --filter @saptools/cf-request-runner test:e2e


👨‍💻 Author

dongtran ✨

📄 License

MIT


Made with ❤️ to make your work life easier!

MIT, read

History

Latest

v0.3.0

  1. v0.2.1

  2. v0.1.5

  3. v0.1.4

  4. v0.1.1

On npm
0downloads per week, npm
Weekly downloads for @saptools/cf-request-runner26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 0.27 Apr – 3 May: 04 May – 10 May: 011 May – 17 May: 018 May – 24 May: 025 May – 31 May: 01 Jun – 7 Jun: 08 Jun – 14 Jun: 015 Jun – 21 Jun: 022 Jun – 28 Jun: 029 Jun – 5 Jul: 4096 Jul – 12 Jul: 2713 Jul – 19 Jul: 1920 Jul – 26 Jul: 1827 Jul – 2 Aug: 83 Aug – 9 Aug: 1310 Aug – 16 Aug: 1917 Aug – 23 Aug: 324 Aug – 30 Aug: 1231 Aug – 6 Sept: 1387 Sept – 13 Sept: 2214 Sept – 20 Sept: 1321 Sept – 27 Sept: 1428 Sept – 4 Oct: 65 Oct – 11 Oct: 312 Oct – 18 Oct: 1019 Oct – 25 Oct: 0
Debugging
  1. com.sap.cds:cds-feature-consoleConnects a running CAP Java app to CAP console for monitoring
  2. com.sap.cds:cds-feature-dev-dashboardBrowser dashboard for a running CAP Java service during development
  3. @cap-js/consoleConnects a running CAP application to the CAP console
  4. @cap-js/data-inspectorInspects database entities and contents at CAP service level
  5. sap-cap-debuggerAttaches a debugger to a CAP app running on Cloud Foundry
  6. @sap/cds-dkCommand line client and development toolkit for CAP
  7. @saptools/service-flowStatic end-to-end tracer of one CAP operation across repositories

Details

Sources4
npm registrydiscovered here, keywords:cdschecked
npm registry, @saptools/cf-request-runnerversion, releases, installschecked
github.com/git+https://github.com/dongitran/saptools.gittree, pushes, contributors, CIchecked
packages/cf-request-runner/README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesbuild-time
deploymentCloud Foundry
latestv0.3.0
first release
releases and cadence5, ~1d median
discovered vianpm registry · keywords:cds
first seen in the atlas
ecosystem and domaincap, developer-experience
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:saptools-cf-request-runner
JSON
/artifacts/saptools-cf-request-runner.json
MCP
Connecting an agent