# jfilak/sapcli architecture

> Architecture diagram of the GitHub repository jfilak/sapcli, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jfilak/sapcli
- Repository: https://github.com/jfilak/sapcli

## Overview

SAP CLI is a command-line client for SAP products, centered on sending ADT operations to ABAP systems and presenting results to developers and CI tools. Its documented workflow includes running ABAP Unit tests and coverage, performing ATC checks, managing ABAP repository objects, and working with transports and gCTS; it also offers ABAP execution and limited RFC functionality. Configuration and authentication support named contexts and optional auth plugins. The graph preserves these documented branches, while sampled-source evidence is limited; unsampled subsystem relationships are shown only where the README supports them.

Main entry points: [`sap/cli/__init__.py`](https://github.com/jfilak/sapcli/blob/master/sap/cli/__init__.py) (CLI commands), [`sap/adt/objects.py`](https://github.com/jfilak/sapcli/blob/master/sap/adt/objects.py) (ABAP objects), [`sap/http/client.py`](https://github.com/jfilak/sapcli/blob/master/sap/http/client.py) (HTTP client), [`sap/cli/object.py`](https://github.com/jfilak/sapcli/blob/master/sap/cli/object.py) (Object commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and configuration"]
  node_cli_entry["CLI commands<br/>[__init__.py]"]
  node_cli_core["Command core<br/>[core.py]"]
  node_cli_objects["Object commands<br/>[object.py]"]
  node_config["Contexts and config<br/>[config.py]"]
end

subgraph group_adt["ADT operations"]
  node_adt_connection["ADT connection<br/>[core.py]"]
  node_adt_objects["ABAP objects<br/>[objects.py]"]
  node_adt_functions["Functions and programs<br/>[function.py]"]
  node_adt_wb["Workbench operations<br/>[wb.py]"]
  node_adt_text["Program text elements<br/>[textelements.py]"]
  node_adt_marshalling["XML marshalling<br/>[marshalling.py]"]
  node_adt_annotations["XML annotations<br/>[annotations.py]"]
  node_adt_whereused["Where-used lookup<br/>[whereused.py]"]
  node_adt_repo["Repository browsing<br/>[repository.py]"]
  node_testing["Unit tests and coverage<br/>[aunit.py]"]
  node_coverage["Coverage analysis<br/>[acoverage.py]"]
  node_atc["ATC checks<br/>[checks.py]"]
  node_services["Service definitions<br/>[businessservice.py]"]
  node_abap_run["ABAP execution<br/>[run.py]"]
  node_flp["Launchpad building<br/>[builder.py]"]
end

subgraph group_http["Connections and auth"]
  node_http_client["HTTP client<br/>[client.py]"]
  node_auth["Authentication<br/>[auth_plugin.py]"]
  node_odata["OData connection<br/>[connection.py]"]
end

subgraph group_delivery["Transport and Git"]
  node_gcts["gCTS operations"]
  node_transports["Transport operations<br/>[cts.py]"]
  node_abapgit["abapGit support<br/>[abapgit.py]"]
end

subgraph group_rfc["RFC capabilities"]
  node_rfc_core["RFC connection<br/>[core.py]"]
  node_rfc_bapi["BAPI operations<br/>[bapi.py]"]
end

node_developer(("Developer or CI"))

node_developer -->|"runs commands"| node_cli_entry
node_cli_entry -->|"selects context"| node_config
node_cli_entry -->|"runs tests"| node_testing
node_cli_entry -->|"requests coverage"| node_coverage
node_cli_entry -->|"runs checks"| node_atc
node_cli_entry -->|"manages objects"| node_adt_objects
node_cli_entry -->|"runs snippets"| node_abap_run
node_cli_entry -->|"operates transports"| node_transports
node_cli_entry -->|"operates gCTS"| node_gcts
node_cli_entry -->|"installs abapGit"| node_abapgit
node_cli_entry -->|"uses RFC features"| node_rfc_core
node_cli_objects -->|"uses workbench"| node_adt_wb
node_cli_objects -->|"uses lookup"| node_adt_whereused
node_cli_objects -->|"uses text elements"| node_adt_text
node_adt_wb -->|"operates objects"| node_adt_objects
node_adt_objects -->|"sends requests"| node_adt_connection
node_adt_objects -->|"serializes data"| node_adt_marshalling
node_adt_marshalling -->|"reads metadata"| node_adt_annotations
node_adt_text -->|"extends programs"| node_adt_objects
node_testing -.->|"measures coverage"| node_coverage
node_adt_connection -.->|"uses HTTP"| node_http_client
node_http_client -.->|"supports plugins"| node_auth
node_services -->|"exposes services"| node_odata
node_odata -->|"uses HTTP"| node_http_client
node_gcts -->|"uses HTTP"| node_http_client
node_rfc_bapi -->|"uses connection"| node_rfc_core

click node_cli_entry "https://github.com/jfilak/sapcli/blob/master/sap/cli/__init__.py"
click node_cli_core "https://github.com/jfilak/sapcli/blob/master/sap/cli/core.py"
click node_cli_objects "https://github.com/jfilak/sapcli/blob/master/sap/cli/object.py"
click node_config "https://github.com/jfilak/sapcli/blob/master/sap/config.py"
click node_adt_connection "https://github.com/jfilak/sapcli/blob/master/sap/adt/core.py"
click node_adt_objects "https://github.com/jfilak/sapcli/blob/master/sap/adt/objects.py"
click node_adt_functions "https://github.com/jfilak/sapcli/blob/master/sap/adt/function.py"
click node_adt_wb "https://github.com/jfilak/sapcli/blob/master/sap/adt/wb.py"
click node_adt_text "https://github.com/jfilak/sapcli/blob/master/sap/adt/textelements.py"
click node_adt_marshalling "https://github.com/jfilak/sapcli/blob/master/sap/adt/marshalling.py"
click node_adt_annotations "https://github.com/jfilak/sapcli/blob/master/sap/adt/annotations.py"
click node_adt_whereused "https://github.com/jfilak/sapcli/blob/master/sap/adt/whereused.py"
click node_adt_repo "https://github.com/jfilak/sapcli/blob/master/sap/adt/repository.py"
click node_testing "https://github.com/jfilak/sapcli/blob/master/sap/adt/aunit.py"
click node_coverage "https://github.com/jfilak/sapcli/blob/master/sap/adt/acoverage.py"
click node_atc "https://github.com/jfilak/sapcli/blob/master/sap/adt/checks.py"
click node_services "https://github.com/jfilak/sapcli/blob/master/sap/adt/businessservice.py"
click node_http_client "https://github.com/jfilak/sapcli/blob/master/sap/http/client.py"
click node_auth "https://github.com/jfilak/sapcli/blob/master/sap/http/auth_plugin.py"
click node_odata "https://github.com/jfilak/sapcli/blob/master/sap/odata/connection.py"
click node_gcts "https://github.com/jfilak/sapcli/tree/master/sap/rest/gcts"
click node_transports "https://github.com/jfilak/sapcli/blob/master/sap/adt/cts.py"
click node_abapgit "https://github.com/jfilak/sapcli/blob/master/sap/platform/abap/abapgit.py"
click node_rfc_core "https://github.com/jfilak/sapcli/blob/master/sap/rfc/core.py"
click node_rfc_bapi "https://github.com/jfilak/sapcli/blob/master/sap/rfc/bapi.py"
click node_abap_run "https://github.com/jfilak/sapcli/blob/master/sap/platform/abap/run.py"
click node_flp "https://github.com/jfilak/sapcli/blob/master/sap/flp/builder.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_entry,node_cli_core,node_cli_objects,node_config toneBlue
class node_adt_connection,node_adt_objects,node_adt_functions,node_adt_wb,node_adt_text,node_adt_marshalling,node_adt_annotations,node_adt_whereused,node_adt_repo,node_testing,node_coverage,node_atc,node_services,node_abap_run,node_flp toneAmber
class node_http_client,node_auth,node_odata toneMint
class node_gcts,node_transports,node_abapgit toneRose
class node_rfc_core,node_rfc_bapi,node_developer toneIndigo
```

## Components

### CLI and configuration

- [CLI commands](https://github.com/jfilak/sapcli/blob/master/sap/cli/__init__.py): `sap/cli/__init__.py`
- [Command core](https://github.com/jfilak/sapcli/blob/master/sap/cli/core.py): `sap/cli/core.py`
- [Object commands](https://github.com/jfilak/sapcli/blob/master/sap/cli/object.py): `sap/cli/object.py`
- [Contexts and config](https://github.com/jfilak/sapcli/blob/master/sap/config.py): `sap/config.py`

### ADT operations

- [ADT connection](https://github.com/jfilak/sapcli/blob/master/sap/adt/core.py): `sap/adt/core.py`
- [ABAP objects](https://github.com/jfilak/sapcli/blob/master/sap/adt/objects.py): `sap/adt/objects.py`
- [Functions and programs](https://github.com/jfilak/sapcli/blob/master/sap/adt/function.py): `sap/adt/function.py`
- [Workbench operations](https://github.com/jfilak/sapcli/blob/master/sap/adt/wb.py): `sap/adt/wb.py`
- [Program text elements](https://github.com/jfilak/sapcli/blob/master/sap/adt/textelements.py): `sap/adt/textelements.py`
- [XML marshalling](https://github.com/jfilak/sapcli/blob/master/sap/adt/marshalling.py): `sap/adt/marshalling.py`
- [XML annotations](https://github.com/jfilak/sapcli/blob/master/sap/adt/annotations.py): `sap/adt/annotations.py`
- [Where-used lookup](https://github.com/jfilak/sapcli/blob/master/sap/adt/whereused.py): `sap/adt/whereused.py`
- [Repository browsing](https://github.com/jfilak/sapcli/blob/master/sap/adt/repository.py): `sap/adt/repository.py`
- [Unit tests and coverage](https://github.com/jfilak/sapcli/blob/master/sap/adt/aunit.py): `sap/adt/aunit.py`
- [Coverage analysis](https://github.com/jfilak/sapcli/blob/master/sap/adt/acoverage.py): `sap/adt/acoverage.py`
- [ATC checks](https://github.com/jfilak/sapcli/blob/master/sap/adt/checks.py): `sap/adt/checks.py`
- [Service definitions](https://github.com/jfilak/sapcli/blob/master/sap/adt/businessservice.py): `sap/adt/businessservice.py`
- [ABAP execution](https://github.com/jfilak/sapcli/blob/master/sap/platform/abap/run.py): `sap/platform/abap/run.py`
- [Launchpad building](https://github.com/jfilak/sapcli/blob/master/sap/flp/builder.py): `sap/flp/builder.py`

### Connections and auth

- [HTTP client](https://github.com/jfilak/sapcli/blob/master/sap/http/client.py): `sap/http/client.py`
- [Authentication](https://github.com/jfilak/sapcli/blob/master/sap/http/auth_plugin.py): `sap/http/auth_plugin.py`
- [OData connection](https://github.com/jfilak/sapcli/blob/master/sap/odata/connection.py): `sap/odata/connection.py`

### Transport and Git

- [gCTS operations](https://github.com/jfilak/sapcli/tree/master/sap/rest/gcts): `sap/rest/gcts`
- [Transport operations](https://github.com/jfilak/sapcli/blob/master/sap/adt/cts.py): `sap/adt/cts.py`
- [abapGit support](https://github.com/jfilak/sapcli/blob/master/sap/platform/abap/abapgit.py): `sap/platform/abap/abapgit.py`

### RFC capabilities

- [RFC connection](https://github.com/jfilak/sapcli/blob/master/sap/rfc/core.py): `sap/rfc/core.py`
- [BAPI operations](https://github.com/jfilak/sapcli/blob/master/sap/rfc/bapi.py): `sap/rfc/bapi.py`

### Other components

- **Developer or CI**

## Connections

- Developer or CI → CLI commands: runs commands (evidence: `README.md`)
- CLI commands → Contexts and config: selects context (evidence: `README.md`)
- CLI commands → Unit tests and coverage: runs tests (evidence: `README.md`)
- CLI commands → Coverage analysis: requests coverage (evidence: `README.md`)
- CLI commands → ATC checks: runs checks (evidence: `README.md`)
- CLI commands → ABAP objects: manages objects (evidence: `README.md`)
- CLI commands → ABAP execution: runs snippets (evidence: `README.md`)
- CLI commands → Transport operations: operates transports (evidence: `README.md`)
- CLI commands → gCTS operations: operates gCTS (evidence: `README.md`)
- CLI commands → abapGit support: installs abapGit (evidence: `README.md`)
- CLI commands → RFC connection: uses RFC features (evidence: `README.md`)
- Object commands → Workbench operations: uses workbench (evidence: `sap/cli/object.py`)
- Object commands → Where-used lookup: uses lookup (evidence: `sap/cli/object.py`)
- Object commands → Program text elements: uses text elements (evidence: `sap/cli/object.py`)
- Workbench operations → ABAP objects: operates objects (evidence: `sap/adt/wb.py`)
- ABAP objects → ADT connection: sends requests (evidence: `sap/adt/objects.py`)
- ABAP objects → XML marshalling: serializes data (evidence: `sap/adt/objects.py`)
- XML marshalling → XML annotations: reads metadata (evidence: `sap/adt/marshalling.py`)
- Program text elements → ABAP objects: extends programs (evidence: `sap/adt/textelements.py`)
- Unit tests and coverage → Coverage analysis: measures coverage
- ADT connection → HTTP client: uses HTTP
- HTTP client → Authentication: supports plugins
- Service definitions → OData connection: exposes services (evidence: `sap/adt/businessservice.py`)
- OData connection → HTTP client: uses HTTP (evidence: `sap/odata/connection.py`)
- gCTS operations → HTTP client: uses HTTP (evidence: `sap/rest/gcts/remote_repo.py`)
- BAPI operations → RFC connection: uses connection (evidence: `sap/rfc/bapi.py`)
