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).
When to Use This
- 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
Blueprint URL Format
Reference a subfolder inside a remote Git repository by including the path after the repository name:
https://github.com/ORG/REPO//path/to/template@refhttps://gitlab.com/ORG/REPO//path/to/template@refExample Repository Layout
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.
Create from a Subfolder Template
Scaffold a new project by pointing --blueprint to the subfolder:
ska create \ --blueprint https://github.com/your-org/templates-repo//templates/service-rest@v1.2.0 \ --output ./my-rest-serviceWhat Happens
- SKA downloads only what it needs from the repo
- It loads the template from the specified subfolder
- If the template defines inputs, SKA shows the interactive form (unless you use
--non-interactive)
Pinning and Updating
| Strategy | Example | Use Case |
|---|---|---|
| Pin to tag | @v1.2.0 | Production, reproducibility |
| Pin to branch | @main or @develop | Fast iteration |
| No pin | (omit @) | Use 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:
cd ./my-rest-serviceska update --path .Switching Template Versions
To update to a new template version:
- The upstream reference is stored in
.ska-config/ - Update the reference to the new version (e.g.,
@v1.2.0→@v1.3.0) - Run the update command:
ska update --path .Multiple Templates, Same Project
You can scaffold multiple templates into the same directory. Each creates its own entry in .ska-config/:
# First templateska create \ --blueprint https://github.com/org/templates//app-base@v1.0 \ --output ./my-project
# Second template (same output directory)ska create \ --blueprint https://github.com/org/templates//ci-pipeline@v2.0 \ --output ./my-projectManage them independently:
# List all configurationsska config list
# Update specific templateska update --path . --name ci-pipeline