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

# PlanetScale CLI commands: agent-guide

Vitess, Neki, and Postgres

## Getting Started

Make sure to first [set up your PlanetScale developer environment](/docs/cli/planetscale-environment-setup.md). Once you've installed the `pscale` CLI, you can interact with PlanetScale and manage your databases straight from the command line.

## The `agent-guide` command

Shows guidance for AI agents and automation using `pscale`. Use **`--format json`** for a machine-readable bootstrap response with conventions, hosted MCP details, skills install commands, and suggested next steps. Use **`--skill`** to print the same guide as an installable skill file. `pscale --skill` on the root command prints that skill file and exits.

> [!NOTE]
>
> **Requires `pscale` 0.292.0 or later.** Install or upgrade with `brew install pscale` or `brew upgrade pscale`.

For a copy-paste agent setup prompt, see [Agent setup prompt](/docs/agent-setup/prompt.md) ([Markdown export](/docs/agent-setup/prompt.md)).

**Usage:**

```bash theme={null}
pscale agent-guide --format json
```

### JSON response fields

| Field | Description |
| - | - |
| `status` | `"ok"` when the guide loaded successfully |
| `guide` | Full CLI agent guide text (same content as the CLI repo `AGENTS.md`) |
| `first_command` | Suggested first command (`pscale auth check --format json`) |
| `agent_guide_command` | Command to re-fetch this guide |
| `hosted_mcp_url` | Hosted PlanetScale MCP server URL |
| `mcp_docs_url` | Link to MCP documentation |
| `skills_repo_url` | [planetscale/skills](https://github.com/planetscale/skills) repository |
| `skills_setup_command` | Clone + `script/setup` one-liner |
| `skills_npx_command` | `npx skills add planetscale/skills -g -y` |
| `skills_cli_automation_skill` | Skill id for CLI conventions (`14-pscale-cli-automation`) |
| `supported_engines` | `mysql`, `postgresql` |
| `conventions` | Short list of CLI rules for agents |
| `next_steps` | Commands to run after reading the guide |

`--skill` writes a YAML-frontmatter skill file to stdout and skips this JSON object. Use `pscale agent-guide --skill` or `pscale --skill` when you need the installable skill rather than the bootstrap response.

### Available flags

| **Flag** | **Description** |
| - | - |
| `--skill` | Print the guide as an installable agent skill file and exit |
| `-f`, `--format json` | **Required for automation** — JSON on stdout |
| `--api-url <URL>` | Non-production API base URL |
| `--config <FILE>` | Config file (default `$HOME/.config/planetscale/pscale.yml`) |
| `-h`, `--help` | Help for `agent-guide` |

## Examples

**Human-readable output (default):**

```bash theme={null}
pscale agent-guide
```

**Installable skill file:**

```bash theme={null}
pscale agent-guide --skill
pscale --skill
```

## Need help?

Get help from [the PlanetScale Support team](https://planetscale.com/contact?initial=support), or join our [Discord community](https://pscale.link/community) to see how others are using PlanetScale.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.