> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ev-cloud.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ev-cloud.ai/_mcp/server.

# Commands and flags

## Global flags

Every command accepts these:

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

## Request bodies

Set fields with flags:

```bash
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:

```bash
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:

| Flag                | Does                                            |
| ------------------- | ----------------------------------------------- |
| `--page-all`        | Fetch every page and stream the items as NDJSON |
| `--page-limit <n>`  | Stop after `n` pages                            |
| `--page-delay <ms>` | Wait between pages                              |

## Scripting

```bash
# 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

| Variable                   | Does                                           |
| -------------------------- | ---------------------------------------------- |
| `EVCLOUD_TOKEN`            | SDK token. Takes precedence over `auth login`. |
| `EVCLOUD_CLI_BASE_URL`     | Your EV Cloud host (`--base-url` wins)         |
| `EVCLOUD_CLI_OUTPUT`       | Default output format (`--format` wins)        |
| `EVCLOUD_CLI_RETRIES`      | Retry attempts for failed requests             |
| `EVCLOUD_CLI_TIMEOUT_SECS` | Total request timeout                          |
| `EVCLOUD_CLI_PROXY`        | HTTP(S) proxy URL                              |
| `EVCLOUD_CLI_CA_BUNDLE`    | PEM file with extra trusted certificates       |

## Shell completion

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

Also `bash`, `fish`, `powershell` and `elvish`.