Command Line Interface
The Reforge CLI (reforge-cli) runs conversion unattended — in build pipelines,
scheduled tasks, and long-running folder-watch services — and reports results in a
form your automation can parse.
Licence requirement
reforge-cli requires a Professional or Enterprise licence, and exits with
code 10 without one. If you only need to convert files from a terminal, the
underlying engine ships a free command-line converter — see
Which command line do I need? below.
Which command line do I need?
Reforge is built on OpenCGM, our CGM engine,
which we publish under Apache 2.0. OpenCGM includes opencgm_cli, a free converter
that handles single-file conversion, folder watching, and profile selection. It is a
genuinely capable tool and we recommend it for interactive and one-off work.
reforge-cli is the same engine wrapped for unattended operation. The difference
is not what it can convert — it is what happens when conversion runs without anyone
watching:
opencgm_cli — free |
reforge-cli — Professional |
|
|---|---|---|
| Convert, watch a folder, choose a profile | Yes | Yes |
| Low-level engine and format control | More — presets, font maps, text-as-path, viewer shim | Profile and DPI |
| Machine-readable output | No | --json on every command |
| Parallel conversion | Serial | --workers |
| Files still being written | Fixed poll interval | Debounce, stability check, drain timeout |
| Transient failures | No retry | --retry, with partial-batch exit codes |
| Running as a service | No | --pidfile, --log-file |
| Rule-based validation | Geometry checks | --strict, --skip-rules |
| Licence and config management | n/a | Dedicated commands |
If a failed conversion at 3am needs to be retried, logged, and reported to a build system without waking anyone, that is what you are paying for.
Commands
| Command | Description |
|---|---|
reforge-cli convert |
Convert a single CGM file to SVG |
reforge-cli watch |
Monitor a folder and convert files as they arrive |
reforge-cli validate |
Validate a CGM file against a profile |
reforge-cli license |
Activate, deactivate, or check licence status |
Platforms
- Windows CLI —
reforge-cli.exe, included with the Reforge installer. - Linux CLI —
reforge-cli, available as a standalone binary for x64 Linux.
The command interface and all options are identical across platforms.
Shared concepts
Input profiles
All commands accept --profile:
| Value | Profile |
|---|---|
auto |
Auto-detect (default) |
generic |
Generic CGM |
webcgm |
WebCGM 2.1 |
s1000d |
S1000D Issue 4–6 |
ata |
ATA iSpec 2200 |
cals |
CALS / MIL-PRF-28003 |
cgmplus |
CGM+ (European aerospace/NATO) |
pip |
Petroleum Industry Picture |
Output presets
convert also accepts --preset, which applies the output settings of one of the five built-in GUI presets. See the Profiles tab docs for the full setting matrix.
| Value | Aliases | GUI preset | Target scenario |
|---|---|---|---|
s1000d |
— | S1000D | Defence / civil aviation IETP |
ataispec2200 |
ata, ataispec |
ATA iSpec 2200 | Commercial aviation legacy |
webcgm21 |
webcgm |
WebCGM 2.1 | Web technical graphics |
cals |
— | CALS source → SVG | MIL-PRF-28003 deliverables |
pipcggc |
pip, cgmpip |
CGM*PIP (petroleum) | Petroleum seismic / well-log |
The catalogue’s own display names are accepted too, so a value copied out of reforge-cli profiles works as-is.
A preset carries the whole output side — DPI, hotspot encoding, region handling, APS preservation, companion-file mode, multi-link mode, text rendering, colour space, minification and validation. That matters beyond convenience: --profile selects the input CGM dialect and is a different axis, and several preset settings have no flag of their own. Web optimisation is the one to know about — it is on by default and off in every delivery preset, so S1000D and ATA output differs depending on whether you pass --preset.
Options you supply explicitly win over the preset, so --preset cals --dpi 150 uses the CALS settings at 150 DPI. Options you do not supply come from the preset rather than from a default.
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Conversion or validation error |
2 |
Usage error — invalid or missing arguments |
3 |
Partial success — some files in a batch converted, others failed |
10 |
Licence error |