api-cli
Usage
$ npm install -g @jnig/chili-api-cli
$ chili-api-cli COMMAND
running command...
$ chili-api-cli (-v|--version|version)
@jnig/chili-api-cli/3.0.19 linux-x64 node-v14.17.4
$ chili-api-cli --help [COMMAND]
USAGE
$ chili-api-cli COMMAND
...
Commands
chili-api-cli create-api
chili-api-cli create-controller
chili-api-cli create-migration [NAME]
chili-api-cli create-routes [DIRECTORY]
chili-api-cli help [COMMAND]
chili-api-cli create-api
Create an typescript api client from an openapi json definition.
USAGE
$ chili-api-cli create-api
OPTIONS
-f, --file=file Filepath for writing the generation api client. Should end with .ts
-h, --help show CLI help
-s, --schema=schema [default: ./openapi.json] path to openapi / swagger file e.g. openapi.json
EXAMPLE
$ magana-api-cli -u
hello world from ./src/hello.ts!
See code: src/commands/create-api.ts
chili-api-cli create-controller
Generate a new CRUD controller.
USAGE
$ chili-api-cli create-controller
OPTIONS
-h, --help show CLI help
--model=model (required) model name e.g. User or UserToken
--module=module (required) module name e.g. core or auth
EXAMPLE
$ api-cli hello
hello world from ./src/hello.ts!
See code: src/commands/create-controller.ts
chili-api-cli create-migration [NAME]
Create a new database migration file.
USAGE
$ chili-api-cli create-migration [NAME]
OPTIONS
-f, --force
-h, --help show CLI help
-n, --name=name name to print
EXAMPLE
$ magana-api-cli create-migration add-table-users
hello world from ./src/hello.ts!
See code: src/commands/create-migration.ts
chili-api-cli create-routes [DIRECTORY]
Create route definitions from controllers
USAGE
$ chili-api-cli create-routes [DIRECTORY]
OPTIONS
-f, --force
-h, --help show CLI help
-n, --name=name name to print
EXAMPLE
$ api-cli hello
hello world from ./src/hello.ts!
See code: src/commands/create-routes.ts
chili-api-cli help [COMMAND]
display help for chili-api-cli
USAGE
$ chili-api-cli help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help