Open matthyk opened 6 months ago
@mcollina Is this approach feasible? Some points that still need to be clarified for me:
8.x
since later versions are ESM modulesdevDependencies
in package.json
. I am open to other/better approachesuse the latest version and switch the CLI to esm, there is no real need for the CLI to be CJS.
First draft for a new
fastify-cli
command calledinstall
. This command can be used for any existing Fastify project to browse and install Fastify core plugins. Usage is as follows:fastify install my-project
: Launches an interactive CLI powered by Inquirer.js and the selected plugins will be installed in the foldermy-project
. A package.json must already exist in this folder.fastify install my-project --search sql
: The CLI searches for any core plugin matching the given word and let the user select from the found pluginsfastify help install
shows:Launches an interactive CLI application that allows you to browse and install Fastify plugins. Requires an existing
package.json
file in the specified folder.OPTS
--search, -s search for plugins containing the given word