a cli tool to generate loopback 4 applications with extra features like caching & fuzzy search
npm install grapi-cligrapi-cli
=================
a cli tool to generate loopback 4 applications with extra features like caching & fuzzy search
sh-session
$ npm install -g grapi-cli
$ grapi-cli COMMAND
running command...
$ grapi-cli (--version)
grapi-cli/0.4.14 linux-x64 node-v18.17.1
$ grapi-cli --help [COMMAND]
USAGE
$ grapi-cli COMMAND
...
`
Commands
* [grapi-cli app [NAME]](#grapi-cli-app-name)
* grapi-cli app:controller-dir
* [grapi-cli audit [NAME]](#grapi-cli-audit-name)
* grapi-cli auth
* grapi-cli auth:users
* grapi-cli authorization
* grapi-cli authorization:assign-role
* grapi-cli authorization:policy
* grapi-cli cache
* [grapi-cli controller [NAME]](#grapi-cli-controller-name)
* grapi-cli copyright
* [grapi-cli datasource [NAME]](#grapi-cli-datasource-name)
* [grapi-cli discover [URL]](#grapi-cli-discover-url)
* [grapi-cli example [EXAMPLE-NAME]](#grapi-cli-example-example-name)
* [grapi-cli extension [NAME]](#grapi-cli-extension-name)
* grapi-cli external:operation
* grapi-cli fuzzy
* [grapi-cli help [COMMAND]](#grapi-cli-help-command)
* [grapi-cli import-lb3-models [LB3APP]](#grapi-cli-import-lb3-models-lb3app)
* grapi-cli interceptor NAME
* [grapi-cli model [NAME]](#grapi-cli-model-name)
* grapi-cli model:remove
* grapi-cli observer NAME
* [grapi-cli openapi [URL]](#grapi-cli-openapi-url)
* [grapi-cli openapi:complete-flow [URL]](#grapi-cli-openapicomplete-flow-url)
* grapi-cli patch
* grapi-cli plugins
* grapi-cli plugins:add PLUGIN
* grapi-cli plugins:inspect PLUGIN...
* grapi-cli plugins:install PLUGIN
* grapi-cli plugins:link PATH
* [grapi-cli plugins:remove [PLUGIN]](#grapi-cli-pluginsremove-plugin)
* grapi-cli plugins:reset
* [grapi-cli plugins:uninstall [PLUGIN]](#grapi-cli-pluginsuninstall-plugin)
* [grapi-cli plugins:unlink [PLUGIN]](#grapi-cli-pluginsunlink-plugin)
* grapi-cli plugins:update
* grapi-cli post-ds-patches
* grapi-cli post-patches
* grapi-cli pre-patches
* grapi-cli pre-relation-patches
* grapi-cli property:add
* grapi-cli property:mark-hidden
* grapi-cli property:remove
* grapi-cli relation
* [grapi-cli repository [NAME]](#grapi-cli-repository-name)
* grapi-cli rest-crud
* grapi-cli service NAME
* grapi-cli sql-controller
* grapi-cli update
* grapi-cli update:modelgrapi-cli app [NAME]generate application.
`
USAGE
$ grapi-cli app [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--name ] [--description ] [--outdir ] [--eslint] [--prettier] [--mocha] [--loopbackBuild]
[--vscode] [--docker] [--repositories] [--services] [--controllerDirs] [--apiconnect]ARGUMENTS
NAME name of the application.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--apiconnect Include ApiConnectComponent.
--controllerDirs a comma seperated list of directory names to use as controller directories.
--description= Description of the application.
--docker Generate Dockerfile and add npm scripts to build/run the project in a docker container.
--eslint Add ESLint to LoopBack4 application project.
--generate-configs return configs based on answers from the prompt.
--loopbackBuild Add @loopback/build module’s script set to LoopBack4 application project.
--mocha Add Mocha to LoopBack4 application project.
--name= Application class name.
--outdir= Project root directory for the application.
--prettier Add Prettier to LoopBack4 application project.
--repositories include repository imports and RepositoryMixin.
--services include service-proxy imports and ServiceMixin.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--vscode Add VSCode config files to LoopBack4 application project
DESCRIPTION
generate application.
`_See code: src/commands/app.ts_
grapi-cli app:controller-dir`
USAGE
$ grapi-cli app:controller-dir [-c ] [--controllerDirs]FLAGS
-c, --config= Config JSON object
--controllerDirs a comma seperated list of directory names to use as controller directories.
`_See code: src/commands/app/controller-dir.ts_
grapi-cli audit [NAME]generate audit artifacts.
`
USAGE
$ grapi-cli audit [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--connector ]ARGUMENTS
NAME name of the datasource.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--connector= Name of datasource connector.
--generate-configs return configs based on answers from the prompt.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
generate audit artifacts.
`_See code: src/commands/audit.ts_
grapi-cli authadding auth to loopback 4 application.
`
USAGE
$ grapi-cli auth [-c ] [-i ] [-e ] [-r ] [--datasource ]FLAGS
-c, --config= Config JSON object
-e, --exclude= exclude auth to the apis.
-i, --include= include auth to the apis.
-r, --writeonly= auth to writeonly apis.
--datasource= name of the datasource.
DESCRIPTION
adding auth to loopback 4 application.
`_See code: src/commands/auth.ts_
grapi-cli auth:usersadding auth to loopback 4 application.
`
USAGE
$ grapi-cli auth:users [-c ] [-i ]FLAGS
-c, --config= Config JSON object
-i, --users= users list.
DESCRIPTION
adding auth to loopback 4 application.
`_See code: src/commands/auth/users.ts_
grapi-cli authorizationadd authorization layer.
`
USAGE
$ grapi-cli authorization [-c ] [--datasrouce ]FLAGS
-c, --config= Config JSON object
--datasrouce= name of the datasource.
DESCRIPTION
add authorization layer.
`_See code: src/commands/authorization.ts_
grapi-cli authorization:assign-roleadd authorization roles
`
USAGE
$ grapi-cli authorization:assign-role [-c ] [-i ]FLAGS
-c, --config= Config JSON object
-i, --roles= users list.
DESCRIPTION
add authorization roles
`_See code: src/commands/authorization/assign-role.ts_
grapi-cli authorization:policyadd authorization policies
`
USAGE
$ grapi-cli authorization:policy [-c ] [-i ]FLAGS
-c, --config= Config JSON object
-i, --policies= users list.
DESCRIPTION
add authorization policies
`_See code: src/commands/authorization/policy.ts_
grapi-cli cachecreating cache for endpoints
`
USAGE
$ grapi-cli cache [-c ] [--redisDS ] [--cacheTTL ] [--prefix ] [--exclude
] [--include ]FLAGS
-c, --config= Config JSON object
--cacheTTL= cacheTTL
--exclude= exclude controllers
--include= include controllers
--prefix= prefix to append to endpoints.
--redisDS= redisDS
DESCRIPTION
creating cache for endpoints
`_See code: src/commands/cache.ts_
grapi-cli controller [NAME]generate controllers
`
USAGE
$ grapi-cli controller [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--controllerType REST|BASIC]ARGUMENTS
NAME name of controller.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--controllerType=
DESCRIPTION
generate controllers
`_See code: src/commands/controller.ts_
grapi-cli copyrightadd/update copyright
`
USAGE
$ grapi-cli copyright [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--owner ] [--license ] [--gitOnly ] [--updateLicense ] [--exclude ]FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--exclude= One or more glob patterns with , delimiter to exclude files that match the patterns from
being updated.
--generate-configs return configs based on answers from the prompt.
--gitOnly= A flag to control if only git tracked files are updated. Default to true.
--license= The name of the license, such as MIT.
--owner= The owner of the copyright, such as IBM Corp. and LoopBack contributors.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--updateLicense= A flag to control if package.json and LICENSE files should be updated to reflect the
selected license id.
DESCRIPTION
add/update copyright
`_See code: src/commands/copyright.ts_
grapi-cli datasource [NAME]generate datasource.
`
USAGE
$ grapi-cli datasource [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--connector ]ARGUMENTS
NAME name of the datasource.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--connector= Name of datasource connector.
--generate-configs return configs based on answers from the prompt.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
generate datasource.
`_See code: src/commands/datasource.ts_
grapi-cli discover [URL]discover models.
`
USAGE
$ grapi-cli discover [URL] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--dataSource ] [--views] [--relations] [--all] [--outDir ] [--schema ] [--models ]
[--optionalId] [--connectorDiscoveryOptions ]ARGUMENTS
URL URL or file path of the OpenAPI spec. Type: String. Required: false.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--all Skips the model prompt and discovers all of them.
--connectorDiscoveryOptions= Pass the options to the connectors.
--dataSource= Put a valid datasource name here to skip the datasource prompt.
--generate-configs return configs based on answers from the prompt.
--models= Specify the models to be generated e.g:–models=table1,table2.
--optionalId Specify if the Id property of generated models will be marked as not
required.
--outDir= Specify the directory into which the model.model.ts files will be placed.
Default is src/models.
--relations Choose whether to create relations.
--schema= Specify the schema which the datasource will find the models to discover.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--views Choose whether to discover views.
DESCRIPTION
discover models.
`_See code: src/commands/discover.ts_
grapi-cli example [EXAMPLE-NAME]download examples.
`
USAGE
$ grapi-cli example [EXAMPLE-NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install]
[--generate-configs]ARGUMENTS
EXAMPLE-NAME Optional name of the example to clone. If provided, the tool will skip the example-name prompt and run
in a non-interactive mode.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--generate-configs return configs based on answers from the prompt.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
download examples.
`_See code: src/commands/example.ts_
grapi-cli extension [NAME]generate extension.
`
USAGE
$ grapi-cli extension [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--description ] [--outDir ] [--eslint] [--prettier] [--mocha] [--loopbackBuild] [--vscode]ARGUMENTS
NAME Optional name of the extension given as an argument to the command.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--description= project root directory for the extension.
--eslint Add ESLint to LoopBack4 extension project.
--generate-configs return configs based on answers from the prompt.
--loopbackBuild Add @loopback/build module’s script set to LoopBack4 extension project.
--mocha Add Mocha to LoopBack4 extension projectAdd @loopback/build module’s script set to
LoopBack4 extension project.
--outDir= Project root directory for the extension.
--prettier Add Prettier to LoopBack4 extension project.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--vscode Add VSCode config files to LoopBack4 application project.
DESCRIPTION
generate extension.
`_See code: src/commands/extension.ts_
grapi-cli external:operationcreating rest endpoints based on configs only.
`
USAGE
$ grapi-cli external:operation [-c ] [--ds ] [--controller ] [--method ] [--url ]
[--bodyParams ] [--createModel] [--additionalProperties ] [--apiFunction ] [--pathParams
] [--queryParams ] [--headers ] [--apiUri ] [--responses ] [--description
]FLAGS
-c, --config= Config JSON object
--additionalProperties= stringified additional model properties.
--apiFunction= api function name.
--apiUri= uri of the controller.
--bodyParams= Stringified JSON Object for request body.
--controller= controller under which the API should reside.
--createModel generate the model.
--description= Description of request.
--ds= datasource name to attach APIs to.
--headers= Stringified JSON Object for headers.
--method= api method type.
--pathParams= Stringified JSON Object for path parameter.
--queryParams= Stringified JSON Object for query parameters.
--responses= Stringified JSON Object for responses.
--url= url of the external api.
DESCRIPTION
creating rest endpoints based on configs only.
`_See code: src/commands/external/operation.ts_
grapi-cli fuzzygenerate fuzzy endpoints for lb4 based controllers
`
USAGE
$ grapi-cli fuzzy [-c ] [--fuzzy ] [--centralFuzzy ] [--datasource ]
[--appName ] [--exclude ] [--include ]FLAGS
-c, --config= Config JSON object
--appName= name of the application
--centralFuzzy= central Fuzzy
--datasource= datasource name
--exclude= exclude controllers
--fuzzy= fuzzy
--include= include controllers
DESCRIPTION
generate fuzzy endpoints for lb4 based controllers
`_See code: src/commands/fuzzy.ts_
grapi-cli help [COMMAND]Display help for grapi-cli.
`
USAGE
$ grapi-cli help [COMMAND...] [-n]ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for grapi-cli.
`_See code: @oclif/plugin-help_
grapi-cli import-lb3-models [LB3APP]import lb3 models.
`
USAGE
$ grapi-cli import-lb3-models [LB3APP] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install]
[--generate-configs] [--outDir ]ARGUMENTS
LB3APP Path to the directory containing your LoopBack 3.x application.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--generate-configs return configs based on answers from the prompt.
--outDir= [default: src/models] Directory where to write the generated source file. Default: src/models.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
import lb3 models.
`_See code: src/commands/import-lb3-models.ts_
grapi-cli interceptor NAMEgenerate interceptor.
`
USAGE
$ grapi-cli interceptor NAME [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--global] [--no-global] [--group ]ARGUMENTS
NAME Required name of the observer to create as an argument to the command.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--generate-configs return configs based on answers from the prompt.
--global Optional flag to indicate a global interceptor (default to true). Use --no-global to set it to
false.
--group= Optional name of the interceptor group to sort the execution of global interceptors by group.
This option is only supported for global interceptors.
--no-global set global to false
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
generate interceptor.
`_See code: src/commands/interceptor.ts_
grapi-cli model [NAME]generate model.
`
USAGE
$ grapi-cli model [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--base ] [--dataSource ] [--table ] [--schema ]ARGUMENTS
NAME name of the model.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--base= a valid model already created in src/models or any of the core based class models Entity or
Model. Your new model will extend this selected base model class
--dataSource= The name of the dataSource which contains this model and suppots model discovery
--generate-configs return configs based on answers from the prompt.
--schema= If discovering a model from a dataSource, specify the schema which contains it
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--table= If discovering a model from a dataSource, specify the name of its table/view
DESCRIPTION
generate model.
`_See code: src/commands/model.ts_
grapi-cli model:removeenable adding property to loopoback 4 models
`
USAGE
$ grapi-cli model:remove [-c ] [-n ]FLAGS
-c, --config= Config JSON object
-n, --model= name of the model to remove.
DESCRIPTION
enable adding property to loopoback 4 models
`_See code: src/commands/model/remove.ts_
grapi-cli observer NAMEgenerate observer.
`
USAGE
$ grapi-cli observer NAME [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--group ]ARGUMENTS
NAME Required name of the observer to create as an argument to the command.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--generate-configs return configs based on answers from the prompt.
--group= Optional name of the observer group to sort the execution of observers by group.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
generate observer.
`_See code: src/commands/observer.ts_
grapi-cli openapi [URL]generate openapi based apis.
`
USAGE
$ grapi-cli openapi [URL] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--url ] [--validate] [--promote-anonymous-schemas] [--client] [--datasource ] [--redisDS ]
[--cache ] [--positional]ARGUMENTS
URL URL or file path of the OpenAPI spec. Type: String. Required: false.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--cache= Stringified object of cache configs.
--client Generate client-side service proxies and controllers with implementation for the
OpenAPI spec.
--datasource= A valid datasource name.
--generate-configs return configs based on answers from the prompt.
--positional A flag to control if service methods use positional parameters or an object with
named properties.
--promote-anonymous-schemas Promote anonymous schemas as models classes.
--redisDS= Stringified object of redis DS configs.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--url= URL or file path of the OpenAPI spec.
--validate Validate the OpenAPI spec.
DESCRIPTION
generate openapi based apis.
`_See code: src/commands/openapi.ts_
grapi-cli openapi:complete-flow [URL]generate openapi based apis.
`
USAGE
$ grapi-cli openapi:complete-flow [URL] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--url ] [--validate] [--promote-anonymous-schemas] [--client] [--datasource ] [--redisDS ]
[--cache ] [--positional]ARGUMENTS
URL URL or file path of the OpenAPI spec. Type: String. Required: false.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--cache= Stringified object of cache configs.
--client Generate client-side service proxies and controllers with implementation for the
OpenAPI spec.
--datasource= A valid datasource name.
--generate-configs return configs based on answers from the prompt.
--positional A flag to control if service methods use positional parameters or an object with
named properties.
--promote-anonymous-schemas Promote anonymous schemas as models classes.
--redisDS= Stringified object of redis DS configs.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--url= URL or file path of the OpenAPI spec.
--validate Validate the OpenAPI spec.
DESCRIPTION
generate openapi based apis.
`_See code: src/commands/openapi/complete-flow.ts_
grapi-cli patch`
USAGE
$ grapi-cli patch [-c ] [--patches ]FLAGS
-c, --config= Config JSON object
--patches= An stringified array of patches.
`_See code: src/commands/patch.ts_
grapi-cli pluginsList installed plugins.
`
USAGE
$ grapi-cli plugins [--json] [--core]FLAGS
--core Show core plugins.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List installed plugins.
EXAMPLES
$ grapi-cli plugins
`_See code: @oclif/plugin-plugins_
grapi-cli plugins:add PLUGINInstalls a plugin into grapi-cli.
`
USAGE
$ grapi-cli plugins:add PLUGIN... [--json] [-f] [-h] [-s | -v]ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into grapi-cli.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the GRAPI_CLI_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the GRAPI_CLI_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ grapi-cli plugins:add
EXAMPLES
Install a plugin from npm registry.
$ grapi-cli plugins:add myplugin
Install a plugin from a github url.
$ grapi-cli plugins:add https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ grapi-cli plugins:add someuser/someplugin
`grapi-cli plugins:inspect PLUGIN...Displays installation properties of a plugin.
`
USAGE
$ grapi-cli plugins:inspect PLUGIN...ARGUMENTS
PLUGIN... [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ grapi-cli plugins:inspect myplugin
`_See code: @oclif/plugin-plugins_
grapi-cli plugins:install PLUGINInstalls a plugin into grapi-cli.
`
USAGE
$ grapi-cli plugins:install PLUGIN... [--json] [-f] [-h] [-s | -v]ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into grapi-cli.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the GRAPI_CLI_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the GRAPI_CLI_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ grapi-cli plugins:add
EXAMPLES
Install a plugin from npm registry.
$ grapi-cli plugins:install myplugin
Install a plugin from a github url.
$ grapi-cli plugins:install https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ grapi-cli plugins:install someuser/someplugin
`_See code: @oclif/plugin-plugins_
grapi-cli plugins:link PATHLinks a plugin into the CLI for development.
`
USAGE
$ grapi-cli plugins:link PATH [-h] [--install] [-v]ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
--[no-]install Install dependencies after linking the plugin.
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ grapi-cli plugins:link myplugin
`_See code: @oclif/plugin-plugins_
grapi-cli plugins:remove [PLUGIN]Removes a plugin from the CLI.
`
USAGE
$ grapi-cli plugins:remove [PLUGIN...] [-h] [-v]ARGUMENTS
PLUGIN... plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ grapi-cli plugins:unlink
$ grapi-cli plugins:remove
EXAMPLES
$ grapi-cli plugins:remove myplugin
`grapi-cli plugins:resetRemove all user-installed and linked plugins.
`
USAGE
$ grapi-cli plugins:reset [--hard] [--reinstall]FLAGS
--hard Delete node_modules and package manager related files in addition to uninstalling plugins.
--reinstall Reinstall all plugins after uninstalling.
`_See code: @oclif/plugin-plugins_
grapi-cli plugins:uninstall [PLUGIN]Removes a plugin from the CLI.
`
USAGE
$ grapi-cli plugins:uninstall [PLUGIN...] [-h] [-v]ARGUMENTS
PLUGIN... plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ grapi-cli plugins:unlink
$ grapi-cli plugins:remove
EXAMPLES
$ grapi-cli plugins:uninstall myplugin
`_See code: @oclif/plugin-plugins_
grapi-cli plugins:unlink [PLUGIN]Removes a plugin from the CLI.
`
USAGE
$ grapi-cli plugins:unlink [PLUGIN...] [-h] [-v]ARGUMENTS
PLUGIN... plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ grapi-cli plugins:unlink
$ grapi-cli plugins:remove
EXAMPLES
$ grapi-cli plugins:unlink myplugin
`grapi-cli plugins:updateUpdate installed plugins.
`
USAGE
$ grapi-cli plugins:update [-h] [-v]FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.
`_See code: @oclif/plugin-plugins_
grapi-cli post-ds-patchesexecute post ds patches.
`
USAGE
$ grapi-cli post-ds-patchesDESCRIPTION
execute post ds patches.
`_See code: src/commands/post-ds-patches.ts_
grapi-cli post-patchesexecute post patches.
`
USAGE
$ grapi-cli post-patchesDESCRIPTION
execute post patches.
`_See code: src/commands/post-patches.ts_
grapi-cli pre-patchesexecute pre patches.
`
USAGE
$ grapi-cli pre-patchesDESCRIPTION
execute pre patches.
`_See code: src/commands/pre-patches.ts_
grapi-cli pre-relation-patchesexecute pre relation patches.
`
USAGE
$ grapi-cli pre-relation-patchesDESCRIPTION
execute pre relation patches.
`_See code: src/commands/pre-relation-patches.ts_
grapi-cli property:addenable adding property to loopoback 4 models
`
USAGE
$ grapi-cli property:add [-c ] [-n ] [-t ]FLAGS
-c, --config= Config JSON object
-n, --model= name of the argument
-t, --properties= JSON object of properties to add
DESCRIPTION
enable adding property to loopoback 4 models
`_See code: src/commands/property/add.ts_
grapi-cli property:mark-hiddenenable adding property to loopoback 4 models
`
USAGE
$ grapi-cli property:mark-hidden [-c ] [-n ] [-t ]FLAGS
-c, --config= Config JSON object
-n, --model= name of the model
-t, --properties= array of property names to mark hidden.
DESCRIPTION
enable adding property to loopoback 4 models
`_See code: src/commands/property/mark-hidden.ts_
grapi-cli property:removeenable adding property to loopoback 4 models
`
USAGE
$ grapi-cli property:remove [-c ] [-n ] [-t ]FLAGS
-c, --config= Config JSON object
-n, --model= name of the argument
-t, --property= name of the property to remove.
DESCRIPTION
enable adding property to loopoback 4 models
`_See code: src/commands/property/remove.ts_
grapi-cli relationgenerate relations.
`
USAGE
$ grapi-cli relation [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--relationType ] [--sourceModel ] [--destinationModel ] [--throughModel ]
[--sourceModelPrimaryKey ] [--sourceModelPrimaryKeyType ] [--destinationModelPrimaryKey ]
[--destinationModelPrimaryKeyType ] [--foreignKeyName ] [--relationName ] [--sourceKeyOnThrough
] [--targetKeyOnThrough ]FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--destinationModel= Destination model.
--destinationModelPrimaryKey= The name of the primary key of the destination model.
--destinationModelPrimaryKeyType= The type of the primary key of the destination model.
--foreignKeyName= Destination/Source model foreign key name for HasMany,HasOne/BelongsTo
relation, respectively.
--generate-configs return configs based on answers from the prompt.
--relationName= Relation name.
--relationType= Relation type.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--sourceKeyOnThrough= Foreign key that references the source model on the through model. For
HasManyThrough relation only.
--sourceModel= Source model.
--sourceModelPrimaryKey= The name of the primary key of the source model.
--sourceModelPrimaryKeyType= The type of the primary key of the source model.
--targetKeyOnThrough= Foreign key that references the target model on the through model. For
HasManyThrough relation only.
--throughModel= Through model. For HasManyThrough relation only.
DESCRIPTION
generate relations.
`_See code: src/commands/relation.ts_
grapi-cli repository [NAME]generate repositories.
`
USAGE
$ grapi-cli repository [NAME] [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--datasource ] [--model ] [--id ] [--repositoryBaseClass ]ARGUMENTS
NAME name of the repository.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--datasource= name of a valid datasource already created in src/datasources.
--generate-configs return configs based on answers from the prompt.
--id= name of the property serving as ID in the selected model. If you supply this value,
the CLI will not try to infer this value from the selected model file.
--model= name of a valid model already created in src/models.
--repositoryBaseClass= (Default: DefaultCrudRepository) name of the base class the repository will
inherit. If no value was supplied, DefaultCrudRepository will be used.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
generate repositories.
`_See code: src/commands/repository.ts_
grapi-cli rest-crudgenerate rest crud apis.
`
USAGE
$ grapi-cli rest-crud [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--datasource ] [--model ] [--basePath ] [--readonly ]FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--basePath= base path of the model endpoint.
--datasource= name of a valid datasource already created in src/datasources.
--generate-configs return configs based on answers from the prompt.
--model= name of a valid model already created in src/models.
--readonly= create readonly APIs e.g find and count.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
generate rest crud apis.
`_See code: src/commands/rest-crud.ts_
grapi-cli service NAMEgenerate a service.
`
USAGE
$ grapi-cli service NAME [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--type ] [--datasource ]ARGUMENTS
NAME name of the service.
FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--datasource= name of a valid REST or SOAP datasource already created in src/datasources.
--generate-configs return configs based on answers from the prompt.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
--type= service type: proxy, class, or provider.
DESCRIPTION
generate a service.
`_See code: src/commands/service.ts_
grapi-cli sql-controllerdescribe the command here
`
USAGE
$ grapi-cli sql-controller [-c ] [--query ] [--path ] [--repoName ] [--appName
] [--controllerName ]FLAGS
-c, --config= Config JSON object
--appName= name of the application
--controllerName= name of the generated controller
--path= path for endpoint
--query= sql query to generate controller for
--repoName= repository name
DESCRIPTION
describe the command here
`_See code: src/commands/sql-controller.ts_
grapi-cli updateupdate application dependencies.
`
USAGE
$ grapi-cli update [-c ] [-y] [-h] [-f] [--skip-cache] [--skip-install] [--generate-configs]
[--semver ]FLAGS
-c, --config= Config JSON object
-f, --force Force to overwrite files.
-h, --help Print the generator’s options and usage.
-y, --yes Skip all confirmation prompts with default or provided value.
--generate-configs return configs based on answers from the prompt.
--semver= Use semver semantics to check version compatibility for project dependencies of LoopBack
modules.
--skip-cache Do not remember prompt answers. Default is false.
--skip-install Do not automatically install dependencies. Default is false.
DESCRIPTION
update application dependencies.
`_See code: src/commands/update.ts_
grapi-cli update:modelenable updating loopoback 4 models
`
USAGE
$ grapi-cli update:model [-c ] [-n ] [--datasource ] [--base ] [--properties ]FLAGS
-c, --config= Config JSON object
-n, --name= name of the model
--base= base of the model.
--datasource= name of the datasource
--properties= stringigied object of model properties.
DESCRIPTION
enable updating loopoback 4 models
``_See code: src/commands/update/model.ts_