hpal
hapi pal CLI
Lead Maintainer - Devin Ivy
hpal was designed to help you,
- :sparkles: create new hapi projects from the pal boilerplate
- :bouquet: generate files for routes, extensions, models, services, etc. via haute-couture
- :books: search the hapi docs from the command line– plus many others such as joi and toys
- :honeybee: run custom commands defined by your server's hapi plugins
Installation
It is recommended to install the hpal CLI as a dev dependency within your project, then invoke it using npx.
npm install --save-dev @hapipal/hpal
npx hpal --helpHowever, if you want to try the hpal CLI right now, just copy and paste this right into your terminal!
npx @hapipal/hpal docs --ver 20.0.0 h.responseUsage
The hpal CLI is intended for use with hapi v19+ and nodejs v12+ (see v2 for lower support).
Usage: hpal <command> <options>
Commands:
hpal new <new-project-directory>
e.g. hpal new ~/node-projects/new-pal-project
hpal make [--asDir|--asFile] <haute-couture-item> [<item-name>]
e.g. hpal make route create-user
hpal docs[:<package-name>] [--ver x.y.z|ref] <docs-section> [<config-item>]
e.g. hpal docs --ver 20.0.0 h.continuehpal run [--list] <cmd [<cmd-options] e.g. hpal run plugin-name:command-name
Options:
-h, --help show usage options -v, --version show version information -d, --asDir [make] creates new haute-couture item in a directory index file -f, --asFile [make] creates new haute-couture item in a file -V, --ver [docs] specifies the version/ref of the API docs to search for the given package -l, --list [run] lists all available commands on your server
### Commands
#### `hpal new`
> ```
> hpal new <new-project-directory>
> e.g. hpal new ~/node-projects/new-pal-project
> ```
Clones the [pal boilerplate](https://github.com/hapipal/boilerplate), helps you fill-in initial details with [`npm init`](https://docs.npmjs.com/cli/init), pulls down the [pal flavors](https://github.com/hapipal/boilerplate#flavors), and leaves you prepared to make the first commit to your new project.
#### `hpal make`
> ```e.g. hpal make route create-user