CLI Reference
The ocpp-debugkit CLI provides commands for inspecting traces, generating reports, and running scenarios.
Installation
npm install -g @ocpp-debugkit/toolkitinspect
Parse and analyze an OCPP trace file. Outputs a summary with events, sessions, failures, and warnings.
ocpp-debugkit inspect <file>Example:
ocpp-debugkit inspect trace.jsonreport
Generate a Markdown report from an OCPP trace file.
ocpp-debugkit report <file> [options]Options
-f, --format <format>— Report format (default: markdown)-o, --output <file>— Write report to file (default: stdout)
Example:
ocpp-debugkit report trace.json --output report.mdscenario list
List all available built-in scenarios.
ocpp-debugkit scenario listscenario run
Run a built-in scenario through the analysis engine. Compares detected failures against expected failures and reports pass/fail.
ocpp-debugkit scenario run <name>Example:
ocpp-debugkit scenario run failed-authNote: scenario run runs static fixtures through the local analysis engine only. It is not active endpoint testing, WebSocket simulation, or live station/CSMS testing.
External Scenario Files
Load and run an external scenario file (JSON format) instead of a built-in scenario:
ocpp-debugkit scenario run --file ./my-scenario.jsonci
Run all built-in scenarios (and optional external scenario files from a directory), exit 0 if all pass, 1 if any fail. Designed for CI/CD pipelines.
ocpp-debugkit ci [dir] [options]Options
--format <format>— Output format: text (default) or json
Examples:
# Run all built-in scenarios
ocpp-debugkit ci
# Also run external scenarios from a directory
ocpp-debugkit ci ./scenarios
# JSON output for CI tooling
ocpp-debugkit ci --format jsonanonymize
Strip sensitive fields from a trace file. Anonymizes idTag, chargePointSerialNumber, stationId, transactionId, and email/phone/IP patterns.
ocpp-debugkit anonymize <file> [options]Options
-o, --output <file>— Write anonymized trace to file (default: stdout)
Example:
ocpp-debugkit anonymize trace.json -o trace-anon.jsondiff
Compare two trace files and show differences in events, failures, and summaries.
ocpp-debugkit diff <a> <b> [options]Options
--format <format>— Output format: text (default) or json
Example:
ocpp-debugkit diff trace-a.json trace-b.jsonGlobal Options
-V, --version— output the version number-h, --help— display help for any command
Security
- File paths are validated before reading
- Input size limit: 10 MB
- Safe JSON parsing with error handling
- Non-sensitive error messages (no internal paths exposed)