new cli "frontend"
the cli uses https://github.com/dthree/vorpal which is veeeery deprecated
an interesting alternative is https://github.com/vadimdemedes/ink which is using react
abstraction
Before that, it makes sense to introduce an abstraction layer between catladder cli commands and whatever the frontend is.
such an abstraction could be declaration what a "command" is,
Currently a command is declared like this:
export default async (vorpal: Vorpal) => {
vorpal
.command(
"project-config-secrets [envComponent]",
"setup/update secrets stored in pass"
)
.autocomplete(await allEnvsAndAllComponents())
.action(async function ({ envComponent }) {
return await projectConfigSecrets(this, envComponent);
});
};
a first step could be to replace Vorpal
with our own type, but which as basically the same api.
then we would wire this to first the legacy Vorpal and then to our new cli
potential
with a proper abstraction, we could introduce new uis:
- shell call with args (non-interactive cli version)
- a web version (maybe through an api that runs locally)
Edited by Marco Wettstein