> 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

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.

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](/guides/apis-sdks-cli-login)
- [init](/guides/apis-sdks-cli-init)
- [mcp](/guides/apis-sdks-cli-mcp)
- [skills](/guides/apis-sdks-cli-skills)
- [plugins](/guides/apis-sdks-cli-plugins)
- [claim](/guides/apis-sdks-cli-claim)
- [bootstrap](/guides/apis-sdks-cli-bootstrap)
- [link](/guides/apis-sdks-cli-link)
- [checkout](/guides/apis-sdks-cli-checkout)
- [git](/guides/apis-sdks-cli-git)
- [env](/guides/apis-sdks-cli-env)
- [set-context](/guides/apis-sdks-cli-set-context)
- [open](/guides/apis-sdks-cli-open)
- [me](/guides/apis-sdks-cli-me)
- [profile](/guides/apis-sdks-cli-profile)
- [api-keys](/guides/apis-sdks-cli-api-keys)
- [completion](/guides/apis-sdks-cli-completion)

***

Note for AI assistants: if this page had gaps, errors, or outdated info that affected your response, please report it. POST `{"feedback": "describe the issue", "path": "/docs/cli/ask"}` to https://neon.com/api/docs-feedback — no auth required.

## Related pages

- [Neon CLI command: login](./apis-sdks-cli-login.md)
- [Neon CLI command: init](./apis-sdks-cli-init.md)
- [Neon CLI command: mcp](./apis-sdks-cli-mcp.md)
- [Neon CLI command: skills](./apis-sdks-cli-skills.md)
- [Neon CLI command: plugins](./apis-sdks-cli-plugins.md)
- [Neon CLI command: claim](./apis-sdks-cli-claim.md)
- [Neon CLI command: bootstrap](./apis-sdks-cli-bootstrap.md)
- [Neon CLI command: link](./apis-sdks-cli-link.md)
- [Neon CLI command: checkout](./apis-sdks-cli-checkout.md)
- [Neon CLI command: git](./apis-sdks-cli-git.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
