Skip to content

archmage init

The init subcommand scaffolds a minimal project — including enum definitions, sample configurations, and ready-to-use scripts — to help you get started with Archmage.

See the generated ARCHMAGE.md for details.

Terminal window
archmage init --language <lang> [flags] [directory]
Terminal window
# Initialize in the current directory
archmage init --language go
# Initialize in a new subdirectory
archmage init -l cs ./my-project
# Overwrite existing files
archmage init -l go --force ./my-project

Print the Archmage banner on startup.

Overwrite existing files. By default, init aborts if any output file already exists.

Terminal window
archmage init -l go --force

The programming language of the generated code. Required.

Value Language
go Go
cs C#

Environment variables fine-tune output behavior for things that require cross-layer penetration — file naming, indentation style, and language-specific options.

Variable Default Description
ARCHMAGE_FILE_NAMING_STYLE “” Naming style for output files. Common values: snake, kebab, pascal, camel.
ARCHMAGE_INDENT_STYLE “tab” Indentation style: tab or space.
ARCHMAGE_INDENT_TAB_SIZE 4 Number of spaces per indent level when ARCHMAGE_INDENT_STYLE is space.

Run the generated scripts to build your data and code:

Terminal window
scripts/export.sh # export data
scripts/enum.sh # generate enum code
scripts/struct.sh # generate struct definitions
scripts/all.sh # run the three scripts above in order