🚀 Proposal: Add CLI Support for Headless Migration Execution
Hi Team,
First of all, thank you for maintaining this project - it’s already a very useful tool for SAP Cloud Integration migrations.
I would like to propose the addition of a Command-Line Interface (CLI) that enables headless execution of migration tasks. This would complement the current UI-based approach and make the tool easier to integrate into CI/CD pipelines, job schedulers, and automated scripts.
Motivation
- Many enterprise users prefer automation for repeatable migration activities.
- A CLI would reduce manual effort and allow the tool to be embedded into existing DevOps workflows.
- It aligns with the project’s goal of providing flexibility beyond the official Postman collection.
Proposed Scope (initial version)
cpi-migrate init → Configure source/target tenants and authentication.
cpi-migrate list → List migration tasks or integration packages.
cpi-migrate run <taskId> → Trigger a migration task.
cpi-migrate status <taskId> → Retrieve task progress and status.
Implementation Notes
- Developed in TypeScript, consistent with the recent repo migration.
- Likely using Commander.js
- Reuse of existing srv/ services and api/ clients to avoid code duplication.
- Packaged inside the current repo under a cli/ folder (unless you prefer a separate npm package).
Questions for Maintainers
Before starting development, I’d like to confirm a few points:
- Would you be open to including CLI support in this repository?
- Do you prefer the CLI to be packaged within the repo or as a standalone npm package?
- Do you have a preference for the CLI framework (e.g., Commander.js, oclif, yargs)?
If this proposal is approved, I will prepare an initial PR implementing the list and run commands, followed by status and configuration handling.
Thank you for considering this enhancement. Looking forward to your feedback!
Best,
Hi @king04aman ,
Thank you for your proposal and detailed description.
Absolutely, we welcome any contributions which would enhance the user experience or functionality, especially if they would be relevant/beneficial for the broader user base, as opposed to customer-specific customizations.
The proposed approach / technology stack is fine for me. Whichever you prefer based on your expertise. We can keep it in a /cli folder for ease of code re-use instead of a separate package. Kindly try to separate the code as much as possible and/or create a dedicated projection service if needed to limit possible interference.
As a guideline, I would mainly focus on those tasks which are typically automated (sync tenant, run task, get task progress, ..) and less on the once-off tasks which might be easier via the UI (register tenant, configure task, ..). Though, feel free to propose your changes as you wish.
Let's also find a suitable name for the cli as I would refrain from using the unofficial cpi abbreviation.
Thanks Willem
Hi @willempardaens,
Thanks a lot for the guidance. I’ll keep the CLI focused on the core automation tasks (tenant sync, run task, get status) and place it under a /cli folder with minimal coupling to the existing code.
For naming, I’d like to propose a few options for discussion:
- mtci (Migration Tool for Cloud Integration)
- neo2cf
- cloud-migrate
I’ll proceed with an initial implementation of the list and run commands, and we can refine the name further during review if needed.
Best, Aman