Skip to content

abapify/adt-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

912 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abapify — ADT CLI & SDK for SAP

CI adt-cli on npm License: MIT

abapify is a TypeScript monorepo that talks to SAP ABAP Development Tools (ADT). It ships a CLI (adt), a typed SDK for programmatic use, an MCP server that exposes ADT to AI assistants, and a handful of CLI plugins for common workflows (ATC, abapGit, gCTS, unit tests, diff, export).

Why it exists: SAP ADT is a rich REST surface, but there's no first-class CLI or npm SDK for it. abapify gives you one — typed, scriptable, CI-friendly, without leaving the JS ecosystem.

Quick start

CLI

# Install
npm i -g @abapify/adt-cli
# or, run it one-shot
npx @abapify/adt-cli --help

# Configure a connection
adt login --url https://your-sap-system.example.com

# Do things
adt search "Z*" --type class
adt get class ZCL_MY_CLASS
adt atc run --package ZMYPKG --output sarif
adt export push ./src        # deploy local source to SAP
adt abapgit push              # serialize & push via abapGit

See the CLI reference for every command and flag.

SDK

npm i @abapify/adt-client @abapify/adt-auth
import { createAdtClient } from '@abapify/adt-client';
import { basicAuth } from '@abapify/adt-auth';

const client = createAdtClient({
  baseUrl: 'https://your-sap-system.example.com',
  auth: basicAuth({ user: 'DEVELOPER', password: process.env.SAP_PASSWORD! }),
});

const classes = await client.repository.nodeContents({
  parent_type: 'DEVC/K',
  parent_name: 'ZMYPKG',
});

MCP server (for AI assistants)

# stdio transport
npx @abapify/adt-mcp

# or HTTP transport
docker run --rm -p 3000:3000 ghcr.io/abapify/adt-mcp:latest

Every CLI command has a parity MCP tool — see the MCP docs.

Documentation

Full documentation lives at adt-cli.netlify.app:

Sources:

  • Public docs — website/docs/, rendered to the site above.
  • Maintainer docs — docs/, not rendered (design notes, planning, history).

Packages

All packages are published to npmjs.org under @abapify/*. Every entry below links to the on-npm package; the first column links to the source in this monorepo.

CLI & plugins (user-facing)

Package npm Description
adt-cli npm adt command-line interface
adt-mcp npm MCP server — exposes ADT tools to AI assistants
adt-atc npm ATC plugin — runs ABAP Test Cockpit, emits SARIF / GL CQ
adt-aunit npm ABAP Unit Test plugin, JUnit XML output for CI
adt-diff npm Diff plugin — compare local serialized files vs SAP
adt-export npm Export plugin — deploy local sources to SAP
adt-plugin-abapgit npm abapGit serialization format plugin
adt-plugin-gcts npm gCTS (git-enabled CTS) plugin
adt-plugin-gcts-cli npm adt gcts command wrapper over gCTS REST
adt-tui npm Ink-based terminal UI primitives

SDK & core libraries

Package npm Description
adt-client npm Contract-driven HTTP client for ADT REST APIs
adt-contracts npm Typed ADT REST API contract definitions
adt-schemas npm SAP ADT XML schemas generated from XSD
adk npm ABAP Development Kit — object construction and serialization
adt-auth npm Auth: Basic, SLC, OAuth, browser SSO
adt-config npm Config loader for adt.config.ts / .json
adt-locks npm Lock/unlock service for ADT objects
adt-plugin npm Plugin interface contract
adt-rfc npm RFC transport over SOAP-over-HTTP (/sap/bc/soap/rfc)

Authentication adapters

Package npm Description
browser-auth npm Shared browser SSO logic
adt-playwright npm Playwright SSO adapter
adt-puppeteer npm Puppeteer SSO adapter

Foundation libraries

Package npm Description
abap-ast npm Typed AST and pretty-printer for ABAP source code
acds npm ABAP CDS parser — tokenizer + AST
adt-codegen npm Hook-based code generation toolkit
asjson-parser npm ABAP asJSON canonical format parser
logger npm Shared logger interface
openai-codegen npm OpenAPI → ABAP client code generator
speci npm Arrow-function REST contract specification
ts-xsd npm XSD parser, builder, TypeScript type inference

Architecture

adt-cli  (Commander.js CLI, plugin loader)
  │
  ├── adt-client  (HTTP client, auth interceptor)
  │     ├── adt-contracts  (speci endpoint definitions)
  │     └── adt-schemas    (XSD-derived TypeScript types)
  │
  ├── adk  (ABAP object construction: parse ADT XML → domain objects)
  │
  ├── adt-locks  (lock/unlock service shared with adk, adt-export)
  │
  ├── adt-auth  (session management: basic / SLC / OAuth / browser SSO)
  │     ├── adt-playwright  (Playwright browser adapter)
  │     └── adt-puppeteer   (Puppeteer browser adapter)
  │
  └── plugins  (opt-in command extensions)
        ├── adt-atc          (ATC runs → SARIF / GitLab Code Quality)
        ├── adt-aunit        (ABAP Unit → JUnit XML)
        ├── adt-diff         (local vs SAP diff)
        ├── adt-export       (file system → SAP deploy)
        ├── adt-plugin-abapgit  (abapGit format serialization)
        └── adt-plugin-gcts-cli (gCTS command wrapper)

Type flow: SAP XSD definitions → ts-xsd generates schema literals → adt-schemas exports them → adt-contracts wraps them in speci endpoint descriptors → adt-client executes with full type inference at the call site. This means the CLI, the SDK, and the MCP tools all share the same type contract — fix a schema once, every caller picks it up.

Local development

Requirements: Bun (not npm, pnpm, or yarn — the repo uses bun workspaces and workspace:* protocol).

git clone https://github.com/abapify/adt-cli.git
cd adt-cli
bun install

# Common tasks (all nx-driven)
bunx nx build                 # build every package
bunx nx test                  # run every test
bunx nx typecheck             # type-check every package
bunx nx lint                  # lint + auto-fix
bunx nx run adt-cli:test      # single-package

Repository layout

adt-cli/
├── packages/        # Every @abapify/* package lives here
├── samples/         # Example consumer projects
├── tools/           # Internal Nx plugins (nx-tsdown, nx-vitest, nx-npm-trust, …)
├── docs/            # Maintainer docs (not rendered on the site)
├── website/         # Docusaurus site (→ adt-cli.netlify.app)
├── openspec/        # Specs + proposals for in-flight changes
└── tmp/             # Scratch — gitignored

Release workflow

The npm side uses OIDC trusted publishing — no NPM_TOKEN secret lives anywhere. tools/nx-npm-trust is the internal plugin that registered the trusted publishers (see its README for the setup / bootstrap flow). To cut a release, maintainers trigger the Release workflow on GitHub Actions; it computes the next version from conventional commits, tags, pushes, and dispatches publish.yml, which in turn publishes all 30 packages through OIDC.

Contributing

git checkout -b feat/my-change
# make changes
bunx nx affected -t build test typecheck lint
git push origin feat/my-change
# open a pull request against main

Conventions used by AI coding agents are documented in AGENTS.md. Per-package AGENTS.md files extend those rules with package-specific invariants.

License

MIT

About

ABAP-relevant JS packages

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages