Skip to content

archmage conv

The conv subcommand converts each tree-structured data file into a standalone JSON file.

Terminal window
archmage conv -o <output-dir> [flags] <file1> [<file2> ...]

Input files may be specified as literal paths or glob patterns.

Terminal window
# Convert every YAML file in a directory
archmage conv -o out "configs/*.yaml"
# Convert a single file
archmage conv -o out configs/weapon.toml
# Compact output (no indentation)
archmage conv --compact -o out "configs/*.json"

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.

Print the Archmage banner on startup.

Output JSON without indentation.

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.

Load environment variables from the specified file before running. If omitted and a .env file exists in the working directory, it’s loaded automatically.

The directory where converted JSON files are written. Required.

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.