A powerful, POSIX-compliant CLI and REST API tool that combines SAP ABAP Development Tools (ADT) REST services.
- CLI Mode: POSIX-compliant command-line interface for developers
- Server Mode: REST API for web applications and integrations
- Connection Caching: 5-10x faster subsequent operations (30min cache)
- Smart Session Management: Automatic connection reuse and cleanup
- Lightweight Ping Tests: Validates cached connections efficiently
- Connect to SAP systems via ADT REST services
- Retrieve ABAP programs, classes, functions, structures, tables, interfaces
- Search and browse SAP repository
- List packages and objects
- Create and update ABAP objects
- Standard exit codes (0, 1, 2, 130, 143)
- Proper signal handling (SIGINT, SIGTERM)
- Clean argument parsing
- Consistent error reporting
- Quiet Mode Default: Minimal CLI output for clean automation
- File Logging: Comprehensive logging to files with
--log-fileoption - Flexible Output Modes: Choose between quiet, normal, and verbose modes
- Environment Variable Support: Configure via
ABAPER_LOG_FILEand other env vars
brew install bluefunda/tap/abaper# Pull latest image
docker pull bluefunda/abaper:latest
# Run CLI
docker run --rm bluefunda/abaper:latest abaper --version
# Run server
docker run -p 8080:8080 bluefunda/abaper:latest abaper --serverDownload pre-built binaries from the releases page:
# AMD64
curl -L https://github.com/bluefunda/abaper/releases/latest/download/abaper_Linux_x86_64.tar.gz | tar xz
# ARM64 (e.g., Raspberry Pi 4, AWS Graviton)
curl -L https://github.com/bluefunda/abaper/releases/latest/download/abaper_Linux_arm64.tar.gz | tar xz
# ARMv7 (e.g., Raspberry Pi 3)
curl -L https://github.com/bluefunda/abaper/releases/latest/download/abaper_Linux_armv7.tar.gz | tar xz# Intel Macs
curl -L https://github.com/bluefunda/abaper/releases/latest/download/abaper_Darwin_x86_64.tar.gz | tar xz
# Apple Silicon Macs
curl -L https://github.com/bluefunda/abaper/releases/latest/download/abaper_Darwin_arm64.tar.gz | tar xzDownload abaper_Windows_x86_64.zip from the releases page and extract.
# Debian/Ubuntu
wget https://github.com/bluefunda/abaper/releases/latest/download/abaper_amd64.deb
sudo dpkg -i abaper_amd64.deb
# Red Hat/CentOS/Fedora
wget https://github.com/bluefunda/abaper/releases/latest/download/abaper_amd64.rpm
sudo rpm -i abaper_amd64.rpm
# Alpine
wget https://github.com/bluefunda/abaper/releases/latest/download/abaper_amd64.apk
sudo apk add --allow-untrusted abaper_amd64.apk# Required for SAP operations
export SAP_HOST="your-sap-host:8000"
export SAP_CLIENT="100"
export SAP_USERNAME="your-username"
export SAP_PASSWORD="your-password"
# Optional: Default log file
export ABAPER_LOG_FILE="./logs/abaper.log"# Test connection (establishes cache)
abaper connect
# Get objects (uses cached connection - fast!)
abaper get program ZTEST
abaper get class ZCL_UTILITY
abaper get function RFC_READ_TABLE SRFC
# Search and discovery
abaper search objects "Z*"
abaper list packages
# Get help
abaper help
abaper help get# Default quiet mode (minimal output)
abaper get program ZTEST
# Quiet mode with comprehensive file logging
abaper --log-file=./logs/abaper.log get program ZTEST
# Normal mode with standard CLI output
abaper --normal analyze class ZCL_TEST
# Verbose debugging with file logging
abaper --verbose --log-file=./debug.log connect
# Use environment variable for consistent logging
export ABAPER_LOG_FILE="./logs/abaper-$(date +%Y%m%d).log"
abaper get program ZTESTabaper [OPTIONS] ACTION TYPE [NAME] [ARGS...]get- Retrieve ABAP object source codesearch- Search for ABAP objectslist- List objects (packages, etc.)connect- Test ADT connectionhelp- Show help information
program- ABAP program/reportclass- ABAP classfunction- ABAP function module (requires function group)include- ABAP includeinterface- ABAP interfacestructure- ABAP structuretable- ABAP tablepackage- ABAP package
-h, --help- Show help message-v, --version- Show version information-q, --quiet- Quiet mode (DEFAULT - minimal CLI output)--normal- Normal mode (show standard output)-V, --verbose- Enable verbose output with debug info--log-file=FILE- Log to specified file (auto-creates directory)--server- Run as REST API server-p, --port PORT- Port for server mode (default: 8080)--adt-host=HOST- SAP system host--adt-client=CLIENT- SAP client--adt-username=USER- SAP username--adt-password=PASS- SAP password
0- Success1- General error2- Invalid usage130- Interrupted by user (Ctrl+C)143- Terminated by signal
- First Command: ~3-5 seconds (authentication + cache)
- Subsequent Commands: ~0.5-1 seconds (uses cache!)
- Cache Duration: 30 minutes
- Smart Validation: Automatic ping tests and cleanup
# First command establishes cache
time abaper connect # ~4 seconds
# Subsequent commands are lightning fast
time abaper get program ZTEST # ~0.6 seconds
time abaper get class ZCL_TEST # ~0.5 seconds
time abaper list packages # ~0.5 seconds- Automatic expiration after 30 minutes
- Config change detection (different SAP system/credentials)
- Connection health monitoring via ping tests
- Graceful cleanup on exit
# Programs
abaper get program ZTEST
abaper get program Z_REPORT_SALES
# Classes
abaper get class ZCL_UTILITY_HELPER
abaper get class CL_STANDARD_CLASS
# Functions (requires function group)
abaper get function Z_CALCULATE_TAX Z_TAX_GROUP
abaper get function RFC_READ_TABLE SRFC
# Other objects
abaper get include ZINCLUDE_TOP
abaper get interface ZIF_BUSINESS_LOGIC
abaper get structure ZSTR_CUSTOMER_DATA
abaper get table ZTABLE_PRODUCTS
abaper get package $TMP# Search objects by pattern
abaper search objects "Z*"
abaper search objects "CL_SALES*" class
abaper search objects "*INTEGRATION*" program class
# List packages
abaper list packages
abaper list packages "Z*"
abaper list packages "*DEV*"# Test connection
abaper connect
# Get help
abaper help # General help
abaper help get # Help for 'get' command
abaper help analyze # Help for 'analyze' command# Default port 8080
abaper --server
# Custom port
abaper --server -p 9000
# Quiet mode with file logging
abaper --server --log-file=./logs/server.logGET /health- Health checkGET /version- Version information
For Docker deployment examples, see examples/docker/.
# Quick start with published image
docker run -p 8080:8080 \
-e SAP_HOST="your-host:8000" \
-e SAP_USERNAME="your-user" \
-e SAP_PASSWORD="your-password" \
bluefunda/abaper:latest \
abaper --server# Clone repository
git clone https://github.com/bluefunda/abaper
cd abaper
# Build for development
go build -o abaper .
# Run tests
go test ./...
# Format code
go fmt ./...# Test full release build locally (without publishing)
goreleaser build --snapshot --clean
# Test release process (dry run)
goreleaser release --snapshot --clean# Quick development builds
go run . --version
go run . connect
# Format and validate
go fmt ./...
go vet ./...
# Run tests
go test ./...
# Build optimized binary
go build -ldflags="-s -w" -o abaper .# Test basic connectivity
abaper connect
# Verbose logging to see cache behavior
abaper --verbose --log-file=./debug.log get program ZTEST
# Check credentials
echo $SAP_HOST $SAP_USERNAME- "ADT host not configured": Set
SAP_HOSTenvironment variable - "Authentication failed": Verify
SAP_USERNAMEandSAP_PASSWORD - "SICF services not found": Activate ADT services in transaction SICF
- Cache issues: Cache automatically expires after 30 minutes
# See detailed logs including cache hits/misses
abaper --verbose --log-file=./debug.log connect
abaper --verbose --log-file=./debug.log get program ZTEST
# Cache status information (in log file)
{"level":"debug","msg":"Using cached ADT client","cache_age":"5m30s"}
{"level":"info","msg":"ADT cache miss","cache_expired":true}Releases are automated via GitHub Actions and GoReleaser when you push a tag:
# Create and push a new release
git tag v1.0.0
git push origin v1.0.0
# GitHub Actions automatically:
# - Builds for all supported platforms
# - Creates GitHub release with binaries
# - Updates Homebrew formula
# - Publishes Docker images
# - Generates checksums and changelogs- Linux: x86_64, ARM64, ARMv6, ARMv7
- macOS: x86_64 (Intel), ARM64 (Apple Silicon)
- Windows: x86_64
- FreeBSD: x86_64
- Archives: tar.gz (Unix), zip (Windows)
- Linux Packages: DEB, RPM, APK
- Package Managers: Homebrew (macOS)
- Container Images: Multi-architecture Docker images
abaper/
βββ main.go # Main application entry point
βββ cli.go # Command-line interface handlers
βββ adt_client.go # SAP ADT client implementation
βββ rest/ # REST API server components
βββ .goreleaser.yml # GoReleaser configuration
βββ .github/workflows/ # GitHub Actions CI/CD
β βββ release.yml # Automated release workflow
βββ examples/ # Usage examples
β βββ docker/ # Docker deployment examples
βββ Dockerfile # Container image definition
βββ go.mod # Go module definition
βββ go.sum # Go dependencies
βββ LICENSE # Apache 2.0 license
βββ README.md # This documentation
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes following POSIX standards
- Test thoroughly:
go test ./... - Test builds:
go build -o abaper . - Commit:
git commit -am 'Add new feature' - Push:
git push origin feature/new-feature - Create a Pull Request
- Use standard Go tooling (
go build,go test,go fmt) - Ensure POSIX compliance for all new features
- Add appropriate tests and documentation
- Test file logging functionality with
--log-fileoption
Copyright (c) 2025 BlueFunda, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
- Repository: https://github.com/bluefunda/abaper
- Releases: https://github.com/bluefunda/abaper/releases
- Docker Images: https://hub.docker.com/r/bluefunda/abaper
- Issues: https://github.com/bluefunda/abaper/issues
- Organization: BlueFunda, Inc.
Built with β€οΈ by BlueFunda, Inc. - Making ABAP development faster, smarter, and more secure.