Skip to main content

config

Manage Archetect's configuration.

Synopsis

archetect config <COMMAND>
CommandDescription
mergedShow the merged configuration after applying command line arguments, environment variables, and configuration files.
defaultsShow Archetect's default configuration, which may be used for re-creating a configuration file.
editOpen Archetect's user config file in an editor.

config merged

Prints the fully merged configuration as YAML. Because -c, environment variables, and flags participate in the merge, this is the way to debug "which value wins":

archetect config merged
archetect -c ./ci-overrides.yaml config merged

config defaults

Prints the built-in default configuration as YAML — a useful starting point for a new config file:

archetect config defaults > ~/.config/archetect/archetect.yaml

Example output:

catalog:
archetect:
description: Archetect Catalog
source: https://github.com/archetect/archetect-catalog.git
answers:
author_email: you@example.com
author_full: Your Name <you@example.com>
author_name: Your Name
updates:
interval: 604800
locals:
paths:
- ~/projects/archetypes/
security: {}

config edit

Opens the user config file (~/.config/archetect/archetect.yaml) in your editor, pre-populated with its current contents — or with the default configuration if the file doesn't exist yet. The file is written only when you save and exit the editor; cancelling leaves it untouched.

archetect config edit

Configuration file locations

Configuration is layered, with later sources overriding earlier ones (field-level merge; a project catalog replaces the global catalog rather than merging):

OrderSource
1Built-in defaults (archetect config defaults)
2User config: ~/.config/archetect/archetect.yaml
3Drop-ins: ~/.config/archetect/etc.d/*.yaml, loaded in sorted order
4Project config in the current directory: one of archetect.yaml, archetect.yml, .archetect.yaml, .archetect.yml (an error is raised if more than one variant exists)
5File supplied with -c / --config-file
6Environment variables and CLI flags

archetect global skips step 4 entirely — see Catalog Commands.

See Configuration Files for the full file format and system layout for where these directories live on your platform.