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.

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

erpl-adt - CLI for the SAP ADT REST API

  Talks the same HTTP endpoints Eclipse ADT uses. No Eclipse, no RFC SDK, no JVM.
  All commands accept --json for machine-readable output.

USAGE
  erpl-adt [global-flags] <command> [args] [flags]

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
  create                                  Create an ABAP object
      --type <type>                       Object type (e.g., CLAS/OC, PROG/P)  (required)
      --name <name>                       Object name  (required)
      --package <pkg>                     Target package  (required)
      --description <text>                Object description
      --transport <id>                    Transport request number
  delete <uri>                            Delete an ABAP object
      --handle <handle>                   Lock handle (skips auto-lock if provided)
      --transport <id>                    Transport request number
  lock <uri>                              Lock an object for editing
      --session-file <path>               Save session for later unlock
  read <uri>                              Read object structure
  unlock <uri>                            Unlock an object
      --handle <handle>                   Lock handle  (required)
      --session-file <path>               Session file for stateful workflow

SOURCE — Read, write, and check ABAP source code
  check <uri>                             Check syntax
  read <uri>                              Read source code
      --version <version>                 active or inactive (default: active)
  write <uri>                             Write source code
      --file <path>                       Path to local source file  (required)
      --handle <handle>                   Lock handle (skips auto-lock if provided)
      --transport <id>                    Transport request number
      --session-file <path>               Session file for stateful workflow
      --activate                          Activate the object after writing

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

TEST — Run ABAP Unit tests
  test <name-or-uri>                      Run ABAP unit tests

CHECK — Run ATC quality checks
  check <name-or-uri>                     Run ATC checks
      --variant <name>                    ATC variant (default: DEFAULT)

TRANSPORT — List, create, and release transports
  create                                  Create a transport
      --desc <text>                       Transport description  (required)
      --package <pkg>                     Target package  (required)
  list                                    List transports
      --user <user>                       Filter by user (default: DEVELOPER)
  release <number>                        Release a transport

DATA DICTIONARY — Tables and CDS views
  cds <name>                              Get CDS source
  table <name>                            Get table definition

PACKAGE — List contents and check package existence
  exists <name>                           Check if package exists
  list <name>                             List package contents
  tree <name>                             List package contents recursively
      --type <type>                       Filter by object type: CLAS, PROG, TABL, INTF, FUGR
      --max-depth <n>                     Maximum recursion depth (default: 50)

DISCOVER — Discover available ADT services
  services                                Discover ADT services

CREDENTIALS
  login                                     Save connection credentials
  logout                                    Remove saved credentials

GLOBAL FLAGS
  --host <host>                           SAP hostname (default: localhost)
  --port <port>                           SAP port (default: 50000)
  --user <user>                           SAP username (default: DEVELOPER)
  --password <pass>                       SAP password
  --password-env <var>                    Read password from env var (default: SAP_PASSWORD)
  --client <num>                          SAP client (default: 001)
  --https                                 Use HTTPS
  --insecure                              Skip TLS verification (with --https)
  --json                                  JSON output
  --timeout <sec>                         Request timeout in seconds
  --session-file <path>                   Persist session for lock/write/unlock workflows
  --color                                 Force colored output
  --no-color                              Disable colored output
  -v                                      Verbose logging (INFO level)
  -vv                                     Debug logging (DEBUG level)

  Credential priority: flags > --password-env > .adt.creds (via login) > SAP_PASSWORD env var

EXIT CODES
  0  Success          1  Connection/auth     2  Not found
  3  Clone error      4  Pull error          5  Activation error
  6  Lock conflict    7  Test failure        8  ATC check error
  9  Transport error  10 Timeout             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.3.7-py3-none-win_amd64.whl (3.5 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3macOS 11.0+ ARM64

erpl_adt-2026.3.7-py3-none-macosx_10_15_x86_64.whl (4.3 MB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

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

File metadata

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

File hashes

Hashes for erpl_adt-2026.3.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b4fb02880bec60bab482d7db985f42b40146c387f15e1acf0a7c3e982d5821eb
MD5 85aa959a401e5b7544e670fa38d4a265
BLAKE2b-256 9b6db5835611051cd157a7f39d1edb3b2e7ea1bbc9f159280d5f40c3eed2f449

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.3.7-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.3.7-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for erpl_adt-2026.3.7-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 74545f3396b5bd39d5c2ff6f704b73322351ec206bbcf1d6af33362dd8535b22
MD5 37ec899a0718730f5cd4088d298b841f
BLAKE2b-256 363d6cd986d85b12f8ae0f7db2cb3f0aa7566a7effec8e870576a56e2b248eb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.3.7-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.3.7-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for erpl_adt-2026.3.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44df5bd498ac0ef759cf9a0bf99d3dc35d922d5be39c5f86248e342075e14f46
MD5 99e4ed64863cd21d94962a802a1f0491
BLAKE2b-256 3127b3fbd3b43adb54e5eaffe5f639620f50839da5d9a25be2aaabd90766d326

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.3.7-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.3.7-py3-none-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for erpl_adt-2026.3.7-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3d9dca366b44e60472e9a787c4777cec01180b3f1ee83d75f8500f2f25d54ccc
MD5 9af2a796e150dd8141179b27a2c67861
BLAKE2b-256 955c78759c4ea7886779b27e4f7c8bde9590e02dd37fd7c6c11f821e7bf7df5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for erpl_adt-2026.3.7-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