Windows CLI

Installation

The reforge-cli CLI is included with the Reforge installer. Enable Add CLI to PATH during installation to use reforge-cli from any terminal. Otherwise, run it from its install location:

%LocalAppData%\Reforge\reforge-cli.exe

The CLI shares the same licence as the GUI — no separate activation is needed.


Commands

convert

reforge-cli convert <input.cgm> [options]
reforge-cli convert <glob> [options]
Option Default Description
--output Input directory Output SVG file (single) or output directory (batch)
--profile auto Input profile (auto generic webcgm s1000d ata cals cgmplus pip)
--preset (none) Output preset matching a GUI Profiles-tab entry. See Output presets.
--dpi 96 Resolution for text/raster (72–600)
--validate off Validate before converting; exit 1 if validation fails
--dry-run off Preview files that would be converted without writing any output
--log info Verbosity (debug info quiet)

Examples:

reforge-cli convert illustration.cgm --output illustration.svg
reforge-cli convert --profile s1000d ipc-001.cgm --output ipc-001.svg
reforge-cli convert --preset s1000d --output .\svg-out ipc-001.cgm
reforge-cli convert *.cgm --output .\svg-output
reforge-cli convert --validate --dpi 300 figure.cgm

Script integration:

reforge-cli convert input.cgm --output output.svg
if %ERRORLEVEL% EQU 10 (
    echo Licence error
    exit /b 1
)
if %ERRORLEVEL% NEQ 0 (
    echo Conversion failed: %ERRORLEVEL%
    exit /b 1
)
reforge-cli convert input.cgm --output output.svg
if ($LASTEXITCODE -eq 10)      { Write-Error "Licence error" }
elseif ($LASTEXITCODE -ne 0)   { Write-Error "Conversion failed: $LASTEXITCODE" }
else                           { Write-Host "Success" }

watch

reforge-cli watch <folder> [options]

Runs until ctrl+c, which triggers graceful shutdown.

Option Default Description
--output Watch folder Output directory
--recursive off Watch subdirectories; mirror structure in output
--profile auto Input profile
--log info Verbosity

Examples:

reforge-cli watch C:\incoming --output C:\converted
reforge-cli watch ./cgm-files --output ./svg-output --recursive --profile s1000d

validate

reforge-cli validate <input.cgm> [options]
Option Default Description
--profile auto Profile to validate against
--log info Verbosity

Exit codes: 0 valid · 1 errors · 2 warnings only · 10 licence error


license

reforge-cli license <subcommand> [options]
Subcommand Description
activate <key> --email <email> Activate a licence key
deactivate Remove licence from this machine
status Show current licence edition and expiry
import <file> Import an offline licence file
request-offline Generate an offline licence request

Examples:

reforge-cli license activate XXXX-XXXX-XXXX-XXXX --email user@example.com
reforge-cli license status
reforge-cli license deactivate