Command line interface for the ABAPer platform. Communicates with ABAPer APIs exposed through the ABAPer gateway (abaper-gw).
# Install (macOS)
brew tap bluefunda/tap
brew install abaper
# Authenticate
abaper login
# Verify connection
abaper status
# Create and deploy an ABAP program
abaper generate --type program --name ZMY_REPORT
abaper deploy --type program --name ZMY_REPORT --source-file report.abapbrew tap bluefunda/tap
brew install abaperThis installs the binary and the man page automatically.
Download the binary for your platform from the releases page.
| Platform | Archive |
|---|---|
| macOS (ARM64) | abaper_<version>_darwin_arm64.tar.gz |
| macOS (AMD64) | abaper_<version>_darwin_amd64.tar.gz |
| Linux (AMD64) | abaper_<version>_linux_amd64.tar.gz |
| Linux (ARM64) | abaper_<version>_linux_arm64.tar.gz |
| Windows (AMD64) | abaper_<version>_windows_amd64.zip |
| Windows (ARM64) | abaper_<version>_windows_arm64.zip |
# macOS / Linux
curl -L https://github.com/bluefunda/abaper-cli/releases/latest/download/abaper_<version>_<os>_<arch>.tar.gz | tar xz
sudo mv abaper /usr/local/bin/go install github.com/bluefunda/abaper-cli/cmd/abaper@latestdocker pull bluefunda/abaper
docker run --rm bluefunda/abaper versionAuthenticate with the ABAPer platform using the OAuth2 device authorization flow. Opens a browser window for interactive login. Credentials are stored locally in ~/.abaper/tokens.yaml with restricted permissions (0600).
abaper loginClear stored credentials by removing the local token file.
abaper logoutShow connection and authentication status. Reports the configured base URL, realm, organization, authentication state, and API health.
abaper status
abaper status -o jsonCreate ABAP objects on the target SAP system. Supports programs, classes, and interfaces. Accepts source from a file or generates default templates.
# Generate with default template
abaper generate --type program --name ZMY_PROGRAM
# Generate from source file
abaper generate --type class --name ZCL_MY_CLASS --source-file my_class.abap
# Generate an interface
abaper generate --type interface --name ZIF_MY_INTERFACEFlags:
| Flag | Required | Default | Description |
|---|---|---|---|
--name |
Yes | — | Object name |
--type |
No | program |
Object type: program, class, interface |
--source-file |
No | — | Path to ABAP source file |
Upload source code and activate an ABAP object in a single step. Performs a save followed by activation, matching the workflow in ABAPer Editor.
abaper deploy --type program --name ZMY_PROGRAM --source-file program.abapFlags:
| Flag | Required | Default | Description |
|---|---|---|---|
--name |
Yes | — | Object name |
--type |
No | program |
Object type: program, class, interface |
--source-file |
Yes | — | Path to ABAP source file |
Run ABAP unit tests for an object on the target SAP system.
abaper test --type class --name ZCL_MY_CLASS
abaper test --type class --name ZCL_MY_CLASS -o jsonFlags:
| Flag | Required | Default | Description |
|---|---|---|---|
--name |
Yes | — | Object name |
--type |
No | class |
Object type: class, program |
List ABAP objects, optionally filtered by package or type.
abaper list objects --package ZDEV
abaper list objects --type programFlags:
| Flag | Required | Default | Description |
|---|---|---|---|
--package |
No | — | Filter by package name |
--type |
No | — | Filter by object type |
List contents of an ABAP package.
abaper list packages --name ZDEVSend a prompt to the ABAPer AI assistant and stream the response. Supports including ABAP source files as context and resuming existing chat sessions.
# Ask a question
abaper ai chat "Explain SELECT FOR ALL ENTRIES in ABAP"
# Include source context
abaper ai chat "Optimize this code" --context-file program.abap
# Resume a previous chat
abaper ai chat "What about performance?" --chat-id <previous-chat-id>
# JSON output for scripting
abaper ai chat "Review this code" --context-file report.abap -o jsonFlags:
| Flag | Required | Default | Description |
|---|---|---|---|
--model |
No | groq |
LLM model to use |
--context-file |
No | — | ABAP source file to include as context |
--chat-id |
No | — | Resume an existing chat session |
Print the CLI version.
abaper versionA Unix man page is included. After installing the binary from a release archive:
# Install the man page (included in release archives)
sudo install -m 644 man/abaper.1 /usr/local/share/man/man1/abaper.1
# Or using make
sudo make install-man
# Then use it like any other Unix command
man abaperThese flags are available on all commands:
| Flag | Description |
|---|---|
--base-url |
ABAPer API base URL (default: https://api.bluefunda.com) |
--realm |
Keycloak realm (default: trm) |
-o, --output |
Output format: text, json (default: text) |
All commands support --output json for machine-readable output, useful for scripting and CI/CD pipelines:
abaper status -o json | jq '.authenticated'Configuration is loaded in the following order of precedence:
- CLI flags —
--base-url,--realm - Environment variables —
ABAPER_BASE_URL,ABAPER_REALM,ABAPER_ORG - Config file —
~/.abaper/config.yaml
# ~/.abaper/config.yaml
base_url: https://api.bluefunda.com
realm: trm
org: default| Variable | Description |
|---|---|
ABAPER_BASE_URL |
Override the API base URL |
ABAPER_REALM |
Override the Keycloak realm |
ABAPER_ORG |
Override the organization |
| Path | Description |
|---|---|
~/.abaper/config.yaml |
Configuration file |
~/.abaper/tokens.yaml |
OAuth2 tokens (permissions: 0600) |
ABAPer CLI uses the OAuth2 device authorization flow via Keycloak (same flow as ABAPer VS Code extension):
abaper loginrequests a device code from the authorization server- Your browser opens to the verification URL
- The CLI polls for authorization completion
- Access and refresh tokens are stored locally
Tokens are automatically refreshed when expired. The CLI uses the cai-cli OAuth2 client ID.
The CLI is available as a Docker image on Docker Hub under bluefunda/abaper.
# Pull the latest image
docker pull bluefunda/abaper:latest
# Pull a specific version
docker pull bluefunda/abaper:v1.0.0
# Run a command
docker run --rm bluefunda/abaper version
docker run --rm bluefunda/abaper status -o json
# Mount config for authenticated commands
docker run --rm -v ~/.abaper:/root/.abaper bluefunda/abaper status- Go 1.25+
- golangci-lint (for linting)
make build # Build for current platform
make build-all # Cross-compile for all platforms
make test # Run tests
make lint # Run linter
make vet # Run go vetmake docker-build # Build Docker image
make docker-run # Run CLI in containerThe CLI follows the same API patterns as ABAPer Editor and ABAPer VS Code:
- Authentication: OAuth2 device authorization flow via Keycloak
- API Client: Calls ABAPer APIs through the KrakenD gateway (
abaper-gw) at/abaper/api/v1/* - Request Headers:
Authorization: Bearer <token>,X-Realm,X-SAP-*headers - Response Format:
{ "success": bool, "data": T, "error": string }
Releases are automated via release-please:
- Merge PRs with conventional commit titles
- release-please creates a Release PR with version bump and changelog
- Merging the Release PR triggers:
- GoReleaser builds multi-platform binaries (named
abaper_<version>_<os>_<arch>) - Binaries attached to GitHub Release
- Docker image pushed to
bluefunda/abaper
- GoReleaser builds multi-platform binaries (named