webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Expose CLI commands to JS api

Open kedrzu opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Sometimes there is a need to use CLI command in a JS script, for example, in a custom CI pipeline. Currently, we have to do it with running the CLI as a child process (ie. using execa). We even do it in our own code to retrieve stack output (check this https://github.com/webiny/webiny-js/blob/next/packages/cli-plugin-deploy-pulumi/utils/getStackOutput.js#L14).

Describe the solution you'd like.

We should have all of our CLI commands inside our packages to be used programmatically. CLI should be merely a wrapper to access these commands from a terminal.

Describe alternatives you've considered.

No response

kedrzu avatar Feb 16 '22 10:02 kedrzu

This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.

webiny-bot avatar Jun 17 '22 07:06 webiny-bot