Skip to content

Multiple Template Subfolders

This guide explains how to use SKA when a remote repository hosts multiple templates in subfolders (for example, one repo acting as a catalog of templates).

  • Your organization keeps many templates in a single repository, each under its own folder.
  • You want to scaffold from a specific subfolder path and optionally pin a branch or tag.

You can reference a subfolder inside a remote Git repository by including the path after the repository name and before the optional ref:

[!NOTE]

  • The ref after the @ can be a branch (e.g., @main), a tag (e.g., @v1.2.3), or omitted to use the default branch.
  • Both URL forms are supported. Use the one you prefer.

Suppose your template catalog looks like this:

templates-repo/templates/
service-rest/
service-grpc/
library-utility/
common/
fragments/

Each folder under templates/ is a separate blueprint you can target.

Scaffold a new project by pointing —blueprint to the subfolder:

  • Using an HTTPS URL:
    Terminal window
    ska create \
    --blueprint https://github.com/your-org/templates-repo/templates/service-rest@v1.2.0 \
    --output ./my-rest-service

What happens:

  • SKA downloads only what it needs from the repo.
  • It loads the template from the specified subfolder.
  • If the template defines inputs, SKA will show the interactive form (unless you use —non-interactive).
  • Pin a known-good template version with a tag: @v1.2.0
  • Use a branch for fast iteration: @main or @develop
  • Omit @ to use the repository’s default branch

After creation, your project contains a .ska-config/ folder that stores the upstream reference. To bring in updates from the same upstream path and ref: