api-cli/README.md

21 lines
729 B
Markdown
Raw Permalink Normal View History

2021-07-07 11:18:50 +02:00
# API-CLI
2021-07-07 14:16:19 +02:00
A commandline interface for generating and linting apibuilder-based api-specs.
# Installation
<code>npm install -g @nclazz/api-cli</code>
# Generate a new service
Generating is a new service spec is easily done with the <code>generate</code> command.
i.e.:
<code>api-cli generate --name=myservice --description="My Service description" --silent</code>
As a template a default template will be used. The template can be overridden either by specifying it as a parameter
<code>--template=<path-to-template></code> or by creating a template json file in <code>~/.api/templates/default.json</code>
If the parameter <code>--silent</code> is not given an interactive prompt will lead through the generation process.