GeneratorGeneratortypeCreates a project, a component or configuration once, when you run it, rather than taking part in every build.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 →

cap-utils

An npx tool that drops worked example files into an existing CAP project, including a test.http to fire requests at what it added, for exploring CAP features you then extend yourself.

Aimed at exploring CAP features inside your own project rather than reading them in a sample repository; the README is explicit that you are meant to extend what it writes.

Facts

Latestv1.2.6ReleasedLast pushLicenceISC

Where it sits

Lives in
Provides
Reference appsCAPReference appscapabilityA whole application to read rather than a snippet to copy — somewhere to see how the pieces sit together once there are more than three of them.
Flavors
Node.jsJavafrom its runtime

Who is behind it

lorenzobigslorenzobigsPersonMaintains this
In the atlas: maintains 1, contributes to 1
@lorenzobigs
maintainer

Before choosing this

Conditions

PracticalFunctional boundary

Last released April 2024.

What it declares

Every artifact

Type
Generator
Origin
Independently maintained
Runtime
build time

As a generator

Generates
Code or test data
Run with
Its own command
Distributed through
npm

Connections1

cap-utils connectionscap-utilsPROVIDES→ provides1provides authoredReference apps

Install

npm add cap-utils

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

README

quoted from lorenzobigs/cap-utils under ISC, read
lorenzobigs/cap-utils/Readme.mdOn GitHub

cap-utils v1.2.6

Cap Utilities

This npx tools provides a set of example files to explore SAP Cloud Application Programming features.

How to use

It's simple! Open the terminal in your CAP Project root directory and run

npx cap-utils

Your project will be updated. Run

cds watch 

and use the test.http to run some test. You are very encouraged to explore and extend the example files!

If you don't know how to initialize a SAP CAP Project: Jumpstart guide in SAP CAPire

Keep in mind that from 1.0.7 version the service were enhanced with scope protection. To add a local mock user copy the auth section from package-for-cap.json into your package.json and run :

cds watch --profile development

The development profile will inject a mock user with the required scope to consume the service. You can use the same user to access to the webapp.

Additional Modules

In version 1.0.4 it has been added a feature to add extra modules to your app.

npx cap-utils --add <extra_module_1>,<extra_module_2>...

Available modules:

  • ui5 --> add a basic UI5 freestyle application in your project
  • mta --> add sample files for mta based deployment on Cloud Foundry runtime
  • profiling --> add a section in your package.json with cds profiles
  • ext --> add a section in your package.json external odata source and sample files to implement it.
  • test --> add test sample files and scripts
Suggested Extension in your IDE
Visual Studio / SAP BAS
"sapse.vscode-cds"
"dbaeumer.vscode-eslint"
"humao.rest-client"
"qwtel.sqlite-viewer"
"mechatroner.rainbow-csv"
ISC, read

History

Latest

v1.2.4

Notes

Refactoring of external,mta and profiling features. Main features are still the same.

  1. v1.2.3

    Notes

    Some changes on the presentation layer

  2. v1.2.2

    Notes

    Typo fix in *service.cds on role definition for entity restrictions

  3. v1.2.0

    Notes

    In version 1.2.0 there were added sample files to run unit tests on the application. Ensure to add the required devDependencies. The feature can be used with:

    npx cap-utils --add test

    Then run:

    npm test
  4. v1.1.1

    Notes

    In version 1.1.1 there were added sample files to consume an external odata service exposed as entity of the internal catalog service. The feature can be used with:

    npx cap-utils --add ext
  5. v1.0.7

    Other 5

    Notes

    From version 1.0.11 you can modify your package.json to add a cds profiling section.

    In version 1.0.7 sample files for xsuaa,html5-repo,hana,mta based deployment were added:

    • valid-service.cds were changed to add scope protection on srv
    • test.http were modified to add Basic authentication for local testing
    • xs-security.json: it will add scope base authorizations
    • xs-security-cc.json : it will add a client credential user with authorizations to consume srv
    • mta.yaml : enable the app for a Cloud Foundry deployment.
1downloads per week, npm
Weekly downloads for cap-utils26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 1.27 Apr – 3 May: 204 May – 10 May: 2711 May – 17 May: 3818 May – 24 May: 2125 May – 31 May: 271 Jun – 7 Jun: 508 Jun – 14 Jun: 4315 Jun – 21 Jun: 122 Jun – 28 Jun: 3729 Jun – 5 Jul: 56 Jul – 12 Jul: 1213 Jul – 19 Jul: 3720 Jul – 26 Jul: 5427 Jul – 2 Aug: 33 Aug – 9 Aug: 2110 Aug – 16 Aug: 2117 Aug – 23 Aug: 524 Aug – 30 Aug: 931 Aug – 6 Sept: 77 Sept – 13 Sept: 2014 Sept – 20 Sept: 1321 Sept – 27 Sept: 3428 Sept – 4 Oct: 65 Oct – 11 Oct: 2112 Oct – 18 Oct: 2119 Oct – 25 Oct: 1
Reference apps
  1. cds-incidents-samplecds add plugin adding the incidents-app model to a projectfrom CAP

Details

Sources4
npm registrydiscovered here, keywords:cdschecked
npm registry, cap-utilsversion, releases, installschecked
github.com/git+https://github.com/lorenzobigs/cap-utils.gittree, pushes, contributors, CIchecked
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
latestv1.2.6
first release
releases and cadence18, ~1d median
discovered vianpm registry · keywords:cds
first seen in the atlas
ecosystem and domaincap, learning-and-reference
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:lorenzobigs-cap-utils
JSON
/artifacts/lorenzobigs-cap-utils.json
MCP
Connecting an agent