> This page location: APIs & SDKs > CLI > Setup and context > ask
> 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 `ask` command sends a question to the Neon assistant and prints the answer in your terminal. It answers from Neon's documentation and needs no login; use `--output json` for machine-readable output when scripting or calling it from an agent.

# Neon CLI command: ask

Ask the Neon assistant a question from the terminal

Last updated: 2026-11-01

The `ask` command sends a question to the Neon assistant and prints the answer to your terminal: `neon ask --prompt "<question>"`. The assistant answers from Neon's documentation, so keep questions scoped to Neon and Lakebase Postgres rather than general chat. No login is required, and it doesn't touch your projects or account. To find docs pages on a topic, use [`neon docs search`](https://neon.com/docs/cli/docs). To send feedback to the Neon team instead, use [`neon feedback`](https://neon.com/docs/cli/feedback).

The answer is natural-language text, not structured data. By default it streams as markdown, use `--output json` to get the answer back as a single `text` field you can parse.

## Usage

```bash
neon ask --prompt <question>
```

Pass your question with `--prompt`. It's the only required option.

## Options

| Option | Description | Type | Default | Required |
| - | - | - | - | :-: |
| `--prompt` | The question to ask | string | — | Yes |

`--output json` and `--output yaml` both return the full answer at once as a single `text` field, instead of streaming markdown.

## Examples

Ask a question:

```bash
neon ask --prompt "How do schema-only branches work?"
```

Get the answer as JSON so you can process it in a script:

```bash
neon ask --prompt "What is a Neon project?" --output json
```

---

## Related docs (Setup and context)

- [login](https://neon.com/docs/cli/login)
- [init](https://neon.com/docs/cli/init)
- [docs](https://neon.com/docs/cli/docs)
- [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/ask"}` to https://feedback.neon.tech/ (no auth required).
