RFC: what is the vision for the CLI?
We had a think about refactoring the CLI. Some ideas for speeding up tests:
- install dependencies from the skeleton app once, possibly with initial app install
- use an in-memory fs so no need to ‘clean’ between tests
We are reluctant to implement anything though, because we think the CLI might be trying to do too much:
-
add
/remove
should be removed in favour of yarn/npm (https://gitlab.coko.foundation/pubsweet/pubsweet-cli/issues/70) -
setupdb
+adduser
— any logic for handling the database should be moved to the server.setupdb
would then be run as an npm script calling the relevant functions from inside the skeleton app. -
run
— we think the app startup script belongs in the skeleton app (https://gitlab.coko.foundation/pubsweet/pubsweet-cli/issues/81). -
new
— could be removed as, at the moment, just cloning a skeleton repo would be adequate. If more complex functionality is needed, a generator could provide it.
In short, we're not sure if we actually need the CLI.