Skip to content

TEMPLATE INFRASTRUCTURE / LOCAL-FIRSTTemplates that remain data

A typed DSL, safe HTML rendering, PHP API, CLI, and local-first browser editor in one monorepo.

TrafficOps template pipeline from source to static output

Minimal example

tpl
@template "Campaign" version=1

@section content "Content"
  @param title String = "New campaign" required
  @param body Markdown = "Start with an **idea**."
  @param destination Url = "https://trafficops.io"
@endsection

@layout
  <main>
    <h1>{{title}}</h1>
    <div>{{& body}}</div>
    <a href="{{destination}}">Continue</a>
  </main>
@endlayout

Save it as index.tpl, then open it in Template Studio or generate the page with the CLI:

sh
npx @trafficops/cli --template ./index.tpl --output ./generated

Where to go next

Build your first template, then choose your integration path: PHP and Laravel, CLI and Template Studio, or agent skills.

The documentation ships with the project.