fastify / fastify-cli

Run a Fastify application with one command!
MIT License
644 stars 160 forks source link

feat: add `fastify install` command #696

Open matthyk opened 6 months ago

matthyk commented 6 months ago

First draft for a new fastify-cli command called install. This command can be used for any existing Fastify project to browse and install Fastify core plugins. Usage is as follows:

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



TODO's:
* [ ] Add tests
* [ ] update documentation
* [ ] Optimize search functionality

#### Checklist

- [x] run `npm run test` and `npm run benchmark`
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [x] commit message and code follows the [Developer's Certification of Origin](https://github.com/fastify/.github/blob/master/CONTRIBUTING.md#developers-certificate-of-origin-11)
      and the [Code of conduct](https://github.com/fastify/.github/blob/master/CODE_OF_CONDUCT.md)
matthyk commented 6 months ago

@mcollina Is this approach feasible? Some points that still need to be clarified for me:

mcollina commented 6 months ago

use the latest version and switch the CLI to esm, there is no real need for the CLI to be CJS.