We are currently using nested sub commands for our cli. This has a couple of drawbacks:
Poor discoverability of commands. You have to run santa namespace --help to know what commands are available
Increased internal complexity
Proposal
Use a flat hierarchy of commands. Example:
GraphQL Santa - 🎄Delightful GraphQL Application Framework
Usage
$ graphql-santa command [flags]
Commands
dev Develop your application in watch mode
build Build a production-ready server
generate Generate the artifacts
doctor Check your project state for any problems
create:app Setup a ready-to-use graphql-santa
create:plugin Setup a plugin
db:init Initialize your database
db:migrate:plan Generate a migration file
db:migrate:apply Apply a migration to your database
db:migrate:rollback Rollback a migration to your database
Examples
Initialize files for a new graphql-santa project
$ graphql-santa create:app
Start developing and watch your changes locally
$ graphql-santa dev
Build a production-ready server
$ graphql-santa build
Description
We are currently using nested sub commands for our cli. This has a couple of drawbacks:
santa namespace --help
to know what commands are availableProposal
Use a flat hierarchy of commands. Example: