SAP Business Application Studio (BAS) is a modern, cloud-based development environment that offers powerful tools for developing SAP applications such as SAP Fiori, SAPUI5, CAP-based services, and more. While the graphical user interface (GUI) is feature-rich, working with the Command Line Interface (CLI) in BAS unlocks deeper control, flexibility, and efficiency in development workflows.
This article introduces the CLI in BAS, its benefits, common commands, and practical use cases for SAP developers.
The CLI in BAS provides a text-based interface for executing tasks that might otherwise require multiple clicks in a GUI. It is especially useful for:
By leveraging CLI, developers can significantly speed up their workflow, especially when handling repetitive or advanced tasks.
To use the CLI in BAS:
This terminal supports standard Linux commands, Node.js-based tools, Git, and SAP-specific CLI tools like the Cloud MTA Build Tool, CDS CLI, and more.
Used for Cloud Application Programming model development.
cds init my-cap-project # Initializes a new CAP project
cds add mta # Adds an MTA descriptor
cds watch # Starts the development server with live reload
Used for managing JavaScript dependencies.
npm install # Installs all dependencies from package.json
npm start # Starts the application
npm run build # Runs a custom build script
Used for version control and collaboration.
git clone <repo-url> # Clones a Git repository
git add . # Stages all changes
git commit -m "message" # Commits changes
git push # Pushes changes to remote repo
For building multi-target applications (MTA).
mbt build # Builds the MTA archive
Used to deploy applications to the SAP BTP Cloud Foundry environment.
cf login # Logs in to Cloud Foundry
cf push # Deploys the application
cf apps # Lists deployed apps
ls – List files in the directorycd <folder> – Change directorymkdir <name> – Create a new folderrm <file> – Remove a filetouch <file> – Create a new fileThese help you navigate and manage your file system efficiently within BAS.
cds init or Yeoman generators to scaffold projects.cds watch or npm test.mbt and cf to package and deploy applications..bashrc or .bash_profile for frequently used commands.&& or | for streamlined execution.Mastering the Command Line Interface in SAP Business Application Studio allows developers to streamline tasks, work more efficiently, and have greater control over their projects. Whether you're managing version control, deploying to the cloud, or scaffolding a new app, the CLI is an indispensable tool in the SAP development toolkit.
For developers aiming to become more productive and proficient in SAP BAS, learning to leverage the CLI is a must.