Creates a new service from a remote or local template.
osls does not include a maintained catalog of built-in template names. Use a local template directory, or a trusted remote Git URL, when creating a service from a template.
Create a service in a new folder using a local template:
osls create \
--template-path path/to/my/template/folder \
--path myServiceCreate a service in a new folder from a remote template:
osls create \
--template-url https://github.com/<owner>/<repo>/tree/<branch>/<template-directory> \
--path myService--template-urlor-uA remotely hosted template URL. Supports plain Git URLs plus GitHub, GitHub Enterprise, GitLab, Bitbucket, and Bitbucket Server. Required if --template-path is not present.--template-pathThe local path of your template. Required if --template-url is not present.--pathor-pThe path where the service should be created.--nameor-nThe name of the service inserverless.yml. If--pathis omitted, osls also uses this as the target directory name.
osls create \
--template-path path/to/my/template/folder \
--path my-new-service \
--name my-new-serviceThis example will copy the template into the my-new-service directory. This directory will be created if not present. osls will not overwrite an existing target directory when --path is used.
Additionally osls will rename the service according to the name you provide. If --path is omitted, osls uses --name as the target directory. If --name is omitted, the service name defaults to the target directory's final path segment.
osls create \
--template-url https://github.com/<owner>/<repo>/tree/<branch>/<template-directory> \
--path my-new-service \
--name my-new-serviceThis will download the template into the my-new-service directory. If --name is provided, the copied template's service name will be renamed to my-new-service. If --name is omitted, the service name defaults to the target directory's final path segment.
When using a local template, if neither --path nor --name is provided, osls will create a new directory named after the local template folder and preserve the template's existing service name.