Skip to content

Template library

forge manages your own template library. Each template is its own private GitHub repository, stored locally under Dev/Templates/<name>/.

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.

Terminal window
forge new archon "archicad addons template"

This does four things:

  1. Scaffolds a blank template at Dev/Templates/archon/.
  2. Creates a private GitHub repository, template-archon, via gh.
  3. 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.
  4. Registers it, with your description, in polyforge.registry.toml.

From there it is an ordinary git repository. Edit it by hand and git push.

Terminal window
forge list
Templates:
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.

Terminal window
forge get all # every registered template
forge get archon # just one
forge remove archon # delete the local copy only

remove 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.

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.