Skip to main content

adt CLI Reference

adt is the command-line entry point to every capability exposed by SAP ABAP Development Tools (ADT). Commands are thin wrappers around typed contracts from @abapify/adt-client and business services from @abapify/adk.

Run adt --help or adt <command> --help to see the live help text; this section documents each command group in depth.

Global options

These options are accepted by the root adt command and are inherited by every subcommand (they can appear anywhere on the command line):

FlagDescription
--sid <sid>SAP System ID (e.g. BHF, S0D). Overrides the default system picked by adt auth set-default.
-v, --verbose [components]Enable verbose logging. Optionally filter by component name (adt, http, auth, ...) or all.
--log-level <level>Log level: trace, debug, info, warn, error (default: info).
--log-output <dir>Output directory for log files (default: ./tmp/logs).
--log-response-filesSave ADT responses as separate files alongside logs.
--config <path>Path to a config file (default: adt.config.ts, or .adt/config.ts if present).
-h, --helpShow help.
-V, --versionPrint the CLI version.

Conventions

  • Auth is implicit. Every command that talks to SAP calls getAdtClientV2() internally; it reads the cached session from ~/.adt/auth.json (written by adt auth login). If no session exists or the token has expired, the command exits with an error.
  • Object names are upper-cased automatically — you can type zcl_foo or ZCL_FOO.
  • --json switches machine-readable output. Most commands print a human-readable table/summary by default and emit a structured JSON document with --json.
  • Exit codes: 0 = success, 1 = failure, 10 = not-found (for stat-style commands such as adt package stat).

Command groups

Authentication

CommandDescription
authlogin, logout, status, list, set-default, refresh

ABAP development objects

CommandDescription
class / interface / program / includeClassic source objects (CRUD: create / read / write / activate / delete)
domain / dataelement / table / structureDDIC metadata objects
ddl / dclCDS DDL sources and access controls
bdef / srvd / srvbRAP behavior definitions, service definitions and bindings
functionFunction groups and function modules
packageABAP package CRUD
badiBAdI / Enhancement implementations (ENHO/XHH)

Transports and versioning

CommandDescription
ctsTransport requests (tr, search, tree)
gctsgit-enabled CTS — repositories, branches, commits

Import / export (disk ⇄ SAP)

CommandDescription
checkoutDownload objects to abapGit-compatible files
checkinPush a local abapGit/gCTS directory into SAP
importImport an object, package, or transport

Source and locking

CommandDescription
sourceRead (get) and write (put) ABAP source
lock / unlock / locksLock handling

Testing and quality

CommandDescription
aunitRun ABAP Unit tests with coverage output (JaCoCo / Sonar)
checkSyntax check (checkruns)
datapreviewOpen SQL preview
abap runExecute an ad-hoc ABAP snippet
CommandDescription
wbWorkbench navigation — where-used, callers, callees, definition, outline
searchQuick object search
getResolve an object by name
lsList objects in the repository or local filesystem
userUser lookup
infoSystem and session information
discoveryADT discovery document
fetchRaw authenticated HTTP request

Security and admin

CommandDescription
strustPSE and certificate management

Fiori Launchpad and RFC

CommandDescription
flpFiori Launchpad inventory (read-only)
rfcSOAP-over-HTTP RFC function-module calls

Interactive

CommandDescription
replInteractive hypermedia navigator

Authenticating for the first time

adt auth login --sid DEV
# interactive: choose destination, enter credentials
adt auth status # confirm

Once authenticated, every other command re-uses the cached session.