Skip to main content

Archetype Manifest

Every archetype and catalog is described by a single manifest file at its root. Archetect v3 uses one unified manifest schema for both: the presence of a catalog: section and/or an archetype.lua script determines behavior at runtime (see Archetype Layout).

Manifest File Names

When loading an archetype directory, Archetect searches for a manifest file in this priority order — the first match wins:

PriorityFileNotes
1archetype.yamlCanonical v3 name. Use this for new archetypes.
2archetype.ymlAccepted alias.
3archetect.yamlBackwards-compatibility alias — avoid for new archetypes.
4archetect.ymlBackwards-compatibility alias — avoid for new archetypes.
note

archetype.yaml describes the archetype. Don't confuse it with archetect.yaml, the tool's configuration file found in ~/.config/archetect/ and as project-level overrides — see Configuration Files.

Top-Level Fields

FieldTypeDefaultDescription
descriptionstring""Human-readable name/description. Shown in menus and search. Every manifest should set this.
summarystringOptional longer summary, used by indexing and search.
authorslist of strings[]Author names/emails.
languageslist of strings[]Languages this archetype generates (e.g. ["Rust"]). Metadata for search.
frameworkslist of strings[]Frameworks used (e.g. ["Tonic"]). Metadata for search.
tagslist of strings[]Free-form tags. Metadata for search.
requiresmaprunning versionRuntime requirements — see requires.
catalogmap of CatalogEntryNamed catalog entries: submenus, renderable archetypes, and library dependencies.
templatingmapsee belowTemplate-engine behavior — see templating.
interfacemapDeclarative input contract — see interface.

Unknown fields are silently ignored by the parser — a typo'd section will not raise an error, so double-check field names.

requires

FieldTypeDefaultDescription
archetectsemver version requirementthe running Archetect's own versionArchetect version this archetype needs: major must match; minor/patch is a minimum.

The value is parsed as a semver version requirement (e.g. "3.0.0") and enforced in two parts:

  • The major version must match exactly. Major versions of Archetect are strictly separated — an archetype requiring 2.x renders only with Archetect 2, and one requiring 3.x only with Archetect 3. Rendering a 2.x archetype under Archetect 3 fails with an error directing you to the archetect2 binary.
  • Within the major, the requirement is a minimum. Archetect 3.1 renders an archetype requiring "3.0.0"; Archetect 3.0 fails a "3.1.0" requirement with a clear error.
requires:
archetect: "3.0.0"

Although the section is optional in parsing, every archetype should declare it explicitly.

templating

Controls template-engine behavior for ATL rendering. All fields are optional.

FieldTypeDefaultDescription
undefinedlenient | strictlenientResolution policy for undefined context variables. lenient renders them as empty; strict raises an error at render time.
trim_blocksbooleanfalseStrip the first newline after a {% ... %} block tag.
lstrip_blocksbooleanfalseStrip leading whitespace on lines that contain only a block tag.
templating:
undefined: strict
trim_blocks: true
lstrip_blocks: true

There is no content or includes setting: content directories are addressed by root-relative paths in directory.render(path, context), and the archetype's own includes/ directory is automatically on the include search path — see Archetype Layout.

catalog

An inline map of named catalog entries. Each entry is either a leaf (renderable archetype, via source), a group (submenu, via nested catalog), or a server (federated remote, via server). Entries can also declare library: true to be staged as Lua/include dependencies.

The full CatalogEntry schema is documented in the Catalog Manifest reference.

catalog:
shared-types:
description: "Shared Types"
source: "git@github.com:org/shared-types.git"
library: true

interface

A declarative input contract describing what prompts and switches the archetype expects. It does not replace the Lua script — it lets external tooling (web portals, MCP agents, documentation generators) build input forms without running the script. See also Authoring Archetypes: Interface.

The interface may live inline under interface: in the manifest, or in a sibling file. The file is searched in priority order:

PriorityFile
1interface.yaml
2interface.yml

If an interface file exists, it takes precedence over an inline interface: section.

Top-Level Interface Fields

FieldTypeDefaultDescription
modebatch | interactiveinteractiveHow clients should interact. batch: all required inputs are declared, clients may submit all answers at once. interactive: the script may branch or prompt dynamically; clients should use the prompt-by-prompt protocol.
promptslist of Prompt[]Declared prompts, in display order.
switcheslist of Switch[]Declared switches (boolean flags, never prompted for).
groupslist of GroupOptional grouping of prompts for UI layout.

Prompt

FieldTypeRequiredDescription
keystringyesAnswer key — must match what the Lua script prompts for.
typeenumyesOne of text, int, bool, select, multiselect, list, editor.
labelstringyesHuman-readable label.
helpstringnoHelp text / description.
placeholderstringnoPlaceholder hint for text-like inputs.
requiredbooleanno (default true)Whether the input is required.
defaultanynoDefault value (type depends on type).
defaultslist of stringsnoDefault selections for multiselect/list prompts.
optionslist of OptionnoOptions for select/multiselect prompts.
minintegernoMinimum value/length/items (meaning depends on type).
maxintegernoMaximum value/length/items (meaning depends on type).
validationstringnoRegex validation pattern (text prompts only).

Option

Options support two YAML forms:

  • Short form — a plain string; value and label are identical: - sqlite
  • Long form — a map:
FieldTypeRequiredDescription
valuestringyesThe value submitted when chosen.
labelstringyesDisplay label.
helpstringnoPer-option help text.

Switch

FieldTypeRequiredDescription
keystringyesSwitch name — passed to archetype.switches.is_enabled().
labelstringyesHuman-readable label.
helpstringnoDescription of what the switch enables.
defaultbooleanno (default false)Default state.

Group

FieldTypeRequiredDescription
labelstringyesDisplay label for the group.
keyslist of stringsyesPrompt keys belonging to this group, in display order.

Full Annotated Example

# archetype.yaml — canonical v3 manifest name
description: "Rust gRPC Service" # shown in menus and search
summary: "Production-ready Tonic service" # longer text for search/indexing
authors: ["Platform Team"]
languages: ["Rust"]
frameworks: ["Tonic"]
tags: ["service", "grpc"]

requires:
archetect: "3.0.0" # major must match; minimum within the major

templating:
undefined: strict # error on undefined variables
trim_blocks: true # Jinja-style whitespace control
lstrip_blocks: true

# Dependencies and sub-archetypes — see the Catalog Manifest reference
catalog:
inflect-helpers:
description: "Casing helpers"
source: "git@github.com:org/inflect-helpers.git"
library: true # staged for require() and {% include %}
show: false # hidden from interactive menus

# Declarative input contract for external tooling
interface:
mode: batch # flat prompt flow, form-friendly
prompts:
- key: project_name
type: text
label: "Project Name"
help: "Used for directory and package name"
placeholder: "my-project"
validation: "^[a-z][a-z0-9-]*$"
- key: database
type: select
label: "Database"
options:
- value: postgres
label: "PostgreSQL"
help: "Recommended for production"
- sqlite # short form: value == label
default: postgres
- key: port
type: int
label: "Server Port"
default: 8080
min: 1024
max: 65535
switches:
- key: with_ci
label: "Include CI/CD"
help: "Generates GitHub Actions workflows"
groups:
- label: "Project"
keys: [project_name, port]
- label: "Database"
keys: [database]