abap-kit
v1.0.7
Published
ABAP development CLI for scaffolding projects
Downloads
480
Maintainers
Readme
abap-kit
A lightweight CLI tool for scaffolding ABAP development projects quickly.
Features
- Creates a complete ABAP project structure in seconds
- Generates starter ABAP objects in abapGit file format (deployable to a real SAP system): a program, a sample interface and a class implementing it, with ABAP Unit tests
- Sets up abaplint and transpiler configuration with the full open-abap library set
- Cross-platform
npm run exec/npm run unit/npm testscripts (Windows, macOS, Linux) - Adds VS Code recommendations for ABAP development
- Creates a ready-to-use README and project skeleton
- Self-updates via
abap-kit update
Installation
Install globally with npm:
npm install -g abap-kitUsage
Create a new project:
abap-kit create my-abap-projectSkip dependency installation (run npm install later) or overwrite an existing directory:
abap-kit create my-abap-project --no-install
abap-kit create my-abap-project --forceThen run:
cd my-abap-project
npm run execAdd new ABAP objects to an existing project:
abap-kit add class zcl_calculator
abap-kit add class zcl_calculator --with-tests # also generate ABAP Unit tests
abap-kit add interface zif_calculator
abap-kit add program zcalculatorEach command creates the abapGit serialized skeleton files (.clas.abap + .clas.xml, .intf.abap + .intf.xml, .prog.abap) inside src/. For classes, --with-tests additionally writes .clas.testclasses.abap and sets <WITH_UNIT_TESTS> in the class XML.
Commands
abap-kit create <project-name>– Create a new project (--force,--no-installoptions)abap-kit add <class|interface|program> <name>– Add an ABAP object skeleton tosrc/in abapGit format (--with-testsfor classes)abap-kit clean– Run abap-cleaner onsrc/. The binary path is required via--bin <path>or theABAP_CLEANER_PATHenvironment variable. The--releaseargument is passed automatically from the numericsyntax.versioninabaplint.json(e.g.v752→--release 752); if no numeric release is found, the cleaner runs with its default version:abap-kit clean --bin /path/to/abap-cleaner ABAP_CLEANER_PATH=/path/to/abap-cleaner abap-kit cleanabap-kit ci– Generate a GitHub Actions workflow in the current projectabap-kit update– Update abap-kit to the latest version (npm install -g abap-kit@latest)abap-kit --help– Show helpabap-kit --version– Show installed version
Project Structure
The generated project includes:
src/for ABAP source files in abapGit file format (sample program + interface + class with unit tests).abapgit.xmlfor abapGit repository configuration (ready to link to a SAP system)setup.mjsfor runtime setuprun.mjscross-platform program runnerabaplint-transpiler.jsonfor transpilation configabaplint.jsonfor linting config.vscode/extensions.jsonfor editor recommendations
CI
When you run the CLI with the CI option, it generates a GitHub Actions workflow for the created project.
Example:
abap-kit ciThis creates a workflow file at:
.github/workflows/lint.yml
The generated workflow runs on pushes and pull requests and executes:
npm cinpm test(lint + transpiled unit tests)
License
MIT
