Command-line tool to manage the e-mobility charging stations simulator via its WebSocket UI service (SRPC protocol).
The simulator must have its UI server enabled. Add a uiServer section to the simulator configuration:
{
"uiServer": {
"enabled": true,
"type": "ws",
"authentication": {
"enabled": true,
"type": "protocol-basic-auth",
"username": "admin",
"password": "admin"
}
}
}See the simulator configuration.
cd ui/cli
./install.shThis builds the CLI and installs it to ~/.local/bin/evse-cli. Options:
| Flag | Description |
|---|---|
--bin-dir <dir> |
Install to a custom directory (default: ~/.local/bin) |
--no-build |
Skip the build step (use existing dist/cli.js) |
Ensure ~/.local/bin is in your $PATH:
export PATH="$HOME/.local/bin:$PATH"pnpm install
pnpm --filter cli build
node ui/cli/dist/cli.js --helpThe CLI reads its configuration from the XDG config directory:
${XDG_CONFIG_HOME:-$HOME/.config}/evse-cli/config.json
The install script creates a default config file. To override, edit ~/.config/evse-cli/config.json:
{
"uiServer": {
"host": "localhost",
"port": 8080,
"protocol": "ui",
"version": "0.0.1",
"secure": false,
"authentication": {
"enabled": true,
"type": "protocol-basic-auth",
"username": "admin",
"password": "admin"
}
}
}Defaults < config file < --config <path> < --server-url <url> (highest priority).
Use --config <path> to load a specific config file instead of the XDG default.
| Option | Default |
|---|---|
host |
localhost |
port |
8080 |
protocol |
ui |
version |
0.0.1 |
secure |
false |
evse-cli [global-options] <command> [subcommand] [options]| Option | Description |
|---|---|
-V, --version |
Print version |
-C, --config <path> |
Path to configuration file |
--json |
Machine-readable JSON output on stdout |
--server-url <url> |
WebSocket URL (overrides config host/port/secure) |
-h, --help |
Show help |
Most commands accept optional [hashId...] arguments to target specific stations. Omitting them applies the command to all stations.
Hash IDs support prefix matching — you can use a short prefix instead of the full ID. The CLI resolves it automatically:
# Full hash:
evse-cli station start e9041c294a82a2d6aa194a801c3ba39d6b24d1cb...
# Short prefix (copied from `station list` output):
evse-cli station start e9041c294a82
# Even shorter (as long as it's unambiguous):
evse-cli station start e904If a prefix matches multiple stations, the CLI returns an error.
evse-cli simulator state # Get simulator state and statistics
evse-cli simulator start # Start the simulator
evse-cli simulator stop # Stop the simulatorevse-cli station list # List all stations
evse-cli station start [hashId...] # Start station(s)
evse-cli station stop [hashId...] # Stop station(s)
evse-cli station add -t <template> -n <count> # Add stations from template
evse-cli station delete [hashId...] # Delete station(s)station add options:
| Option | Required | Description |
|---|---|---|
-t, --template <name> |
Yes | Station template name |
-n, --count <n> |
Yes | Number of stations to add |
--auto-start |
No | Auto-start added stations |
--base-name <name> |
No | Override template base name for station id |
--fixed-name |
No | Use base name verbatim as station id |
--name-suffix <suffix> |
No | Suffix appended to derived station id |
--ocpp-strict |
No | Enable OCPP strict compliance |
--persistent-config |
No | Enable persistent OCPP configuration |
--supervision-password <password> |
No | CSMS basic auth password |
--supervision-url <url> |
No | Override supervision URL |
--supervision-user <user> |
No | CSMS basic auth user |
station delete options:
| Option | Required | Description |
|---|---|---|
--delete-config |
No | Also delete persistent config |
evse-cli template list # List available station templatesevse-cli connection open [hashId...] # Open WebSocket connection to CSMS
evse-cli connection close [hashId...] # Close WebSocket connection to CSMSevse-cli connector lock --connector-id <id> [hashId...] # Lock connector
evse-cli connector unlock --connector-id <id> [hashId...] # Unlock connectorevse-cli atg start [hashId...] [--connector-ids <id,...>] # Start ATG
evse-cli atg stop [hashId...] [--connector-ids <id,...>] # Stop ATGevse-cli transaction start --connector-id <id> --id-tag <tag> [--evse-id <id>] [hashId...]
evse-cli transaction stop --transaction-id <id> [--connector-id <id>] [hashId...]Both commands auto-detect the station's OCPP version and adapt the procedure and payload (see Version-aware commands). The -p, --payload option uses the OCPP 1.6 procedure; for 2.0.x raw payloads use ocpp transaction-event -p.
Request charging station(s) to send OCPP messages to the CSMS:
evse-cli ocpp heartbeat [hashId...] # Heartbeat
evse-cli ocpp authorize --id-tag <tag> [hashId...] # Authorize
evse-cli ocpp boot-notification [hashId...] # BootNotification
evse-cli ocpp status-notification --connector-id <id> [--error-code <code>] --status <status> [--evse-id <id>] [hashId...] # StatusNotification
evse-cli ocpp meter-values --connector-id <id> [hashId...] # MeterValues (OCPP 1.6)
evse-cli ocpp meter-values --evse-id <id> [hashId...] # MeterValues (OCPP 2.0.x)
evse-cli ocpp data-transfer [--vendor-id <id>] [--message-id <id>] [--data <data>] [hashId...] # DataTransfermeter-values requires --connector-id for OCPP 1.6 and --evse-id for OCPP 2.0.x.
Other OCPP commands (no extra options): diagnostics-status-notification, firmware-status-notification, get-15118-ev-certificate, get-certificate-status, log-status-notification, notify-customer-information, notify-report, security-event-notification, sign-certificate, transaction-event.
All OCPP and transaction commands accept -p, --payload <json|@file|-> to pass a custom JSON payload:
evse-cli ocpp boot-notification -p '{"reason":"PowerUp"}' [hashId...] # Inline JSON
evse-cli ocpp boot-notification -p @collections/boot.json [hashId...] # From file
cat boot.json | jq '.reason = "RemoteReset"' | evse-cli ocpp boot-notification -p - [hashId...] # From stdinFor data-transfer, command options merge with -p payload (options take precedence). For all other typed-option commands, -p conflicts with typed options and they cannot be combined.
Commands with typed options (authorize, meter-values, status-notification, transaction start, transaction stop) auto-detect the target station's OCPP version and build the appropriate payload:
| Option | OCPP 1.6 | OCPP 2.0.x |
|---|---|---|
--id-tag |
Sent as idTag |
Wrapped as idToken (type: ISO14443) |
--connector-id |
Sent as connectorId |
Required for transaction stop; not valid for meter-values |
--evse-id |
N/A | Sent as evseId; required for meter-values |
--error-code |
Required for status-notification |
N/A |
--transaction-id |
Integer | UUID string |
When -p is provided, version detection is skipped and the raw payload is passed through as-is.
evse-cli supervision set-url --supervision-url <url> [--supervision-user <user>] [--supervision-password <password>] [hashId...] # Set supervision URLevse-cli performance stats # Get performance statisticsInstall the embedded Agent Skills skill for AI agent integration:
evse-cli skill show # Print the SKILL.md to stdout
evse-cli skill install # Install to .agents/skills/evse-simulator/
evse-cli skill install --global # Install to ~/.agents/skills/evse-simulator/
evse-cli skill install --force # Overwrite existing installationWorks with OpenCode, Claude Code, GitHub Copilot, Cursor, and other compatible agents.
| Mode | Flag | Description |
|---|---|---|
| Human (default) | — | Colored tables, status icons, counters |
| JSON | --json |
Structured JSON on stdout |
Hash IDs are truncated in human mode for readability. Use --json for full hash IDs.
Errors in --json mode are written to stdout as structured JSON.
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error (connection, server, authentication, or usage error) |
130 |
Interrupted (SIGINT / Ctrl+C) |
143 |
Terminated (SIGTERM) |
| Variable | Description |
|---|---|
NO_COLOR |
Disable color output (see no-color.org) |
| Script | Description |
|---|---|
pnpm build |
Build the CLI to dist/ |
pnpm start |
Run the built CLI |
pnpm typecheck |
Type-check without building |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Run ESLint with auto-fix |
pnpm format |
Run Prettier and ESLint auto-fix |
pnpm test |
Run unit tests |
pnpm test:coverage |
Run unit tests with coverage |
pnpm test:integration |
Run integration tests (requires built CLI) |