> 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.

# evcloud-cli

`evcloud-cli` is a single binary generated from the EV Cloud API. Every operation in the [API Reference](/api-reference) is a command, grouped by domain:

```bash
evcloud-cli <domain> <resource> <operation> [flags]
evcloud-cli cpo locations list --limit 5
```

## Install

Install it with npm. npm downloads only the binary for your platform: macOS and Linux on x64 or arm64, and Windows on x64.

```bash
npm i -g @evcloud/cli
evcloud-cli --version
```

## Point it at the API

Set the production API once per shell, or pass `--base-url` per command:

```bash
export EVCLOUD_CLI_BASE_URL="https://api.ev-cloud.ai"
```

## Sign in

**`Browser`**

```bash Browser
evcloud-cli auth login
```

**`Token`**

```bash Token
export EVCLOUD_TOKEN="<token>"
```

`auth login` opens your browser: sign in with your OCPPLab account, choose the organization, and select **Allow**. The CLI keeps the access and refresh tokens in your OS keyring and refreshes them on its own. On a machine without a browser, such as CI, set `EVCLOUD_TOKEN` to an SDK token that expires instead. When both are set, `EVCLOUD_TOKEN` wins.

| Command                               | Does                                         |
| ------------------------------------- | -------------------------------------------- |
| `evcloud-cli auth login`              | Signs in with your browser                   |
| `evcloud-cli auth login --with-token` | Reads a token from stdin into the keyring    |
| `evcloud-cli auth status`             | Shows which credential each request will use |
| `evcloud-cli auth logout`             | Removes stored credentials                   |

## Your first commands

```bash
# Check the API is up
evcloud-cli health check

# List your CPO locations
evcloud-cli cpo locations list --limit 5

# Cap a charger at 11 kW, then read the charger's answer
evcloud-cli energy control-requests create \
  --charge-point-id CP-AMS-001 --action SET_EVSE_INPUT_LIMIT --limit 11000 --unit W
evcloud-cli energy control-requests get --request-id <request-id>
```

Nested fields are flags with dots, or pass a whole object as JSON with `--json`.

## Find a command

```bash
evcloud-cli --help                     # domains
evcloud-cli emsp commands --help       # operations in a resource
evcloud-cli emsp commands send --help  # flags of one operation
```

## Use it from an AI agent

The CLI prints JSON when its output is piped, and describes itself as JSON:

```bash
evcloud-cli --schema                # every operation and its parameters
evcloud-cli generate-skills         # SKILL.md files for coding agents
```

The same skills, kept current, install with one command. See [Agent skills](/agents/skills).