@khalidmh/capx
An opinionated installer for CAP Node.js projects — asks a short set of questions, runs cds init, adds the chosen facets, then writes the configuration and starter files that make those choices work together.
cds init gives you a skeleton and leaves the wiring to you. This wraps it, so the answer to 'which facets, and what do they need configured' arrives as a running project. The README is explicit that it is a wrapper around @sap/cds-dk@sap/cds-dkThe command line client and development toolkit for CAP projects, with the commands cds build, cds deploy, cds watch and cds add among them.sap official, cap rather than a replacement for it.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1@KhalidMhmaintainer
What it declares
Every artifact
- Type
- Generator
- Origin
- Independently maintained
- Runtime
- build time
As a generator
- Generates
- A new project
- Run with
- Its own command
- Distributed through
- npm
Connections
Starting a project, and adding pieces to one that runs
Command line client and development toolkit for CAP
Download
Install
npm add @khalidmh/capxDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from KhalidMh/capx under MIT, readcapx
A Laravel-style installer for SAP CAP Node.js projects.
What It Does
capx guides you through a small set of project choices and builds a ready-to-run CAP
application around them. It runs cds init, adds the selected CAP facets, then applies
the project configuration and starter files that make those choices work together.
It is deliberately an opinionated wrapper around @sap/cds-dk, not a replacement for
the CAP tooling. Once the project exists, use the normal cds, npm, MTA, Cloud Foundry,
and Docker commands you already use for CAP development and deployment.
Requirements
- Node.js 22 or later. Node.js 24 LTS is recommended.
- npm and Git. Git is required because capx initializes the generated project repository.
@sap/cds-dk10+ andmbt. Doctor checks for both and offers to install them globally.- The Cloud Foundry CLI and the MTA CF plugin are detected but optional. Doctor shows installation guidance and lets you decide whether to continue without them.
- Docker with the Compose plugin is checked when you choose PostgreSQL for local development. You can continue without it, but the generated PostgreSQL development configuration requires Docker before it can run.
Doctor runs as the first step of capx new; there is no standalone capx doctor command.
Install
npm install --global @khalidmh/capx
The package is published as @khalidmh/capx; the installed command is capx.
Quickstart
capx new my-app
cd my-app
npm run watch
The generated project is a standard CAP project. Run npm test, npm run lint, and
npm run build from its root as needed.
Configuration Choices
capx new asks for the following choices:
| Choice | Effect |
|---|---|
| Project name | Creates the target directory and names generated artifacts. |
| Backend language | Selects JavaScript (ESM) or TypeScript. |
| Development database | Uses a persistent SQLite file or PostgreSQL through Docker. |
| Production database | Configures SAP HANA Cloud or PostgreSQL on BTP in the MTA. |
| Authentication | Selects none, XSUAA, or IAS. XSUAA and IAS are mocked in development. |
| Frontend framework | Adds no frontend, Vue, or React through Vite at app/frontend. |
| Approuter | Is selected automatically for authentication; an unauthenticated frontend asks whether to add a proxy-only approuter. |
For PostgreSQL on BTP, capx preserves the generated development service plan. PostgreSQL
entitlements and available plans vary between BTP subaccounts and regions, so adjust that
plan in mta.yaml to one available in your landscape before deployment.
What You Get
The exact layout depends on your choices. A fully featured project contains these areas:
my-app/
├── app/
│ ├── frontend/ # Optional Vite React or Vue application
│ └── router/ # Optional approuter
├── db/
│ └── schema.cds # Sample domain model
├── srv/
│ └── cat-service.* # Sample CAP service
├── test/
│ └── smoke.test.* # Service smoke test
├── .cdsrc.json # CAP configuration
├── docker-compose.yml # Present for PostgreSQL development
├── mta.yaml # Cloud Foundry deployment descriptor
└── package.json
CAP facets may add their own files, including authentication descriptors and deployment modules. The generated project also has scripts for watch, build, lint, test, and, when PostgreSQL development is selected, starting and stopping its database container.
Upgrading A Generated Project
Use the CAP tooling to upgrade the generated application. With current @sap/cds-dk, run
cds upgrade from the generated project directory to inspect dependencies and migration
guidance, then review and test the proposed changes. capx does not maintain a parallel
upgrade path.
Non-Goals
Version 0.1.0 does not provide Java backends, Fiori Elements scaffolding, CommonJS
projects, non-interactive flags, capx add, standalone doctor, self-updates, generated
project CI, multitenancy, Kyma or Helm deployment, Event Mesh, AI, attachments,
audit logging, npm workspaces, or pnpm, Yarn, and Bun workflows.
Roadmap
Future work will be considered from user feedback and CAP platform changes; the non-goals above describe the current v0.1.0 boundary, not release commitments.
Contributing
Run the local checks before opening a change:
npm ci
npm run lint
npm test
npm run format:check
License
History
Features 5
Notes
Added
- Interactive
capx newscaffolding for SAP CAP Node.js projects. - JavaScript and TypeScript backend choices, with SQLite or Docker-backed PostgreSQL for development.
- SAP HANA Cloud or PostgreSQL on BTP deployment choices, MTA configuration, and optional XSUAA, IAS, Vite frontend, and approuter setup.
- Prerequisite checks, install guidance, rollback handling, dependency installation, and initial Git repository creation for generated projects.
- Generated service, database, test, formatting, and Docker configuration where selected.
Others providing
Compare all 32 on the Generators page →- abap2UI5 Layout Editorabap2UI5 Layout EditorA browser editor that lays out a UI5 view by drag and drop and writes it out as one abap2UI5 app class, pulled into the system with abapGit.community org, abapDrag-and-drop UI5 view editor that writes an abap2UI5 app classfrom ABAP
- generator-ui5-react-nestgenerator-ui5-react-nestA Yeoman generator that scaffolds a pnpm monorepo with a UI5 app and a Vite React app, which the UI5 app embeds through a custom control, UI5Nest, rather than an iframe.independent, ui5Yeoman generator for a UI5 app that loads a React appfrom UI5
- SAP Build CodeSAP Build CodeSAP's development environment on BTP for SAPUI5, SAP Fiori, mobile and CAP applications that run on the SAP BTP, Cloud Foundry Runtime, in which Joule generates models, services, logic, tests and apps.sap official, btpDevelopment environment on BTP for UI5, Fiori, mobile and CAPfrom BTP/BAIP
- @cap-handler/generator@cap-handler/generatorInteractive 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.independent, capInteractive generator for CAP event handler filesfrom CAP
- com.sap.cds:cds-maven-plugincom.sap.cds:cds-maven-pluginThe Maven plugin that runs CDS build steps in a CAP Java project: compiling the model, generating typed Java accessor interfaces and adding facets to an existing project.sap official, capMaven plugin running CDS build steps in a CAP Java projectfrom CAP
- com.sap.cds:cds-services-archetypecom.sap.cds:cds-services-archetypeA Maven archetype that generates a new CAP Java project: a Spring Boot service with a starter CDS model, wired to the CDS Maven plugin for its build.sap official, capMaven archetype generating a new CAP Java projectfrom CAP
- ui5-control-generatorui5-control-generatorA command-line generator that writes UI5 custom controls, in JavaScript or TypeScript, from the html files in a project, with control logic and renderer split into two files by default.independent, ui5Command line generator of UI5 custom controls from htmlfrom UI5
- AbapGeneratorAbapGeneratorAn ABAP transaction, ZABAP_GENERATOR, that generates a Model-View-Controller-style project by copying a template package's objects into a new one under the project's name.independent, abapABAP transaction generating an MVC-style project from a templatefrom ABAP
- Joule in SAP Build CodeJoule in SAP Build CodeJoule's generative AI inside SAP Build Code, pitched as "optimized for Java and JavaScript application development": opened from SAP Business Application Studio's activity bar, slash commands generate a CAP data model, services, sample data, business logic and a Fiori elements UI.sap official, capJoule's generative AI inside SAP Build Codefrom CAP
- @sap/cds-dk@sap/cds-dkThe command line client and development toolkit for CAP projects, with the commands cds build, cds deploy, cds watch and cds add among them.sap official, capCommand line client and development toolkit for CAPfrom CAP
- @sap/generator-cap-project@sap/generator-cap-projectThe CAP project generator behind SAP Business Application Studio's wizard; its readme says it is meant to be used only there.sap official, capCAP project generator behind SAP Business Application Studio's wizardfrom CAP
- @sap/generator-cds@sap/generator-cdsA CDS project generator, deprecated by its own readme in favour of installing @sap/cds-dk globally.sap official, capCDS project generator, deprecated in favour of @sap/cds-dkfrom CAP
- @sap-ux/cap-config-writer@sap-ux/cap-config-writerSAP's writer module for changing a CAP project's configuration from code, so a tool can add a UI5 app to a project that already exists, returning a mem-fs editor whose commit writes the changes.sap official, capWriter module for changing a CAP project's configuration from codefrom CAP
- @sap-ux/create@sap-ux/createSAP Fiori tools as a command: npx @sap-ux/create changes the features of a Fiori project that already exists, through its add, generate, convert, remove, update and change subcommands.sap official, ui5Command line for changing features of an existing Fiori projectfrom UI5
- @sap-ux/fe-fpm-writer@sap-ux/fe-fpm-writerA library that writes flexible programming model elements, such as a custom page wired into the app's routing, into a Fiori elements application for OData v4 from Node code.sap official, ui5Writer of flexible programming model elements into Fiori elements appsfrom UI5
- @sap-ux/fiori-generator-shared@sap-ux/fiori-generator-sharedThe shared functions and types the Fiori generators are built from; a dependency of theirs rather than a generator itself.sap official, capShared functions and types of the Fiori generatorsfrom CAP
- @sap-ux/odata-service-writer@sap-ux/odata-service-writerA library that adds an OData service to a UI5 project that already exists, writing the file updates from a config object naming the service url, its OData version and a destination.sap official, ui5Writer that adds an OData service to an existing UI5 projectfrom UI5
- @sap-ux/ui5-application-writer@sap-ux/ui5-application-writerA library that writes the base structure of a UI5 project from Node code, out of an app id, title and description, returning a mem-fs editor so a generator needs no template engine of its own.sap official, ui5Writer of the base structure of a UI5 project from Node codefrom UI5
- create-easy-ui5create-easy-ui5An npm-init and npx wrapper that runs the Easy-UI5 Yeoman generator without a global Yeoman install, handing control to generator-easy-ui5 and forwarding any arguments.community org, ui5npm-init wrapper for the Easy-UI5 Yeoman generatorfrom UI5
- create-wdi5create-wdi5An npm initializer that adds wdi5 end-to-end testing to an existing UI5 application, installing WebdriverIO's peer dependencies, writing a wdio.conf file and setting an npm script.community org, ui5npm initializer adding wdi5 testing to an existing UI5 appfrom UI5
- generator-easy-ui5generator-easy-ui5A Yeoman meta-generator that scaffolds UI5 projects, prompting for a target platform, and loads further sub-generators from the UI5 Community for TypeScript apps, launchpad plugins and libraries.community org, ui5Yeoman meta-generator for scaffolding UI5 projectsfrom UI5
- generator-ui5-addgenerator-ui5-addA Yeoman generator that creates UI5 tooling-extension projects and manages the tooling extensions of an existing project, from the bestOfUI5 catalogue.community org, ui5Yeoman generator for UI5 tooling-extension projectsfrom UI5
- generator-ui5-appgenerator-ui5-appA Yeoman generator, built on the official UI5 tooling, that scaffolds a new UI5 application in one pass, run as a plug-in for Easy-UI5 or standalone, ready for npm start.community org, ui5Easy-UI5 generator scaffolding a new UI5 applicationfrom UI5
- generator-ui5-controlgenerator-ui5-controlA Yeoman generator that scaffolds a UI5 custom control structured for npm distribution, with a manual test app with live reload and a Jest test suite already wired in.community org, ui5Yeoman generator for UI5 custom controls distributed via npmfrom UI5
- generator-ui5-library-webcgenerator-ui5-library-webcA Yeoman generator that scaffolds a UI5 library wrapping UI5 Web Components on the official UI5 tooling, run through Easy-UI5 or standalone, and served afterwards with npm start.community org, ui5Yeoman generator for UI5 libraries wrapping UI5 Web Componentsfrom UI5
- generator-ui5-librarygenerator-ui5-libraryA Yeoman generator, built on the official UI5 tooling, that scaffolds a new UI5 library as a plug-in for Easy-UI5.community org, ui5Easy-UI5 generator scaffolding a new UI5 libraryfrom UI5
- generator-ui5-projectgenerator-ui5-projectA Yeoman generator for a UI5 project holding several applications in npm workspaces, with eight subgenerators for recurring tasks and a choice of six deployment targets.community org, ui5Yeoman generator for UI5 projects holding several applicationsfrom UI5
- generator-ui5-ts-app-fclgenerator-ui5-ts-app-fclA generator that scaffolds a UI5 TypeScript application built around the FlexibleColumnLayout and bound to an OData service, asking for the endpoint, entity set, key and fields to show.community org, ui5Generator for a TypeScript UI5 FlexibleColumnLayout app on ODatafrom UI5
- generator-ui5-ts-appgenerator-ui5-ts-appA Yeoman generator, built on the official UI5 CLI, that scaffolds a new UI5 application in TypeScript with its tsconfig and UI5 CLI configuration, as a plug-in for Easy-UI5.community org, ui5Easy-UI5 generator scaffolding a TypeScript UI5 applicationfrom UI5
- generator-ui5-ts-librarygenerator-ui5-ts-libraryA Yeoman generator, built on the official UI5 tooling, that scaffolds a new UI5 library in TypeScript as a plug-in for Easy-UI5.community org, ui5Easy-UI5 generator scaffolding a TypeScript UI5 libraryfrom UI5
- generator-ui5-wdi5generator-ui5-wdi5A Yeoman generator that scaffolds wdi5 end-to-end test configuration and sample tests into a UI5 app, wrapping npm init wdi5 in prompts and run through Easy-UI5.community org, ui5Yeoman generator scaffolding wdi5 test configuration into a UI5 appfrom UI5
Details
Sources
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
History in the atlas
- First seen.
For your agent
- Ref
artifact:khalidmh-capx- JSON
- /artifacts/khalidmh-capx.json
- MCP
- Connecting an agent