Files
scarf/templates
Alan Wizemann 9f3600ae01 feat(catalog-config): mirror manifest v2 schema in validator + site
Phase D of v2.3 template configuration — closes the loop between the
Swift app and the catalog pipeline. Authors can now ship schemaful
bundles; the Python validator enforces the same invariants the Swift
installer does; the catalog site displays the schema so visitors see
what they'll need to configure before installing.

Python validator (tools/build-catalog.py):
- SUPPORTED_SCHEMA_VERSIONS accepts both 1 and 2 (v1 bundles are
  unchanged; v2 adds optional manifest.config).
- New _validate_config_schema function mirrors the Swift
  ProjectConfigService.validateSchema rules: unique keys, supported
  types, enum option presence + unique values, list itemType ==
  "string", secret-field cannot declare a default,
  modelRecommendation.preferred non-empty when present.
- _validate_contents_claim cross-checks contents.config (field count)
  against config.schema actual length — mismatch refused.
- TemplateRecord.to_catalog_entry exposes `config` in catalog.json so
  the site can render the schema.
- render_site copies each bundle's template.json to the detail dir as
  manifest.json (only when the manifest has a config block — keeps
  the served tree lean and makes "no manifest.json" a meaningful
  404 signal in the frontend).
- catalog.json's own schemaVersion stays at 1 (independent of per-
  template manifest schemaVersion).

Python tests (tools/test_build_catalog.py): 8 new cases in a new
ConfigSchemaValidationTests suite — accepts schemaful bundle, rejects
duplicate keys, rejects secret-with-default, rejects enum-without-
options, rejects unsupported field type, rejects contents.config
count mismatch, rejects unsupported list itemType, legacy v1
manifests pass unchanged. 24/24 Python tests total.

Site (site/widgets.js):
- New renderConfigSchema(container, config) — mirrors the display
  on the Scarf install preview. Renders each field as a <dt>/<dd>
  pair with type + required badges; enum shows choice labels; list
  fields show min/max bounds; string fields show pattern/length;
  secret fields get a "Stored in Keychain" reassurance. Optional
  modelRecommendation panel at the bottom with preferred + rationale
  + alternatives.
- The renderer is display-only — the site never collects values;
  that's the Scarf app's job.

template.html.tmpl adds a #config-schema <section>. The inline script
fetches manifest.json from the detail dir; on success hands the
config block to ScarfWidgets.renderConfigSchema; on 404 (schema-less
templates) silently leaves the section empty. CSS in styles.css
adds a config-schema panel matching the accent-green aesthetic.

24/24 Python + 50/50 Swift tests pass. site-status-checker still
renders correctly (schema-less; manifest.json isn't copied for it).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 02:00:34 +02:00
..

Scarf Templates

The community template catalog for Scarf — a macOS GUI for the Hermes AI agent. Each subdirectory here is one installable project template. Browse the live catalog with live dashboard previews at https://awizemann.github.io/scarf/templates/.

What's a template?

A .scarftemplate bundle ships:

  • A pre-configured project dashboard (widgets for stats, lists, text, charts).
  • A cross-agent AGENTS.md (agents.md standard) that tells Claude Code, Cursor, Codex, Aider, Jules, Copilot, Zed, etc. how to work with the project.
  • Optional skills, cron jobs, optional per-agent instruction shims (CLAUDE.md, GEMINI.md, .cursorrules, .github/copilot-instructions.md), and an optional memory appendix.

Users install with one click from the catalog site or by opening a .scarftemplate file in Scarf.

Layout

Each template lives at templates/<github-handle>/<template-name>/ with:

templates/<github-handle>/<template-name>/
├── staging/                               source tree
│   ├── template.json                      manifest (id, name, version, contents claim)
│   ├── README.md                          shown on catalog detail page
│   ├── AGENTS.md                          required cross-agent instructions
│   ├── dashboard.json                     rendered as a live preview on the catalog site
│   ├── instructions/…                     optional per-agent shims
│   ├── skills/…                           optional namespaced skills
│   ├── cron/jobs.json                     optional cron job definitions
│   └── memory/append.md                   optional memory appendix
├── <template-name>.scarftemplate          built bundle (zipped staging/), committed as-is
└── screenshots/                           optional PNGs for the detail page

The built .scarftemplate is served directly from raw.githubusercontent.com — the catalog's Install button links at:

scarf://install?url=https://raw.githubusercontent.com/awizemann/scarf/main/templates/<author>/<name>/<name>.scarftemplate

Contributing a template

See CONTRIBUTING.md for the full submission walkthrough. tl;dr: fork, drop a template under templates/<your-handle>/<your-name>/, open a PR. A CI check validates the bundle; a maintainer reviews the content.

Catalog metadata

catalog.json at this directory is the aggregate index that the website reads. It's regenerated by the maintainer on merge — do not modify it in your PR, the build script will take care of it.

Current templates

Template Author Description
site-status-checker awizemann Daily HTTP uptime check for a user-editable list of URLs. Dashboard + cron + AGENTS.md.