Skip to main content

CLI Reference

Complete reference for the archetect command-line interface (v3.0.0).

Usage

archetect [OPTIONS] [action] [destination-pos] [COMMAND]

Archetect's first positional argument is an action — either a slash-separated catalog path (e.g. archetect/rust/cli/clap-cli) or a named action defined in your global or project-local .archetect.yaml. It defaults to default. If you supply no action and default isn't a catalog entry, Archetect presents the resolved catalog as an interactive menu.

The optional second positional (destination-pos) is the directory to render into. It overrides the --destination / --dest flag when both are supplied; when neither is given, output goes to the current directory (.).

# Present the catalog menu, render into the current directory
archetect

# Render a specific catalog entry into ./my-tool
archetect archetect/rust/cli/clap-cli my-tool

See Catalog Commands for details on the action form, and render for rendering an archetype from an explicit source.

Commands

CommandDescription
renderRender an Archetype from a directory or git URL
globalRun a catalog action from the global config, bypassing any project .archetect.yaml
ls, listList the resolved catalog tree
search, findSearch the resolved catalog by keyword
configManage Archetect's configuration (merged, defaults, edit)
cacheManage the archetype/catalog cache (clear, pull, invalidate)
systemShow Archetect system information (layout)
checkCheck Archetect's environment for problems
ideIDE integration tools (setup)
completionsGenerate shell completions
mcpStart an MCP stdio server for AI agent integration
serverStart an Archetect gRPC server
connectConnect to an Archetect server
helpPrint help for archetect or a subcommand

Global options

These options are available at the top level and on the rendering subcommands (render, global, connect, config). Informational subcommands (ls, search, check, ide, system, completions) accept only -v and -c directly; place other flags before the subcommand (e.g. archetect -o ls) or set the corresponding environment variable.

FlagEnvDefaultDescription
--destination <dir>, --dest <dir>.The directory to render the Archetype into. An explicit destination positional wins over this flag.
-a, --answer <key=value>Supply a key=value answer to a prompt. Repeatable.
-A, --answer-file <path>Supply an answers file in YAML or JSON format. Repeatable.
-d, --use-default <key>Use the configured default value for a prompt key. Repeatable; accepts comma-delimited lists. <key>=false unsets an inherited one.
-D, --use-defaults-alloffUse configured defaults for all prompts without explicit answers.
-s, --switch <name>Enable a switch that may trigger functionality within archetypes. Repeatable. <name>=false disables a switch 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. Bare -e means true. Prints a prominent warning when enabled.
--headlessARCHETECT_HEADLESSoffExpect all inputs to be resolved by answers, defaults, and optional values; never wait on interactive input.
-l, --localARCHETECT_LOCALoffUse local development checkouts where available and configured.
-U, --force-updateARCHETECT_FORCE_UPDATEoffForce updates for all catalogs and archetypes when rendering.
-n, --dry-runARCHETECT_DRY_RUNoffShow what would be rendered without writing files to disk.
-v, --verboseIncrease verbosity. Repeatable (-vv, -vvv).
-c, --config-file <config>Supply an additional configuration file to supplement or override user/default configuration.
-h, --helpPrint help.
-V, --versionPrint version.

Answer value syntax

Answers supplied with -a are parsed as YAML, giving them the same type semantics as answer files:

archetect -a count=42 ... # Integer
archetect -a price=1.5 ... # Float
archetect -a active=true ... # Boolean
archetect -a name=hello ... # String
archetect -a 'phone="5551234"' ... # String (YAML-quoted to prevent Integer)
archetect -a 'tags=[a, b]' ... # Array
archetect -a 'db={host: localhost}' ... # Map
archetect -a db.host=localhost ... # Nested Map via dotted key

Multi-word values need shell quoting:

archetect -a description='A multi-word value' ...

Configuration

Archetect merges configuration from built-in defaults, the user config file, etc.d drop-ins, a project-local config, -c files, environment variables, and CLI flags. See Configuration Files for the file format and config for inspecting the merged result.