Skip to main content

render

Render an Archetype from an archetype directory or git URL.

Synopsis

archetect render [OPTIONS] <source> [destination-pos] [action]

Arguments

ArgumentRequiredDescription
<source>yesThe Archetype source: a local directory or a git URL.
[destination-pos]noDirectory to render into. Overrides --destination when both are supplied.
[action]noA named action defined by the archetype. Defaults to the archetype's default entry point.

The destination defaults to the current directory (.). Resolution order: positional destination, then --destination / --dest, then ..

Options

render accepts all global render options — answers, defaults, switches, offline mode, dry-run, and more.

FlagEnvDefaultDescription
--destination <dir>, --dest <dir>.Directory to render into.
-a, --answer <key=value>Answer to a prompt (repeatable, YAML-typed values).
-A, --answer-file <path>YAML/JSON answers file (repeatable).
-d, --use-default <key>Use the configured default for a prompt key. Repeatable; <key>=false unsets an inherited one.
-D, --use-defaults-alloffUse defaults for all unanswered prompts.
-s, --switch <name>Enable an archetype switch (repeatable). <name>=false disables one enabled by configuration.
-o, --offlineARCHETECT_OFFLINEoffOnly use directories and already-cached remote git URLs.
-e, --allow-exec [true|false]ARCHETECT_ALLOW_EXECfalseAllow archetypes to execute arbitrary commands.
--headlessARCHETECT_HEADLESSoffNever wait on interactive input.
-l, --localARCHETECT_LOCALoffUse local development checkouts where configured.
-U, --force-updateARCHETECT_FORCE_UPDATEoffForce catalog/archetype updates.
-n, --dry-runARCHETECT_DRY_RUNoffShow what would be rendered without writing files.

Examples

Render from a git URL into the current directory:

archetect render https://github.com/archetect-rust/clap-cli-archetype.git

Render into a specific directory using the positional destination:

archetect render https://github.com/archetect-rust/clap-cli-archetype.git my-tool

Render from a local archetype directory (useful while authoring):

archetect render ~/projects/archetypes/my-archetype --dest ./out

Provide answers and skip remaining prompts with defaults:

archetect render https://github.com/archetect-rust/clap-cli-archetype.git \
-a project_name='My Tool' \
-a 'port=8080' \
-D

Fully non-interactive (CI-friendly) with an answers file and a dry run first:

archetect render https://github.com/example/service-archetype.git \
-A answers.yaml --headless -n

Enable a switch and force-update cached sources:

archetect render https://github.com/example/service-archetype.git -s database -U

See also