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-handler/generator

Interactive generator for CAP event handlers: reads the model through the reflection API, asks which service, target and phase, then writes the handler file and wires the import and registration into the service implementation.

It covers entities, bound and unbound actions and functions, detects TypeScript or JavaScript from the project, and creates a minimal service implementation if none exists. The registration wiring is the part usually forgotten.

Facts

Latestv0.2.0ReleasedLicenceMIT License

Where it sits

Lives in
Provides
GeneratorsCAPGeneratorscapabilityGetting from nothing to a project that runs, and from a project that runs to one that has the piece you just decided you need. Two different moments: the first is a one-time decision about layout, the second recurs for the life of the project.
Flavors
Node.jsJavafrom its runtime
Requires
@sap/cds≥ 8@sap/cdsartifactThe peer range, as published.

Who is behind it

schmitt-p

What it declares

Every artifact

Type
Generator
Origin
Independently maintained
Runtime
build time

As a generator

Declared for
>=8
Generates
Code or test data
Run with
cds addIts own command
Distributed through
npm

Connections1

@cap-handler/generator connections@cap-handler/generatorPROVIDES→ provides1provides authoredGenerators

Install

npm add @cap-handler/generator

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

README

quoted from @cap-handler/generator@0.2.0, read
@cap-handler/generator@0.2.0/README.mdOn npm

@cap-handler/generator

Interactive generator for SAP CAP event handlers. It reads the CDS model via the reflection API, lets you pick a target (entity, bound/unbound action or function), creates the handler files and wires up the imports + registrations in the service implementation. If the implementation is missing, it's scaffolded — preferably via the real cds add handler (from @sap/cds-dk), falling back to a minimal built-in skeleton if that's unavailable.

  • CRUD events, Fiori draft events (NEW, EDIT, PATCH, SAVE, DISCARD) and bound/unbound actions & functions
  • JavaScript (CommonJS or ESM) and TypeScript with typed handlers via cds-typer
  • Works for both the "old" (CAP ≤ 9, CommonJS) and the "new" (CAP 10, ESM) project layout — see CAP version compatibility
excerpt, MIT License, read licencethe rest, on npm

History

Latest

v0.2.0

  1. v0.1.1

  2. v0.1.0

On npm
7downloads per week, npm
Weekly downloads for @cap-handler/generator26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 7.20 Apr – 26 Apr: 027 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: 06 Jul – 12 Jul: 013 Jul – 19 Jul: 020 Jul – 26 Jul: 027 Jul – 2 Aug: 2303 Aug – 9 Aug: 5310 Aug – 16 Aug: 2717 Aug – 23 Aug: 1024 Aug – 30 Aug: 1531 Aug – 6 Sept: 187 Sept – 13 Sept: 314 Sept – 20 Sept: 3721 Sept – 27 Sept: 928 Sept – 4 Oct: 1875 Oct – 11 Oct: 2612 Oct – 18 Oct: 7
Generators
  1. abap2UI5 Layout EditorDrag-and-drop UI5 view editor that writes an abap2UI5 app classfrom ABAP
  2. generator-ui5-react-nestYeoman generator for a UI5 app that loads a React appfrom UI5
  3. SAP Build CodeDevelopment environment on BTP for UI5, Fiori, mobile and CAPfrom BTP/BAIP
  4. com.sap.cds:cds-maven-pluginMaven plugin running CDS build steps in a CAP Java projectfrom CAP
  5. com.sap.cds:cds-services-archetypeMaven archetype generating a new CAP Java projectfrom CAP
  6. @khalidmh/capxInteractive project installer for CAP Node.jsfrom CAP
  7. ui5-control-generatorCommand line generator of UI5 custom controls from htmlfrom UI5
  8. AbapGeneratorABAP transaction generating an MVC-style project from a templatefrom ABAP
  9. Joule in SAP Build CodeJoule's generative AI inside SAP Build Codefrom CAP
  10. @sap/cds-dkCommand line client and development toolkit for CAPfrom CAP
  11. @sap/generator-cap-projectCAP project generator behind SAP Business Application Studio's wizardfrom CAP
  12. @sap/generator-cdsCDS project generator, deprecated in favour of @sap/cds-dkfrom CAP
  13. @sap-ux/cap-config-writerWriter module for changing a CAP project's configuration from codefrom CAP
  14. @sap-ux/createCommand line for changing features of an existing Fiori projectfrom UI5
  15. @sap-ux/fe-fpm-writerWriter of flexible programming model elements into Fiori elements appsfrom UI5
  16. @sap-ux/fiori-generator-sharedShared functions and types of the Fiori generatorsfrom CAP
  17. @sap-ux/odata-service-writerWriter that adds an OData service to an existing UI5 projectfrom UI5
  18. @sap-ux/ui5-application-writerWriter of the base structure of a UI5 project from Node codefrom UI5
  19. create-easy-ui5npm-init wrapper for the Easy-UI5 Yeoman generatorfrom UI5
  20. create-wdi5npm initializer adding wdi5 testing to an existing UI5 appfrom UI5
  21. generator-easy-ui5Yeoman meta-generator for scaffolding UI5 projectsfrom UI5
  22. generator-ui5-addYeoman generator for UI5 tooling-extension projectsfrom UI5
  23. generator-ui5-appEasy-UI5 generator scaffolding a new UI5 applicationfrom UI5
  24. generator-ui5-controlYeoman generator for UI5 custom controls distributed via npmfrom UI5
  25. generator-ui5-library-webcYeoman generator for UI5 libraries wrapping UI5 Web Componentsfrom UI5
  26. generator-ui5-libraryEasy-UI5 generator scaffolding a new UI5 libraryfrom UI5
  27. generator-ui5-projectYeoman generator for UI5 projects holding several applicationsfrom UI5
  28. generator-ui5-ts-app-fclGenerator for a TypeScript UI5 FlexibleColumnLayout app on ODatafrom UI5
  29. generator-ui5-ts-appEasy-UI5 generator scaffolding a TypeScript UI5 applicationfrom UI5
  30. generator-ui5-ts-libraryEasy-UI5 generator scaffolding a TypeScript UI5 libraryfrom UI5
  31. generator-ui5-wdi5Yeoman generator scaffolding wdi5 test configuration into a UI5 appfrom UI5

Details

Sources4
npm registrydiscovered here, keywords:cdschecked
npm registry, @cap-handler/generatorversion, releases, installschecked
github.com/git+https://gitlab.com/schmitt-p/cap-handler-generator.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
declared for>=8
latestv0.2.0
first release
releases and cadence3, ~62d 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:cap-handler-generator
JSON
/artifacts/cap-handler-generator.json
MCP
Connecting an agent