Skip to main content

Commands

Build Command

Compiles an application or workspace into an output folder.

$ stencil build <name> [options]

Arguments

ArgumentDescription
<name>The name of the project to build.

Options

OptionDescription
--path [path]Path to tsconfig file.
Alias -p
--config [path]Path to nest-cli configuration file.
Alias -c
--watchRun in watch mode (live-reload).
If you're using tsc for compilation, you can type rs to restart the application (when manualRestart option is set to true).
Alias -w
--builder [name]Specify the builder to use for compilation (tsc, swc, or webpack).
Alias -b
--webpackUse webpack for compilation (deprecated: use --builder webpack instead).
--webpackPathPath to webpack configuration.
--tscForce use tsc for compilation.

Start Command

Compiles and runs an application (or default project in a workspace).

$ stencil start <name> [options]

Arguments

ArgumentDescription
<name>The name of the project to run.

Options

OptionDescription
--path [path]Path to tsconfig file.
Alias -p
--config [path]Path to nest-cli configuration file.
Alias -c
--watchRun in watch mode (live-reload)
Alias -w
--builder [name]Specify the builder to use for compilation (tsc, swc, or webpack).
Alias -b
--preserveWatchOutputKeep outdated console output in watch mode instead of clearing the screen. (tsc watch mode only)
--watchAssetsRun in watch mode (live-reload), watching non-TS files (assets). See Assets for more details.
--debug [hostport]Run in debug mode (with --inspect flag)
Alias -d
--webpackUse webpack for compilation. (deprecated: use --builder webpack instead)
--webpackPathPath to webpack configuration.
--tscForce use tsc for compilation.
--exec [binary]Binary to run (default: node).
Alias -e
-- [key=value]Command-line arguments that can be referenced with process.argv.

Add Command

Imports a library that has been packaged as a nest library, running its install schematic.

stencil add <name> [options]

Arguments

ArgumentDescription
<name>The name of the library to import.

Info Command

stencil info

Displays information about installed stencil packages and other helpful system info.

List Command

stencil list

Consoles a registry/spec file which shows all the installed services along with installed package manager.

Docker Command

stencil docker <services...>
stencil do <services...>

Description

Creates a docker service/container for given prompt.

  • Tooling specific setup
    • Creates a folder with the given <service> inside docker directory
  • ร€ la Carte setup
    • Creates a docker compose or updates existing docker compose with desired <service>

Arguments

ArgumentDescription
<service>The name of the new project

Note: Docker command supports multiple services at a time.

Services

  • Tooling specific setup
NameAliasDescription
logginglgGenerates a docker service for logging
monitoringServicemsGenerates a docker service for monitoring
temporaltpGenerates a docker service for temporal
  • ร€ la Carte setup
NameAliasDescription
postgrespgGenerate a docker compose for postgres
hasurahsGenerate a docker compose for hasura

Generate Command

stencil generate <schematic> <name> [options]

stencil g <schematic> <name> [options]

Description

Generates and/or modifies files based on a schematic

Arguments

ArgumentDescription
<service>The schematic or collection:schematic to generate. See the table below for the available schematics.
<name>The name of the new project

Schematics

NameAliasDescription
appGenerate a new application within a monorepo (converting to monorepo if it's a standard structure).
librarylibGenerate a new library within a monorepo (converting to monorepo if it's a standard structure).
classclGenerate a new class.
controllercoGenerate a controller declaration.
decoratordGenerate a custom decorator.
filterfGenerate a filter declaration.
gatewaygaGenerate a gateway declaration.
guardguGenerate a guard declaration.
interfaceitfGenerate an interface.
interceptoritcGenerate an interceptor declaration.
middlewaremiGenerate a middleware declaration.
modulemoGenerate a module declaration.
pipepiGenerate a pipe declaration.
providerprGenerate a provider declaration.
resolverrGenerate a resolver declaration.
resourceresGenerate a new CRUD resource. See the CRUD (resource) generator for more details. (TS only)
servicesGenerate a service declaration.
sub-appappGenerate a new application within a monorepo
service-prismaspGenerate the Prisma service file
service-usersuAdd the User Service module from the package.
fixturesfsGenerate Custom Fixtures Files.
huskyhsGenerate Custom husky Files.
githubghGenerate Custom github Files.
prismapsAdd custom prisma models to the schema.prisma file.
devcontainerdcGenerate files in a .devcontainer file
monitoringmfGenerate monitor folder.
service-temporalteIf you want to have temporal setup in the project.
service-file-uploadfuIf you want to have fileUpload setup in the project.

Options

OptionAliasDescription
--dry-run-dReports changes that would be made, but does not change the filesystem.
--project [project]-pProject that element should be added to.
--flatDo not generate a folder for the element.
--collection [collectionName]-cSpecify schematics collection. Use package name of installed npm package containing schematic.
--specEnforce spec files generation (default)
--no-specDisable spec files generation