Template Packs

Template packs are bundled sets of templates, example entities, and rules that you can install as a group. They provide a quick way to set up a project with a complete set of entity types tailored to a specific domain — game development, film production, novel writing, recipe management, or anything else.

What a Pack Contains

A template pack is a directory under _Templates/Packs/ containing:

_Templates/Packs/
  fantasy-rpg/
    pack.json             # Pack manifest (metadata + entity type list)
    templates/            # Template files (one per entity type)
      CHARACTER_TEMPLATE.md
      LOCATION_TEMPLATE.md
      ITEM_TEMPLATE.md
      FACTION_TEMPLATE.md
      QUEST_TEMPLATE.md
    examples/             # Starter entity files
      character_elena_brightforge.md
      location_thornwood_forest.md
      item_sunforged_blade.md
    rules/                # AI generation rule files
      character_generation.yaml
      item_generation.yaml
      world_consistency.yaml

When installed, the pack’s templates are copied to _Templates/Standard/, examples are placed in the appropriate entity data folders (e.g. Characters/, Locations/), and rules go to _Rules/.

pack.json Manifest

Every pack requires a pack.json file that describes the pack and lists its contents:

{
  "id": "fantasy-rpg",
  "name": "Fantasy RPG Starter",
  "description": "Complete template set for tabletop or video game RPG worldbuilding",
  "author": "Biloxi Studios",
  "version": "2.0.0",
  "entity_types": ["character", "location", "item", "faction", "quest"],
  "categories": ["game-dev", "worldbuilding", "fantasy"],
  "tags": ["rpg", "fantasy", "tabletop", "video-game"],
  "icon": "sword",
  "is_default": false,
  "auto_install": false
}

Manifest Fields

FieldTypeRequiredDescription
idstringYesUnique pack identifier (must match directory name)
namestringYesDisplay name in the marketplace
descriptionstringYesWhat the pack contains and who it is for
authorstringYesPack author or organization
versionstringYesSemantic version string
entity_typeslistYesEntity types included in this pack
categorieslistNoMarketplace categories for browsing
tagslistNoSearchable keywords
iconstringNoIcon name (Lucide icon set) for marketplace display
is_defaultbooleanNoFeatured prominently in the marketplace UI (default: false)
auto_installbooleanNoAuto-installed on first project startup when no packs are present (default: false)
is_meta_packbooleanNoIf true, this pack installs other packs listed in includes (default: false)
includeslistNoPack IDs to install when this meta pack is installed

Meta Packs

A meta pack does not contain templates directly. Instead, it references other packs via the includes field. Installing a meta pack recursively installs all included packs.

{
  "id": "full-starter",
  "name": "Full Starter Kit",
  "description": "Everything you need: characters, locations, items, documents, and maps",
  "author": "Biloxi Studios",
  "version": "1.0.0",
  "entity_types": [],
  "is_meta_pack": true,
  "auto_install": true,
  "includes": [
    "core-essentials",
    "worldbuilding-basics",
    "document-templates"
  ]
}

The core-essentials Pack

Every new StudioBrain project gets the core-essentials pack. This pack has auto_install: true, so it is installed automatically on first startup when no other packs are present. It includes the most commonly used entity types:

  • Character
  • Location
  • Item
  • Faction
  • Event

The auto-install behavior is idempotent — if any pack is already installed (even a different one), auto-install does not run.

Auto-install only triggers when no packs at all are installed for the project. If you manually install a different pack first, core-essentials is not auto-installed.

Installing a Pack

From the Marketplace

  1. Go to Settings > Plugins > Marketplace.
  2. Switch to the Templates tab.
  3. Browse or search for a pack.
  4. Click Install. Templates, examples, and rules are copied into your project.

From the Filesystem

If you have a pack directory (e.g. downloaded or created locally):

  1. Copy the pack directory into _Templates/Packs/.
  2. StudioBrain discovers it automatically on the next scan.
  3. Go to Settings > Templates > Packs and click Install next to the pack.

Via API

POST /api/template-packs/{pack_id}/install

The API copies templates to _Templates/Standard/, examples to entity data folders, and rules to _Rules/. For remote storage backends (Google Drive, S3), the service uses the StorageProvider to write files to the correct locations.

Uninstalling a Pack

Uninstalling a pack removes its templates and rules from the project. Entity data files (examples and any entities the user created using those templates) are never deleted — they are preserved to protect user work.

POST /api/template-packs/{pack_id}/uninstall
⚠️

After uninstalling a pack, entities created with its templates still exist but their entity type will show as “unknown template” in the UI until a compatible template is reinstalled or a Custom template is provided.

Creating a Pack

To create a pack for your own use or for community distribution:

1. Create the Directory Structure

mkdir -p _Templates/Packs/my-pack/{templates,examples,rules}

2. Write the Manifest

Create pack.json with your pack metadata. The id must match the directory name.

3. Add Templates

Place one *_TEMPLATE.md file per entity type in templates/. Each template must have valid YAML frontmatter with at minimum entity_type, template_category, and fields.

4. Add Examples (Optional)

Place starter entity files in examples/. Follow the naming convention {entity_type}_{entity_id}.md so the installer knows which entity folder to place them in.

5. Add Rules (Optional)

Place YAML rule files in rules/. These are copied to _Rules/ on install.

6. Test Locally

Install the pack in a test project and verify:

  • All entity types appear in the “Create New” dialog
  • Example entities load correctly
  • AI generation respects the included rules

7. Submit to the Marketplace

To share your pack with the community, submit it to the studiobrain-community-plugins repository. Add your pack’s metadata to index.json under the templates array. See the Community Submissions guide for the PR process.

Cloud Edition

On StudioBrain Cloud, packs are stored in the database (template_packs table) rather than the filesystem. The API and UI work identically. CatalogSync populates the database from the catalog repo, and per-tenant pack installations are tracked separately.

The get_packs_from_db() function reads available packs from the database. If the table is empty (e.g. before the first sync), it falls back to filesystem discovery.

Next Steps