Template library
forge manages your own template library. Each template is its own private
GitHub repository, stored locally under Dev/Templates/<name>/.
How it differs from polyforge create
Section titled “How it differs from polyforge create”polyforge create |
forge |
|
|---|---|---|
| Source | built-in quick starters | your curated repos |
| Output | a project in Workspace/ |
a template in Dev/Templates/ |
| Customisable | no | entirely |
Needs gh |
no | yes, for new |
Use create when you want to start coding in ten seconds. Use forge when you
have a setup — linting, CI, project layout, license — you want back every time.
Creating a template
Section titled “Creating a template”forge new archon "archicad addons template"This does four things:
- Scaffolds a blank template at
Dev/Templates/archon/. - Creates a private GitHub repository,
template-archon, viagh. - Runs
gh repo edit --template, marking it a GitHub template repository — so you can spin new repos off it from the GitHub UI, not only through PolyForge. - Registers it, with your description, in
polyforge.registry.toml.
From there it is an ordinary git repository. Edit it by hand and git push.
Listing
Section titled “Listing”forge listTemplates: 1. archon archicad addons template (local + repo) 2. cli-starter (no description) (repo only (forge get))The status column tells you whether a template is present locally or only
registered. Descriptions come from the registry, which is why one shows for
archon even before you clone it.
Restoring and removing
Section titled “Restoring and removing”forge get all # every registered templateforge get archon # just oneforge remove archon # delete the local copy onlyremove is deliberately conservative: it deletes the local directory and leaves
the GitHub repository and the registry entry alone. forge get archon brings it
straight back. To actually retire a template, delete the repo on GitHub and
remove its registry entry by hand.
Why templates are git-ignored here
Section titled “Why templates are git-ignored here”Dev/Templates/*/ is excluded from the PolyForge repository, so templates never
get dragged into the tooling repo — the same rule that applies to projects and
learning tracks. See content separation.