Skip to navigation

Commands and flags

Output formats, paging, dry runs and environment variables.

Global flags

Every command accepts these:

FlagDoes
--format <json|table|yaml|csv|jsonl|raw|http>Output format. Default: table in a terminal, json when piped.
--humanKeep the table output even when piped.
--query <JMESPath>Keep only part of the response, for example --query 'items[].location_id'.
--dry-runValidate the request and print it without sending it.
--base-url <url>Your EV Cloud host.
-q, --quietPrint nothing on success. Errors still go to stderr.
--debugPrint the HTTP request and response to stderr.
--schemaPrint the JSON schema of the current command or group.

Request bodies

Set fields with flags:

evcloud-cli energy control-requests create \
--charge-point-id CP-AMS-001 --action SET_EVSE_INPUT_LIMIT \
--connector-id 0 --limit 11000 --unit W

Or send the whole body as JSON, from an argument or stdin:

evcloud-cli energy control-requests create --json '{"charge_point_id": "CP-AMS-001", "action": "CLEAR_EVSE_INPUT_LIMIT"}'
cat body.json | evcloud-cli energy control-requests create --json -

--params '<json>' merges extra parameters and overrides individual flags.

Paging

List commands that page also accept:

FlagDoes
--page-allFetch every page and stream the items as NDJSON
--page-limit <n>Stop after n pages
--page-delay <ms>Wait between pages

Scripting

# Every location id, one per line
evcloud-cli cpo locations list --page-all | jq -r '.location_id'
# Keep one field of a response
evcloud-cli health check --query status
# Preview a destructive call before you run it
evcloud-cli cpo locations delete --location-id LOC-001 --dry-run

Exit code 0 means success. On an API error, the CLI prints the error to stderr and exits non-zero.

Environment variables

VariableDoes
EVCLOUD_TOKENSDK token. Takes precedence over auth login.
EVCLOUD_CLI_BASE_URLYour EV Cloud host (--base-url wins)
EVCLOUD_CLI_OUTPUTDefault output format (--format wins)
EVCLOUD_CLI_RETRIESRetry attempts for failed requests
EVCLOUD_CLI_TIMEOUT_SECSTotal request timeout
EVCLOUD_CLI_PROXYHTTP(S) proxy URL
EVCLOUD_CLI_CA_BUNDLEPEM file with extra trusted certificates

Shell completion

evcloud-cli completion zsh > "${fpath[1]}/_evcloud-cli"

Also bash, fish, powershell and elvish.