archmage conv
The conv subcommand converts each tree-structured data file into a standalone JSON file.
archmage conv -o <output-dir> [flags] <file1> [<file2> ...]Input files may be specified as literal paths or glob patterns.
# Convert every YAML file in a directoryarchmage conv -o out "configs/*.yaml"
# Convert a single filearchmage conv -o out configs/weapon.toml
# Compact output (no indentation)archmage conv --compact -o out "configs/*.json"Output Files
Section titled “Output Files”Each input file is converted on its own. The output file takes the input’s base name with a .json extension and is written to the --output-dir directory.
--banner
Section titled “--banner”Print the Archmage banner on startup.
--compact
Section titled “--compact”Output JSON without indentation.
--crlf
Section titled “--crlf”Write all output files with CRLF (\r\n) line endings instead of LF (\n).
Change the working directory before running. Relative paths are resolved from this directory.
--dotenv
Section titled “--dotenv”Load environment variables from the specified file before running. If omitted and a .env file exists in the working directory, it’s loaded automatically.
--output-dir / -o
Section titled “--output-dir / -o”The directory where converted JSON files are written. Required.
Environment Variables
Section titled “Environment Variables”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_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. |