Skip to main content

Publish a template

A template is a real Kuploy stack — a NativeStackSpec — plus a catalog entry describing it. Someone browsing kuploy.app/templates sees the entry; what they import is the spec. It is not a Compose catalogue: the unit is a Kuploy stack, and paid templates reuse kuploy-hub's existing billing rather than a parallel paywall.

Templates live in kuploy/kuploy-templates.

Repository layout​

meta.json                     # the catalog
templates/<id>/stack.yaml # the stack spec that gets imported
templates/<id>/logo.svg
scripts/validate-meta.mjs # CI check

The catalog entry​

Each entry in meta.json's templates array:

FieldRequiredWhat it is
idyesUnique slug; also the directory name under templates/
nameyesDisplay name in the gallery
versionyesTemplate version, not the upstream app's
descriptionyesOne paragraph. It is the gallery's copy and what the Org Agent matches a person's request against — see below
logoyesPath to the SVG, e.g. templates/<id>/logo.svg
stackyesPath to the spec, e.g. templates/<id>/stack.yaml
linksyesgithub, website, docs — whichever apply
tagsyesSearch and filtering
accessyesfree, pro or cloud
productonly when access isn't freeThe kuploy-hub product.slug, plus an optional plan slug
variablesnoSecrets a provisioning flow should generate — {key, generate, component}
domainsnoComponents that need a hostname
{
"id": "learnhouse",
"name": "LearnHouse LMS",
"version": "0.1.0",
"description": "Open-source LMS: courses, quizzes, assignments, certificates.",
"logo": "templates/learnhouse/logo.svg",
"stack": "templates/learnhouse/stack.yaml",
"links": {"github": "https://github.com/learnhouse/learnhouse"},
"tags": ["lms", "education"],
"access": "free",
"product": null,
"variables": [{"key": "NEXTAUTH_SECRET", "generate": "random32", "component": "learnhouse-app"}],
"domains": ["learnhouse-app"]
}
Two things the agent does with your entry

Your description is how it is found. When someone asks the Org Agent for something, the agent reads the catalogue's names and descriptions and nothing else. A description written as a tagline — "The modern way to teach" — cannot be matched against a request. Say what the stack is and what it is for.

Tagging a template draft withdraws it from the agent entirely. It disappears from what the agent can offer, and a deploy asked for by id is refused as if the template did not exist. That is deliberate, but it means drafting a published template to tidy your listing also takes it out of every conversation — with nothing to tell you.

The exact rules for both, and what does not count as a draft, are in Your template in a conversation.

Access tiers​

access decides who may see the spec, and the check runs against billing you already have:

accessWho gets the spec
freeEveryone, signed in or not
pro / cloudA tenant with an active or trialing subscription to the named product

A viewer without that subscription sees the entry and a View plans link rather than the spec; an anonymous viewer is asked to sign in. The gate reads tenant_subscription for the product.slug you name — there is no separate entitlement store to populate.

The same check runs when the Org Agent is asked for your template, so there is no way a paid one becomes free by being requested in a conversation. What differs is only how the tenant hears about it: in the gallery they read the refusal as written, while in a conversation the agent is told the deploy was refused for want of a paid plan and says so in its own words, in their language. Expect the outcome to be identical and the wording not to be — so do not write a description that leans on a particular refusal sentence appearing.

A non-free template must name its product

validate-meta.mjs fails the build when access is pro or cloud and product.slug is missing. Without it the gallery has nothing to check, so the template would be either free to all or unusable.

Validate before you open the PR​

node scripts/validate-meta.mjs

It checks the required fields, that ids are unique, that the stack and logo paths actually exist, that access is one of the three values, and the product rule above. CI runs the same script, so a template that passes locally passes review.

What a user does with it​

From the gallery, Import into kuploy copies the stack spec to the clipboard; they paste it into Stacks → Import in their environment. Deploy on cloud hands the template to a Kuploy Cloud instance instead.

The import dialog offers two modes, and your entry feeds the first:

  • Provision new services creates each component from the spec, generates the secrets you declared under variables (random32, keypair) and assigns a hostname to each component in domains. A value can reference the assigned host with the ${domain} token.
  • Wire existing services matches components to services the user already has, by name, and only creates the env connections between them.

So declare variables for every secret the app needs rather than hard-coding a placeholder: on the provisioning path they are generated per deploy, and a hard-coded one would be shared by everyone who imports your template.

Your template in a conversation​

The two facts above, with the detail you need to act on them.

What the agent actually has to go on​

Each template reaches the agent as four fields — templateId, name, description, access — and nothing else. No tags, no logo, no links.

So a description written as a tagline cannot be matched against a request, because there is nothing else to match on. Lead with what the template is for, in the words a customer would use, before what it is built from:

- "Vitrine: Next.js storefront with MongoDB, S3-compatible media and a
- Stripe-ready checkout."
+ "An online shop: product catalogue, cart, delivery zones and online or
+ cash-on-delivery payment. Built on Next.js with MongoDB."

Both are true. Only the second one gets offered to somebody who said they want to sell shoes.

What counts as a draft, exactly​

Two marks, either alone being enough:

WhereWhat countsWhat does not
tagsan entry equal to draft, ignoring case and surrounding spaces — Draft, DRAFT, " draft "drafts, draft-beer, and any tag merely containing the word
descriptionthe text starting with draft — DRAFT — stub pending verification"A CMS with draft posts and scheduling"

The description rule exists for the author who writes the banner and forgets the tag. That one would otherwise be offered and built.

Nothing will tell you a draft mark is what did it

An author debugging this goes looking for an error and finds none, so it is worth being precise about where the silence is:

  • Listing is silent. Drafts are filtered out before the agent sees the catalogue, so it cannot offer yours and has no idea it was there.
  • Deploying is not silent, but it never says "draft". A model that has your id from somewhere else and asks for it anyway gets the same not found a typo gets. The person does get an answer — it just tells them no such template exists.

That is deliberate: a refusal naming its reason invites the model to argue with it. But it means a leftover mark produces no diagnosis anywhere. If your template is ready, check both.

How to check without reading any code. Ask an Org Agent for your template by name in a conversation. If it reports that no such template exists while your card is sitting in the gallery, a draft mark is still on it.

Declare a default for every input you can​

The spec's inputs block is what the agent has to ask about, and each question costs the person a turn — on a phone, on metered data, waiting on a reply that can take a minute.

An input becomes a question when it has no default. The one exception is type: domain, which never blocks: blank means "give me the free address", so a template whose only input is its address deploys without asking anything.

inputs:
- key: domain
type: domain
appliesTo: my-app
label: Address for your site # never asked — blank is a valid answer
- key: SITE_TITLE
type: string
label: Shop name
default: My shop # asked only if you remove this

Give every other input a sensible default and your template deploys in one exchange. Leave one without, and the agent has to come back with a question before it can even show a plan.

Writing the stack spec​

The spec is an ordinary Kuploy stack, so the developer guide for Stacks is the reference. Two things are worth doing for a template specifically:

  • Pin image tags. latest makes a template that worked last month fail today, and the person importing it has no idea why.
  • Document deploy caveats in the description. Anything the stack can't express — LiveKit's UDP and TURN requirements, for instance — belongs in the text, because that is all the user reads before importing.