Page Contents


Downloads a LoopBack example project from our GitHub monorepo.

lb4 example [options] [<example-name>]


Standard options

-h, --help
Print the generator’s options and usage.
Do not remember prompt answers. Default is false.
Do not automatically install dependencies. Default is false.
-c, --config
JSON file name or value to configure options
Format generated code using npm run lint:fix

For example,

lb4 app --config config.json
lb4 app --config '{"name":"my-app"}'
cat config.json | lb4 app --config stdin
lb4 app --config stdin < config.json
lb4 app --config stdin << EOF
> {"name":"my-app"}
-y, --yes
Skip all confirmation prompts with default or provided value


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.

See Examples and Tutorials for the list of available examples.

Interactive Prompts

The tool will prompt you for:

  • Name of the example to download. If the name had been supplied from the command-line, the prompt is skipped.


The example project is downloaded to a new directory and its dependencies are installed. For example, when downloading todo example, the tool stores the files under the newly created loopback4-example-todo directory.