> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the CLI from an AI coding agent

> Give Claude Code, Cursor, Codex, or any agent a reliable way to drive Plivo.

The CLI is designed to be operated by AI coding agents: stable JSON in and out, one error shape, exit codes to branch on, `--dry-run` to preview, and a hard `--yes` gate on anything that spends money. The local tools are covered too: `streams test`, `streams forward` and `upgrade` honour `-o json` and send their progress output to stderr, so stdout stays parseable.

## Install the skill

`plivo skill install` writes a single reference file (`SKILL.md`) that agents load automatically. It documents every command, the JSON and error envelopes, the exit codes, headless auth, and the safety rules: without a network call, from the copy embedded in the binary.

```bash theme={null}
plivo skill install                     # → ~/.claude/skills/plivo-cli/SKILL.md (Claude Code)
plivo skill install --dir ./.cursor/skills/plivo-cli
plivo skill install --print             # write to stdout for any other tool
```

## Headless authentication

Agents can't complete a browser login. Set `PLIVO_AUTH_ID` and `PLIVO_AUTH_TOKEN` in the environment instead, see [Using API credentials](/docs/cli/authenticate#use-api-credentials-ci-and-agents), plus `PLIVO_FEEDBACK_PROMPT=0` and `CI=1` to suppress interactive prompts.

## Rules of the road for agents

* Always pass `-o json`; parse `data` on success and `error.code` on failure.
* Never pass `--yes` unless the human asked for the spend or deletion. Use `--dry-run` to show what would happen.
* `plivo <command> --help` is the source of truth for flags. Do not invent flag names.
* Use [`plivo ask`](/docs/cli/apis/diagnose-ask#ask-a-question) for how-to questions and [`plivo diagnose`](/docs/cli/apis/diagnose-ask#diagnose-a-call-or-message) for a failed call or message; both are rate-limited per account.
* `plivo docs search <keywords>`, `plivo docs list` and `plivo docs show <page>` read the documentation with no credentials, so an agent can look something up before it has any. See [Read the docs from your terminal](/docs/cli/docs).
