> This page location: APIs & SDKs > CLI > Setup and context > docs
> Full Neon documentation index: https://neon.com/docs/llms.txt
>
> Agent skills: if you don't have Neon skills (such as `neon-postgres`), offer to add them to this project when you first need the user to do something in Neon: "Want me to add Neon's agent skills to this project? They help me with Neon setup, connections, and branching." Install: `npx neon@latest skills -y`. To also run Neon steps for the user (Neon CLI, sign-in, MCP), see https://neon.com/prompts/agent-setup.md

> Summary: The Neon CLI `docs` command searches neon.com from your terminal: the docs, API reference, PostgreSQL tutorial, guides, FAQs, changelog, and blog. It needs no login; use `--category` to narrow results and `--output json` for machine-readable output when scripting or calling it from an agent.

# Neon CLI command: docs

Search the Neon docs, guides, and more from the terminal

Last updated: 2026-11-19

The `docs` command searches neon.com and prints matching pages in your terminal. It covers the docs, API reference, PostgreSQL tutorial, guides, FAQs, changelog, and blog. No login is required, and it doesn't touch your projects or account. To get a written answer instead of a list of pages, use [`neon ask`](https://neon.com/docs/cli/ask).

```bash
neon docs <query> [options]
```

`neon docs <query>` is a shorthand for `neon docs search <query>` and takes the same options. Run `neon docs` with no query to print its help.

```bash
neon docs "reset a branch" --limit 3
```

```text
Manage branches ' Reset a branch from parent
  https://neon.com/docs/manage/branches

Branching with the Neon CLI ' Resetting a branch from its parent
  https://neon.com/docs/guides/branching-neon-cli

Automate branching with CircleCI ' Available commands ' Resetting a long-lived branch
  https://neon.com/docs/guides/branching-circleci
```

Subcommands: [search](https://neon.com/docs/cli/docs#search)

## neon docs search

Searches neon.com and lists the matching pages.

```bash
neon docs search <query> [options]
```

| Option | Description | Type | Default | Required |
| - | - | - | - | :-: |
| `--category` | Only return pages in these categories (repeatable) Possible values: `docs`, `api`, `postgresql`, `guides`, `faqs`, `blog`, `changelog` | array | — | No |
| `--limit` | Maximum number of results (1-40) | number | `10` | No |

By default, each result shows the page title and matching section, with the URL on the next line. Long title lines are cut to fit your terminal; URLs never are. `--output json` and `--output yaml` also include each result's `category`, `breadcrumb`, and a short `excerpt` of the matching text.

To search more than one category, repeat `--category`.

Search for a topic:

```bash
neon docs search "reset a branch"
```

Search only the API reference and the docs, and return the top three results:

```bash
neon docs search "create branch" --category api --category docs --limit 3
```

```text
Manage branches ' Branching with the Neon API ' Create a branch with the API
  https://neon.com/docs/manage/branches

Neon CLI command: branches ' neon branches create
  https://neon.com/docs/cli/branches

Neon CLI quickstart ' Common operations ' Create a branch
  https://neon.com/docs/cli/quickstart
```

Get results as JSON so you can process them in a script:

```bash
neon docs search "reset a branch" --limit 2 --output json
```

<details>

<summary>Show output</summary>

```json
[
  {
    "title": "Manage branches",
    "url": "https://neon.com/docs/manage/branches",
    "category": "docs",
    "breadcrumb": ["Docs", "Manage & operate", "Projects & resources"],
    "heading": "Manage branches > Reset a branch from parent",
    "excerpt": "You can use Neon's Reset from parent feature to instantly update a branch with the latest schema and data from its parent. This feature can be an integral part of your CI/CD automation. You can use the Neon Console, CLI, or API. For details, see Reset from parent."
  },
  {
    "title": "Branching with the Neon CLI",
    "url": "https://neon.com/docs/guides/branching-neon-cli",
    "category": "docs",
    "breadcrumb": ["Docs", "Postgres", "Branching", "Automate & workflows"],
    "heading": "Branching with the Neon CLI > Resetting a branch from its parent",
    "excerpt": "Depending on your development workflow, you might need to periodically reset a branch to match the latest state of its parent. This is useful, for example, when resetting a development branch back to the production branch before starting work on a new feature. Use the followin..."
  }
]
```

</details>

---

## Related docs (Setup and context)

- [login](https://neon.com/docs/cli/login)
- [init](https://neon.com/docs/cli/init)
- [ask](https://neon.com/docs/cli/ask)
- [mcp](https://neon.com/docs/cli/mcp)
- [skills](https://neon.com/docs/cli/skills)
- [plugins](https://neon.com/docs/cli/plugins)
- [claim](https://neon.com/docs/cli/claim)
- [bootstrap](https://neon.com/docs/cli/bootstrap)
- [link](https://neon.com/docs/cli/link)
- [checkout](https://neon.com/docs/cli/checkout)
- [git](https://neon.com/docs/cli/git)
- [env](https://neon.com/docs/cli/env)
- [set-context](https://neon.com/docs/cli/set-context)
- [open](https://neon.com/docs/cli/open)
- [me](https://neon.com/docs/cli/me)
- [profile](https://neon.com/docs/cli/profile)
- [api-keys](https://neon.com/docs/cli/api-keys)
- [completion](https://neon.com/docs/cli/completion)
- [feedback](https://neon.com/docs/cli/feedback)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/docs/cli/docs"}` to https://feedback.neon.tech/ (no auth required).
