@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 14 on the Generators page →- 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 CAP
- @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 files
- 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 project
- 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 project
- 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 Code
- @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 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 wizard
- @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-dk
- @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 code
- @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 project
- @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 apps
- @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 generators
- @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 project
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