Skip to main content

CLI for SAP ADT REST API

Project description

erpl-adt

CLI and MCP server for the SAP ADT REST API — a single binary that talks the same HTTP endpoints Eclipse ADT uses. No Eclipse, no SAP NW RFC SDK, no JVM.

Build

Part of the Datazoo ERPL family.

What it does

  • Search and browse ABAP objects, packages, data dictionary tables, CDS views
  • Read and write source code with lock management and transport integration
  • Run tests — ABAP Unit and ATC quality checks from the command line
  • Manage transports — create, list, and release transport requests
  • MCP server — expose all capabilities to AI agents over JSON-RPC (MCP 2024-11-05)

Every command accepts --json for machine-readable output.

In action

Find ABAP objects by name pattern:

search demo

Read a data-dictionary table, with field types and check tables resolved:

ddic demo

Read ABAP source code with built-in syntax highlighting:

source demo

Browse a package recursively to enumerate everything it contains:

package demo

BW/4HANA Modeling

Search the BW catalog across ADSOs, composite providers, DTPs, transformations, and queries:

bw search demo

Inspect an ADSO's field structure, complete with the InfoObject each field maps to:

bw adso demo

Export an InfoProvider's dataflow as Mermaid — pipe it straight into a renderer or commit it next to the model:

bw mermaid demo

Quick examples

# Save connection credentials (prompts for password)
erpl-adt login --host sap.example.com --port 44300 --https --user DEVELOPER

# Search for classes matching a pattern
erpl-adt search ZCL_MY_* --type CLAS --max 20

# Read object metadata and source code
erpl-adt object read /sap/bc/adt/oo/classes/zcl_my_class
erpl-adt source read /sap/bc/adt/oo/classes/zcl_my_class/source/main

# Write source code (auto-locks, writes, unlocks)
erpl-adt source write /sap/bc/adt/oo/classes/zcl_my_class/source/main --file impl.abap

# Write and activate in one step
erpl-adt source write /sap/bc/adt/oo/classes/zcl_my_class/source/main --file impl.abap --activate

# Activate an object by name
erpl-adt activate ZCL_MY_CLASS

# Run unit tests and ATC checks (by name or URI)
erpl-adt test ZCL_MY_CLASS
erpl-adt check ZCL_MY_CLASS --variant DEFAULT

# Create a transport request and release it
erpl-adt transport create --desc "Feature XYZ" --package ZPACKAGE
erpl-adt transport release NPLK900042

# Browse packages and data dictionary
erpl-adt package tree ZPACKAGE --type CLAS
erpl-adt ddic table SFLIGHT
erpl-adt ddic cds I_AIRLINE

# Check syntax
erpl-adt source check /sap/bc/adt/oo/classes/zcl_my_class/source/main

Installation

The quickest way to run erpl-adt — no download needed:

uvx erpl-adt --help

Or install permanently:

pip install erpl-adt

Alternatively, download the binary for your platform from the latest release, or build from source.

Platform Architecture
Linux x86_64
macOS arm64, x86_64
Windows x64

Full reference

Run erpl-adt --help for the complete command listing. Key commands:

SEARCH — Search for ABAP objects
  search <pattern>                        Search for ABAP objects
      --type <type>                       Object type: CLAS, PROG, TABL, INTF, FUGR
      --max <n>                           Maximum number of results

OBJECT — Read, create, delete, lock/unlock ABAP objects
  object create                           Create an ABAP object
      --type, --name, --package           (required)
      --description, --transport
  object delete <uri>                     Delete an ABAP object
  object lock <uri>                       Lock an object for editing
  object read <name-or-uri>               Read object structure
  object run <class-name-or-uri>          Run an ABAP console class (IF_OO_ADT_CLASSRUN)
  object unlock <uri>                     Unlock an object

SOURCE — Read, write, and check ABAP source code
  source check <name-or-uri>              Check syntax
  source edit <name-or-uri>               Open source in $EDITOR and write back
  source read <name-or-uri>               Read source code
      --version <version>                 active or inactive (default: active)
      --section <section>                 main, localdefinitions, localimplementations, testclasses, all
      --color / --no-color                ANSI syntax highlighting
  source write <name-or-uri>              Write source code
      --file <path>                       Path to local source file  (required)
      --activate                          Activate the object after writing
      --optimistic                        Try lockless write first (pre-7.51 SAP)

ACTIVATE — Activate inactive ABAP objects
  activate <name-or-uri>

TEST / CHECK
  test <name-or-uri>                      Run ABAP unit tests
  check <name-or-uri>                     Run ATC quality checks
      --variant <name>                    ATC variant (default: DEFAULT)

TRANSPORT — List, create, and release transports
  transport create --desc <text> --package <pkg>
  transport list [--user <user>]
  transport release <number>

DATA DICTIONARY — Tables and CDS views
  ddic table <name>                       Get table definition (fetches lengths + descriptions by default)
      --no-resolve-types                  Skip data-element lookup; show field names and types only
      --raw                               Print raw SAP XML response
  ddic cds <name>                         Get CDS view source

PACKAGE — List contents and check package existence
  package exists <name>
  package list <name>
  package tree <name>                     Recursive BFS traversal
      --type <type>                       Filter: CLAS, PROG, TABL, INTF, FUGR
      --max-depth <n>                     (default: 50)

GLOBAL FLAGS
  --host, --port, --user, --password, --client
  --https, --insecure
  --json                                  Machine-readable JSON output
  --color / --no-color
  --timeout <sec>
  --session-file <path>                   Persist session for lock/write/unlock workflows
  -v / -vv                                INFO / DEBUG logging

EXIT CODES
  0  Success   1  Connection/auth   2  Not found   5  Activation error
  6  Lock conflict   7  Test failure   8  ATC check error   99  Internal error

MCP server

erpl-adt includes a built-in MCP server (Model Context Protocol, version 2024-11-05) that exposes all ADT operations as tools over JSON-RPC 2.0 on stdin/stdout. This lets AI agents search, read, write, test, and manage ABAP code directly.

erpl-adt mcp --host sap.example.com --port 44300 --https

Configure it in your MCP client (e.g., Claude Desktop, Claude Code):

{
  "mcpServers": {
    "erpl-adt": {
      "command": "erpl-adt",
      "args": ["mcp", "--host", "sap.example.com", "--port", "44300", "--https"],
      "env": {
        "SAP_PASSWORD": "your_password"
      }
    }
  }
}

Deploy workflow

erpl-adt also includes the original deploy workflow for automated abapGit package deployment via YAML configuration:

cat > config.yaml <<EOF
connection:
  host: localhost
  port: 50000
  use_https: false
  client: "001"
  user: DEVELOPER
  password_env: SAP_PASSWORD

repos:
  - name: flight
    url: https://github.com/SAP-samples/abap-platform-refscen-flight.git
    branch: refs/heads/main
    package: /DMO/FLIGHT
    activate: true
EOF

export SAP_PASSWORD=your_password
erpl-adt deploy -c config.yaml

The deploy workflow is an idempotent state machine: discover → create package → clone → pull → activate. Each step checks preconditions and skips if already satisfied. Re-running is safe. Supports multi-repo deployments with depends_on for topological ordering.

Building from source

git clone --recurse-submodules https://github.com/datazooDE/erpl-adt.git
cd erpl-adt
make release

Requires CMake 3.21+, Ninja, and a C++17 compiler (GCC 13+, Apple Clang 15+, or MSVC 17+). vcpkg is included as a git submodule.

To run the tests:

make test                          # Unit tests (offline, no SAP system needed)
make test-integration-py           # Integration tests (requires SAP system)

Docker

docker build -t erpl-adt .
docker run --rm -v $(pwd)/config.yaml:/config.yaml \
    -e SAP_PASSWORD=your_password \
    erpl-adt deploy -c /config.yaml

Or use Docker Compose for end-to-end provisioning with a SAP ABAP Cloud Developer Trial:

docker compose up

License

Apache License 2.0 — Copyright 2026 Datazoo GmbH

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

erpl_adt-2026.6.27-py3-none-win_amd64.whl (3.6 MB view details)

Uploaded Python 3Windows x86-64

erpl_adt-2026.6.27-py3-none-manylinux_2_17_x86_64.whl (6.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

erpl_adt-2026.6.27-py3-none-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

erpl_adt-2026.6.27-py3-none-macosx_10_15_x86_64.whl (4.4 MB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

Details for the file erpl_adt-2026.6.27-py3-none-win_amd64.whl.

File metadata

  • Download URL: erpl_adt-2026.6.27-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for erpl_adt-2026.6.27-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e70c4eb91a2aef9fe02205b3d177760dd74884d67570d373700d530feb406200
MD5 f45ca904c398210abee6900e2be9411d
BLAKE2b-256 f6a354ae17cd226d155381267b6fa2d4e0aeb0b1e3d7710f6174a2deed58dda0

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.6.27-py3-none-win_amd64.whl:

Publisher: release.yaml on DataZooDE/erpl-adt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erpl_adt-2026.6.27-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for erpl_adt-2026.6.27-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f8b7f8a3ab6b1d473922c87be01888b36179d19c5d23ea26dfc64c74231a7341
MD5 a0e75076bc9d6d1a1f037efd205fab55
BLAKE2b-256 2aee3c8d9db72d077d04ea327f43bc8a5ec4b9d3d025b544fc99bb37eac07f50

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.6.27-py3-none-manylinux_2_17_x86_64.whl:

Publisher: release.yaml on DataZooDE/erpl-adt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erpl_adt-2026.6.27-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for erpl_adt-2026.6.27-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e23f758215cfce895026726776d4a1bfa4f8d7101f0d838248ac91c14282a128
MD5 368e6654fe3ab3e6b84008bd4125a8d5
BLAKE2b-256 aa352cf76f55ca75a8b8fea7f8b737267805d9eb914b096d013bd393c9ecb92a

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.6.27-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yaml on DataZooDE/erpl-adt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erpl_adt-2026.6.27-py3-none-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for erpl_adt-2026.6.27-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f9d7b893f7daa6e3565afca77f887e0d405149cbe2cd85b7ecb2583e19bb1a8b
MD5 3db5331484f415cd5dc75bb9cf7b2e75
BLAKE2b-256 9947d236f28632a00aaf20d51482d00966ce8ff81ecbade4d5f951b95e177530

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.6.27-py3-none-macosx_10_15_x86_64.whl:

Publisher: release.yaml on DataZooDE/erpl-adt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page